From patchwork Mon Nov 20 16:38:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34865 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABE8CC5AE5B for ; Mon, 20 Nov 2023 16:39:02 +0000 (UTC) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by mx.groups.io with SMTP id smtpd.web10.583.1700498338026484379 for ; Mon, 20 Nov 2023 08:38:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ORj1WF+u; spf=softfail (domain: sakoman.com, ip: 209.85.167.177, mailfrom: steve@sakoman.com) Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-3b5aee410f2so2228517b6e.1 for ; Mon, 20 Nov 2023 08:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498336; x=1701103136; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FRXOS0RZZymLd/vCMN8CbNInMUjOsrroSG+24/zVTVY=; b=ORj1WF+u0+NaPW/Wfs/vQnvz8C2ls1MXol9tWoT9pgey7a86eq7uNi2QnMeMrI8NNf 8WDlSFfHOaQRWXaI3lo7K/ivvb2VR1giAY7Pf1OuinGocW1/rUwTe/4H/xzPhgfLZtdA tZeVBnWUKfXBMoG1/tR5VwhphK5sE1juhaevMQ14CGFIuR68SRhlvEvaEugmNRmxYCwg uZMnztadr0MfofbrakIde5/wu9sagck8xO8jzD4DqXtsy0NwO82BdGOsqiVQxIz7zyHi 89W7HMbD6gqMUx1DrPXYaayH5xVhjzTefUCstLnGKn2OvpLx6q4b4KMRxSx+kFSDH+kk L1UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498336; x=1701103136; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FRXOS0RZZymLd/vCMN8CbNInMUjOsrroSG+24/zVTVY=; b=eZc2STHIjTpusaB9m8Ms3pc9L+dR40+EhRdARgjtWifCy8gf5zJuJke++UAHSLsiIF CSS5qaMPr8miGKyYgOIyhkTmSMe+sFtTdoNR860kEoKXfC8D2reffgaXXBz9H4XYABsO QM5ZThZhkXHZ7fyucC4fxrwMtE9Bv42jZZM4f/jKWahOlkGS2mrEHUsNq5cTccEUJ3SL bwxeM/XSkH4o5IwgKsZGjOFQy+NSHOkPxKZ5OM2qmitgt6TcJWjtRvAwqQfia7w7WWuP tDxDq/pLzA72CqbgQrcEtiLxGsuddzJo2vXbNVszCfXkHggOXzpExDUMp7amDY1BPM2J rGiw== X-Gm-Message-State: AOJu0YwthniVWuRQkahvm2rj4J73Fg94E8tItfzw3eNoWzoNDL5u+8XH mk0+6JPnpSlMmc6v9ClO3Gqdcsv67NFsWKf0zGd/BQ== X-Google-Smtp-Source: AGHT+IGYIPqYIpM0PCw9VoTPwQP0sFXNdbEY4z1/w9+fhIZGfFCgGHIpfVGBZQDA5S0dHVrr5Tn7vg== X-Received: by 2002:a05:6808:19a2:b0:3b2:e233:1e7 with SMTP id bj34-20020a05680819a200b003b2e23301e7mr8060123oib.49.1700498336197; Mon, 20 Nov 2023 08:38:56 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.38.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:38:55 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 01/33] libsndfile1: fix CVE-2022-33065 Date: Mon, 20 Nov 2023 06:38:15 -1000 Message-Id: <84ea91d63147c19ebf5909f7e9f377ddb1a52a7b.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190890 From: Alex Stewart Signed-off-by: Alex Stewart Signed-off-by: Alexandre Belloni (cherry picked from commit f34991c7eeb91702a44ac8b4a190fcb45dac57cb) Signed-off-by: Steve Sakoman --- .../libsndfile1/cve-2022-33065.patch | 739 ++++++++++++++++++ .../libsndfile/libsndfile1_1.2.2.bb | 1 + 2 files changed, 740 insertions(+) create mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch new file mode 100644 index 0000000000..fa4b2fc08b --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch @@ -0,0 +1,739 @@ +From c7ce5b0ebeeb58934825077d1324960aa0747718 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Tue, 10 Oct 2023 16:10:34 -0400 +Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation + +The clang sanitizer warns of a possible signed integer overflow when +calculating the `dataend` value in `mat4_read_header()`. + +``` +src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int' +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in +src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int' +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in +``` + +Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of +`dataend` before performing the calculation, to avoid the issue. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/789 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Upstream-Status: Backport [9a829113c88a51e57c1e46473e90609e4b7df151] + +Signed-off-by: Alex Stewart +--- + src/mat4.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mat4.c b/src/mat4.c +index 0b1b414b..575683ba 100644 +--- a/src/mat4.c ++++ b/src/mat4.c +@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf) + psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ; + } + else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth) +- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ; ++ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ; + + psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ; + +From 842303f984b2081481e74cb84a9a24ecbe3dec1a Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 16:36:02 -0400 +Subject: [PATCH] au: avoid int overflow while calculating data_end + +At several points in au_read_header(), we calculate the functional end +of the data segment by adding the (int)au_fmt.dataoffset and the +(int)au_fmt.datasize. This can overflow the implicit int_32 return value +and cause undefined behavior. + +Instead, precalculate the value and assign it to a 64-bit +(sf_count_t)data_end variable. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/au.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/au.c b/src/au.c +index 62bd691d..f68f2587 100644 +--- a/src/au.c ++++ b/src/au.c +@@ -291,6 +291,7 @@ static int + au_read_header (SF_PRIVATE *psf) + { AU_FMT au_fmt ; + int marker, dword ; ++ sf_count_t data_end ; + + memset (&au_fmt, 0, sizeof (au_fmt)) ; + psf_binheader_readf (psf, "pm", 0, &marker) ; +@@ -317,14 +318,15 @@ au_read_header (SF_PRIVATE *psf) + return SFE_AU_EMBED_BAD_LEN ; + } ; + ++ data_end = (sf_count_t) au_fmt.dataoffset + (sf_count_t) au_fmt.datasize ; + if (psf->fileoffset > 0) +- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ; ++ { psf->filelength = data_end ; + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; + } +- else if (au_fmt.datasize == -1 || au_fmt.dataoffset + au_fmt.datasize == psf->filelength) ++ else if (au_fmt.datasize == -1 || data_end == psf->filelength) + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; +- else if (au_fmt.dataoffset + au_fmt.datasize < psf->filelength) +- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ; ++ else if (data_end < psf->filelength) ++ { psf->filelength = data_end ; + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; + } + else +From 0754d3380a54e3fbdde0f684b88955c80c79f58f Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 16:46:29 -0400 +Subject: [PATCH] avr: fix int overflow in avr_read_header() + +Pre-cast hdr.frames to sf_count_t, to provide the calculation with +enough numeric space to avoid an int-overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/avr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/avr.c b/src/avr.c +index 6c78ff69..1bc1ffc9 100644 +--- a/src/avr.c ++++ b/src/avr.c +@@ -162,7 +162,7 @@ avr_read_header (SF_PRIVATE *psf) + psf->endian = SF_ENDIAN_BIG ; + + psf->dataoffset = AVR_HDR_SIZE ; +- psf->datalength = hdr.frames * (hdr.rez / 8) ; ++ psf->datalength = (sf_count_t) hdr.frames * (hdr.rez / 8) ; + + if (psf->fileoffset > 0) + psf->filelength = AVR_HDR_SIZE + psf->datalength ; +From 6ac31a68a614e2bba4a05b54e5558d6270c98376 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 16:54:21 -0400 +Subject: [PATCH] sds: fix int overflow warning in sample calculations + +The sds_*byte_read() functions compose their uint_32 sample buffers by +shifting 7bit samples into a 32bit wide buffer, and adding them +together. Because the 7bit samples are stored in 32bit ints, code +fuzzers become concerned that the addition operation can overflow and +cause undefined behavior. + +Instead, bitwise-OR the bytes together - which should accomplish the +same arithmetic operation, without risking an int-overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart + +Do the same for the 3byte and 4byte read functions. +--- + src/sds.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/sds.c b/src/sds.c +index 6bc76171..2a0f164c 100644 +--- a/src/sds.c ++++ b/src/sds.c +@@ -454,7 +454,7 @@ sds_2byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 2) +- { sample = arith_shift_left (ucptr [k], 25) + arith_shift_left (ucptr [k + 1], 18) ; ++ { sample = arith_shift_left (ucptr [k], 25) | arith_shift_left (ucptr [k + 1], 18) ; + psds->read_samples [k / 2] = (int) (sample - 0x80000000) ; + } ; + +@@ -498,7 +498,7 @@ sds_3byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 3) +- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) ; ++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) ; + psds->read_samples [k / 3] = (int) (sample - 0x80000000) ; + } ; + +@@ -542,7 +542,7 @@ sds_4byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 4) +- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) + (ucptr [k + 3] << 4) ; ++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) | (ucptr [k + 3] << 4) ; + psds->read_samples [k / 4] = (int) (sample - 0x80000000) ; + } ; + +From 96428e1dd4998f1cd47df24f8fe9b0da35d7b947 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 17:26:51 -0400 +Subject: [PATCH] aiff: fix int overflow when counting header elements + +aiff_read_basc_chunk() tries to count the AIFF header size by keeping +track of the bytes returned by psf_binheader_readf(). Though improbable, +it is technically possible for these added bytes to exceed the int-sized +`count` accumulator. + +Use a 64-bit sf_count_t type for `count`, to ensure that it always has +enough numeric space. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/aiff.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aiff.c b/src/aiff.c +index a2bda8f4..6b244302 100644 +--- a/src/aiff.c ++++ b/src/aiff.c +@@ -1702,7 +1702,7 @@ static int + aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize) + { const char * type_str ; + basc_CHUNK bc ; +- int count ; ++ sf_count_t count ; + + count = psf_binheader_readf (psf, "E442", &bc.version, &bc.numBeats, &bc.rootNote) ; + count += psf_binheader_readf (psf, "E222", &bc.scaleType, &bc.sigNumerator, &bc.sigDenominator) ; +From b352c350d35bf978e4d3a32e5d9df1f2284445f4 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 17:43:02 -0400 +Subject: [PATCH] ircam: fix int overflow in ircam_read_header() + +When reading the IRCAM header, it is possible for the calculated +blockwidth to exceed the bounds of a signed int32. + +Use a 64bit sf_count_t to store the blockwidth. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/common.h | 2 +- + src/ircam.c | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/common.h b/src/common.h +index d92eabde..5369cb67 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -439,7 +439,7 @@ typedef struct sf_private_tag + sf_count_t datalength ; /* Length in bytes of the audio data. */ + sf_count_t dataend ; /* Offset to file tailer. */ + +- int blockwidth ; /* Size in bytes of one set of interleaved samples. */ ++ sf_count_t blockwidth ; /* Size in bytes of one set of interleaved samples. */ + int bytewidth ; /* Size in bytes of one sample (one channel). */ + + void *dither ; +diff --git a/src/ircam.c b/src/ircam.c +index 8e7cdba8..3d73ba44 100644 +--- a/src/ircam.c ++++ b/src/ircam.c +@@ -171,35 +171,35 @@ ircam_read_header (SF_PRIVATE *psf) + switch (encoding) + { case IRCAM_PCM_16 : + psf->bytewidth = 2 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_16 ; + break ; + + case IRCAM_PCM_32 : + psf->bytewidth = 4 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_32 ; + break ; + + case IRCAM_FLOAT : + psf->bytewidth = 4 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_FLOAT ; + break ; + + case IRCAM_ALAW : + psf->bytewidth = 1 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ALAW ; + break ; + + case IRCAM_ULAW : + psf->bytewidth = 1 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ULAW ; + break ; +From 3bcd291e57867f88f558fa6f80990e84311df78c Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Wed, 11 Oct 2023 16:12:22 -0400 +Subject: [PATCH] mat4/mat5: fix int overflow when calculating blockwidth + +Pre-cast the components of the blockwidth calculation to sf_count_t to +avoid overflowing integers during calculation. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/mat4.c | 2 +- + src/mat5.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mat4.c b/src/mat4.c +index 575683ba..9f046f0c 100644 +--- a/src/mat4.c ++++ b/src/mat4.c +@@ -104,7 +104,7 @@ mat4_open (SF_PRIVATE *psf) + + psf->container_close = mat4_close ; + +- psf->blockwidth = psf->bytewidth * psf->sf.channels ; ++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ; + + switch (subformat) + { case SF_FORMAT_PCM_16 : +diff --git a/src/mat5.c b/src/mat5.c +index da5a6eca..20f0ea64 100644 +--- a/src/mat5.c ++++ b/src/mat5.c +@@ -114,7 +114,7 @@ mat5_open (SF_PRIVATE *psf) + + psf->container_close = mat5_close ; + +- psf->blockwidth = psf->bytewidth * psf->sf.channels ; ++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ; + + switch (subformat) + { case SF_FORMAT_PCM_U8 : +From c177e292d47ef73b1d3c1bb391320299a0ed2ff9 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Mon, 16 Oct 2023 12:37:47 -0400 +Subject: [PATCH] common: fix int overflow in psf_binheader_readf() + +The psf_binheader_readf() function attempts to count and return the +number of bytes traversed in the header. During this accumulation, it is +possible to overflow the int-sized byte_count variable. + +Avoid this overflow by checking that the accumulated bytes do not exceed +INT_MAX and throwing an error if they do. This implies that files with +multi-gigabyte headers threaten to produce this error, but I imagine +those files don't really exist - and this error is better than the +undefined behavior which would have resulted previously. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart +--- + src/common.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) + +diff --git a/src/common.c b/src/common.c +index 1c3d951d..7f6cceca 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -18,6 +18,7 @@ + + #include + ++#include + #include + #include + #if HAVE_UNISTD_H +@@ -990,6 +991,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + double *doubleptr ; + char c ; + int byte_count = 0, count = 0 ; ++ int read_bytes = 0 ; + + if (! format) + return psf_ftell (psf) ; +@@ -998,6 +1000,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + + while ((c = *format++)) + { ++ read_bytes = 0 ; + if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16)) + break ; + +@@ -1014,7 +1017,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, ucptr, sizeof (int)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (int)) ; + *intptr = GET_MARKER (ucptr) ; + break ; + +@@ -1022,7 +1025,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ; ++ read_bytes = header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ; + { int k ; + intdata = 0 ; + for (k = 0 ; k < 16 ; k++) +@@ -1034,14 +1037,14 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '1' : + charptr = va_arg (argptr, char*) ; + *charptr = 0 ; +- byte_count += header_read (psf, charptr, sizeof (char)) ; ++ read_bytes = header_read (psf, charptr, sizeof (char)) ; + break ; + + case '2' : /* 2 byte value with the current endian-ness */ + shortptr = va_arg (argptr, unsigned short*) ; + *shortptr = 0 ; + ucptr = (unsigned char*) shortptr ; +- byte_count += header_read (psf, ucptr, sizeof (short)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (short)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *shortptr = GET_BE_SHORT (ucptr) ; + else +@@ -1051,7 +1054,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '3' : /* 3 byte value with the current endian-ness */ + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; +- byte_count += header_read (psf, sixteen_bytes, 3) ; ++ read_bytes = header_read (psf, sixteen_bytes, 3) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *intptr = GET_BE_3BYTE (sixteen_bytes) ; + else +@@ -1062,7 +1065,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, ucptr, sizeof (int)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (int)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *intptr = psf_get_be32 (ucptr, 0) ; + else +@@ -1072,7 +1075,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '8' : /* 8 byte value with the current endian-ness */ + countptr = va_arg (argptr, sf_count_t *) ; + *countptr = 0 ; +- byte_count += header_read (psf, sixteen_bytes, 8) ; ++ read_bytes = header_read (psf, sixteen_bytes, 8) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + countdata = psf_get_be64 (sixteen_bytes, 0) ; + else +@@ -1083,7 +1086,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'f' : /* Float conversion */ + floatptr = va_arg (argptr, float *) ; + *floatptr = 0.0 ; +- byte_count += header_read (psf, floatptr, sizeof (float)) ; ++ read_bytes = header_read (psf, floatptr, sizeof (float)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *floatptr = float32_be_read ((unsigned char*) floatptr) ; + else +@@ -1093,7 +1096,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'd' : /* double conversion */ + doubleptr = va_arg (argptr, double *) ; + *doubleptr = 0.0 ; +- byte_count += header_read (psf, doubleptr, sizeof (double)) ; ++ read_bytes = header_read (psf, doubleptr, sizeof (double)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *doubleptr = double64_be_read ((unsigned char*) doubleptr) ; + else +@@ -1117,7 +1120,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + charptr = va_arg (argptr, char*) ; + count = va_arg (argptr, size_t) ; + memset (charptr, 0, count) ; +- byte_count += header_read (psf, charptr, count) ; ++ read_bytes = header_read (psf, charptr, count) ; + break ; + + case 'G' : +@@ -1128,7 +1131,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count)) + break ; + +- byte_count += header_gets (psf, charptr, count) ; ++ read_bytes = header_gets (psf, charptr, count) ; + break ; + + case 'z' : +@@ -1152,7 +1155,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'j' : /* Seek to position from current position. */ + count = va_arg (argptr, size_t) ; + header_seek (psf, count, SEEK_CUR) ; +- byte_count += count ; ++ read_bytes = count ; + break ; + + case '!' : /* Clear buffer, forcing re-read. */ +@@ -1164,8 +1167,17 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + psf->error = SFE_INTERNAL ; + break ; + } ; ++ ++ if (read_bytes > 0 && byte_count > (INT_MAX - read_bytes)) ++ { psf_log_printf (psf, "Header size exceeds INT_MAX. Aborting.", c) ; ++ psf->error = SFE_INTERNAL ; ++ break ; ++ } else ++ { byte_count += read_bytes ; + } ; + ++ } ; /*end while*/ ++ + va_end (argptr) ; + + return byte_count ; +From a23d563386e7c8d93dcdbe7d5b1d63cad6009116 Mon Sep 17 00:00:00 2001 +From: Alex Stewart +Date: Thu, 19 Oct 2023 14:07:19 -0400 +Subject: [PATCH] nms_adpcm: fix int overflow in signal estimate + +It is possible (though functionally incorrect) for the signal estimate +calculation in nms_adpcm_update() to overflow the int value of s_e, +resulting in undefined behavior. + +Since adpcm state signal values are never practically larger than +16 bits, use smaller numeric sizes throughout the file to avoid the +overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Authored-by: Arthur Taylor +Signed-off-by: Alex Stewart +Rebased-by: Alex Stewart +--- + src/nms_adpcm.c | 85 ++++++++++++++++++++++++------------------------- + 1 file changed, 42 insertions(+), 43 deletions(-) + +diff --git a/src/nms_adpcm.c b/src/nms_adpcm.c +index 96d6ad26..460ea077 100644 +--- a/src/nms_adpcm.c ++++ b/src/nms_adpcm.c +@@ -48,36 +48,36 @@ + /* Variable names from ITU G.726 spec */ + struct nms_adpcm_state + { /* Log of the step size multiplier. Operated on by codewords. */ +- int yl ; ++ short yl ; + + /* Quantizer step size multiplier. Generated from yl. */ +- int y ; ++ short y ; + +- /* Coefficents of the pole predictor */ +- int a [2] ; ++ /* Coefficients of the pole predictor */ ++ short a [2] ; + +- /* Coefficents of the zero predictor */ +- int b [6] ; ++ /* Coefficients of the zero predictor */ ++ short b [6] ; + + /* Previous quantized deltas (multiplied by 2^14) */ +- int d_q [7] ; ++ short d_q [7] ; + + /* d_q [x] + s_ez [x], used by the pole-predictor for signs only. */ +- int p [3] ; ++ short p [3] ; + + /* Previous reconstructed signal values. */ +- int s_r [2] ; ++ short s_r [2] ; + + /* Zero predictor components of the signal estimate. */ +- int s_ez ; ++ short s_ez ; + + /* Signal estimate, (including s_ez). */ +- int s_e ; ++ short s_e ; + + /* The most recent codeword (enc:generated, dec:inputted) */ +- int Ik ; ++ char Ik ; + +- int parity ; ++ char parity ; + + /* + ** Offset into code tables for the bitrate. +@@ -109,7 +109,7 @@ typedef struct + } NMS_ADPCM_PRIVATE ; + + /* Pre-computed exponential interval used in the antilog approximation. */ +-static unsigned int table_expn [] = ++static unsigned short table_expn [] = + { 0x4000, 0x4167, 0x42d5, 0x444c, 0x45cb, 0x4752, 0x48e2, 0x4a7a, + 0x4c1b, 0x4dc7, 0x4f7a, 0x5138, 0x52ff, 0x54d1, 0x56ac, 0x5892, + 0x5a82, 0x5c7e, 0x5e84, 0x6096, 0x62b4, 0x64dd, 0x6712, 0x6954, +@@ -117,21 +117,21 @@ static unsigned int table_expn [] = + } ; + + /* Table mapping codewords to scale factor deltas. */ +-static int table_scale_factor_step [] = ++static short table_scale_factor_step [] = + { 0x0, 0x0, 0x0, 0x0, 0x4b0, 0x0, 0x0, 0x0, /* 2-bit */ + -0x3c, 0x0, 0x90, 0x0, 0x2ee, 0x0, 0x898, 0x0, /* 3-bit */ + -0x30, 0x12, 0x6b, 0xc8, 0x188, 0x2e0, 0x551, 0x1150, /* 4-bit */ + } ; + + /* Table mapping codewords to quantized delta interval steps. */ +-static unsigned int table_step [] = ++static unsigned short table_step [] = + { 0x73F, 0, 0, 0, 0x1829, 0, 0, 0, /* 2-bit */ + 0x3EB, 0, 0xC18, 0, 0x1581, 0, 0x226E, 0, /* 3-bit */ + 0x20C, 0x635, 0xA83, 0xF12, 0x1418, 0x19E3, 0x211A, 0x2BBA, /* 4-bit */ + } ; + + /* Binary search lookup table for quantizing using table_step. */ +-static int table_step_search [] = ++static short table_step_search [] = + { 0, 0x1F6D, 0, -0x1F6D, 0, 0, 0, 0, /* 2-bit */ + 0x1008, 0x1192, 0, -0x219A, 0x1656, -0x1656, 0, 0, /* 3-bit */ + 0x872, 0x1277, -0x8E6, -0x232B, 0xD06, -0x17D7, -0x11D3, 0, /* 4-bit */ +@@ -179,23 +179,23 @@ static sf_count_t nms_adpcm_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) + ** Maps [1,20480] to [1,1024] in an exponential relationship. This is + ** approximately ret = b^exp where b = e^(ln(1024)/ln(20480)) ~= 1.0003385 + */ +-static inline int +-nms_adpcm_antilog (int exp) +-{ int ret ; ++static inline short ++nms_adpcm_antilog (short exp) ++{ int_fast32_t r ; + +- ret = 0x1000 ; +- ret += (((exp & 0x3f) * 0x166b) >> 12) ; +- ret *= table_expn [(exp & 0x7c0) >> 6] ; +- ret >>= (26 - (exp >> 11)) ; ++ r = 0x1000 ; ++ r += (((int_fast32_t) (exp & 0x3f) * 0x166b) >> 12) ; ++ r *= table_expn [(exp & 0x7c0) >> 6] ; ++ r >>= (26 - (exp >> 11)) ; + +- return ret ; ++ return (short) r ; + } /* nms_adpcm_antilog */ + + static void + nms_adpcm_update (struct nms_adpcm_state *s) + { /* Variable names from ITU G.726 spec */ +- int a1ul ; +- int fa1 ; ++ short a1ul, fa1 ; ++ int_fast32_t se ; + int i ; + + /* Decay and Modify the scale factor in the log domain based on the codeword. */ +@@ -222,7 +222,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + else if (fa1 > 256) + fa1 = 256 ; + +- s->a [0] = (0xff * s->a [0]) >> 8 ; ++ s->a [0] = (s->a [0] * 0xff) >> 8 ; + if (s->p [0] != 0 && s->p [1] != 0 && ((s->p [0] ^ s->p [1]) < 0)) + s->a [0] -= 192 ; + else +@@ -230,7 +230,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + fa1 = -fa1 ; + } + +- s->a [1] = fa1 + ((0xfe * s->a [1]) >> 8) ; ++ s->a [1] = fa1 + ((s->a [1] * 0xfe) >> 8) ; + if (s->p [0] != 0 && s->p [2] != 0 && ((s->p [0] ^ s->p [2]) < 0)) + s->a [1] -= 128 ; + else +@@ -250,19 +250,18 @@ nms_adpcm_update (struct nms_adpcm_state *s) + s->a [0] = a1ul ; + } ; + +- /* Compute the zero predictor estimate. Rotate past deltas too. */ +- s->s_ez = 0 ; ++ /* Compute the zero predictor estimate and rotate past deltas. */ ++ se = 0 ; + for (i = 5 ; i >= 0 ; i--) +- { s->s_ez += s->d_q [i] * s->b [i] ; ++ { se += (int_fast32_t) s->d_q [i] * s->b [i] ; + s->d_q [i + 1] = s->d_q [i] ; + } ; ++ s->s_ez = se >> 14 ; + +- /* Compute the signal estimate. */ +- s->s_e = s->a [0] * s->s_r [0] + s->a [1] * s->s_r [1] + s->s_ez ; +- +- /* Return to scale */ +- s->s_ez >>= 14 ; +- s->s_e >>= 14 ; ++ /* Complete the signal estimate. */ ++ se += (int_fast32_t) s->a [0] * s->s_r [0] ; ++ se += (int_fast32_t) s->a [1] * s->s_r [1] ; ++ s->s_e = se >> 14 ; + + /* Rotate members to prepare for next iteration. */ + s->s_r [1] = s->s_r [0] ; +@@ -274,7 +273,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + static int16_t + nms_adpcm_reconstruct_sample (struct nms_adpcm_state *s, uint8_t I) + { /* Variable names from ITU G.726 spec */ +- int dqx ; ++ int_fast32_t dqx ; + + /* + ** The ordering of the 12-bit right-shift is a precision loss. It agrees +@@ -308,17 +307,17 @@ nms_adpcm_codec_init (struct nms_adpcm_state *s, enum nms_enc_type type) + /* + ** nms_adpcm_encode_sample() + ** +-** Encode a linear 16-bit pcm sample into a 2,3, or 4 bit NMS-ADPCM codeword ++** Encode a linear 16-bit pcm sample into a 2, 3, or 4 bit NMS-ADPCM codeword + ** using and updating the predictor state. + */ + static uint8_t + nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl) + { /* Variable names from ITU G.726 spec */ +- int d ; ++ int_fast32_t d ; + uint8_t I ; + + /* Down scale the sample from 16 => ~14 bits. */ +- sl = (sl * 0x1fdf) / 0x7fff ; ++ sl = ((int_fast32_t) sl * 0x1fdf) / 0x7fff ; + + /* Compute estimate, and delta from actual value */ + nms_adpcm_update (s) ; +@@ -407,7 +406,7 @@ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl) + */ + static int16_t + nms_adpcm_decode_sample (struct nms_adpcm_state *s, uint8_t I) +-{ int sl ; ++{ int_fast32_t sl ; + + nms_adpcm_update (s) ; + sl = nms_adpcm_reconstruct_sample (s, I) ; diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb index 9c1f601aab..a9ee7c3575 100644 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb @@ -9,6 +9,7 @@ LICENSE = "LGPL-2.1-only" SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ file://noopus.patch \ + file://cve-2022-33065.patch \ " GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" From patchwork Mon Nov 20 16:38:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C123C5AD4C for ; Mon, 20 Nov 2023 16:39:03 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by mx.groups.io with SMTP id smtpd.web11.598.1700498339414262879 for ; Mon, 20 Nov 2023 08:38:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=W7EDon/4; spf=softfail (domain: sakoman.com, ip: 209.85.167.169, mailfrom: steve@sakoman.com) Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3b512dd7d5bso3312213b6e.1 for ; Mon, 20 Nov 2023 08:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498338; x=1701103138; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=s27ZfjLXWtiyoysZrVfLglopkmUCsaE8tmyvVR1MQmw=; b=W7EDon/4vDHFF2/xnIPOSqYZIVoT8UpQfMa6sYPuN7xDEymWxaqLLqDSvNZzeuoc6K 0OLlzdmZ7yyPaECtaV9qYmF3CpXfKRb29IPRKtGLQS3BksovzX/2ixBWTajZCzmfL5Su AdBx+L+mxdo+j55mTHInieHmarQswh+LVFPQrZKNK4mC1pN528yB6SrQMH8UQMkDcWWu isq/+S4L3ELa0OZi6PtMVtkcViNMO/VYnVQ/7ho5ir6X9wPL5VhIPktdJr9WytlrSJ0z 3mQlrDw4XBNBjyZFGp/P7YmOGpPYs4MBrwzWnW6/fdmLlRQKa1oBJ9vXrtbJDKT3xnB0 zJUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498338; x=1701103138; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s27ZfjLXWtiyoysZrVfLglopkmUCsaE8tmyvVR1MQmw=; b=lFBakOdPgQ8CuCtfFSBT33fvzg/Ws9VD+kuh/vO90MElLEFDut4JJSujtLgb1mtu/T BKQ67mB6FF28BwpJyQRRM8/HBo4jlMU92ngImGVnEfWgqRLzMVUkCpo+FQBlCB2p0ObN MUPCa8InAwdmQoxP6CBNFHaO7+V5S6ZMOq626s6zGXgtdphVM8dy94R8Wp+m3Xfq9epa zdMena0vyZbU4nfbTL1pynaQXyurAtcWH2sVHjkizAuatMcajwVRZIOg58ioY3s5nvOw Zg6V+9Ca7FreZYc3zsafNxoMn00apaXmBMUu6A4R2sy8757uveF8tO+xUPm5AszbafHD y9kA== X-Gm-Message-State: AOJu0YwmAqJj6slWXnO5ABYOTiXiRa5HiXSuT9bkzujQsMwEp2f6dzP2 7Dn7HUSN+I7TEaeRKvuhBw/2ZetZjcqbY9NDIvr+ow== X-Google-Smtp-Source: AGHT+IFxGnNVPCx/ej+vbKb28jxDGumDiCyyz7UhTNYN7X2fE7Z9SK82N9yR+lwxk7PZRpMA1x9Zfg== X-Received: by 2002:a05:6808:1201:b0:3b2:dd87:fc with SMTP id a1-20020a056808120100b003b2dd8700fcmr9834706oil.2.1700498338096; Mon, 20 Nov 2023 08:38:58 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:38:57 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 02/33] ell: upgrade 0.58 -> 0.59 Date: Mon, 20 Nov 2023 06:38:16 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190891 From: Wang Mingyu Changelog: Fix issue with symbol visibility. Signed-off-by: Wang Mingyu Signed-off-by: Luca Ceresoli (cherry picked from commit 14eba663b56f8f3b9c3aff5661cbe2aa7befe86e) Signed-off-by: Steve Sakoman --- meta/recipes-core/ell/{ell_0.58.bb => ell_0.59.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-core/ell/{ell_0.58.bb => ell_0.59.bb} (89%) diff --git a/meta/recipes-core/ell/ell_0.58.bb b/meta/recipes-core/ell/ell_0.59.bb similarity index 89% rename from meta/recipes-core/ell/ell_0.58.bb rename to meta/recipes-core/ell/ell_0.59.bb index 04e8566305..0483dbe582 100644 --- a/meta/recipes-core/ell/ell_0.58.bb +++ b/meta/recipes-core/ell/ell_0.59.bb @@ -15,7 +15,7 @@ DEPENDS = "dbus" inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "531a980589c8954ff12a3110b4d958fa75a74c88ddcc3e2ace4317e76a7c1e9b" +SRC_URI[sha256sum] = "370dc2b7c73cd57856017180a2a70a15ca1b0183bfd453b3cffe2d707c37da3d" do_configure:prepend () { mkdir -p ${S}/build-aux From patchwork Mon Nov 20 16:38:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34864 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 116B3C5AE5C for ; Mon, 20 Nov 2023 16:39:03 +0000 (UTC) Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) by mx.groups.io with SMTP id smtpd.web11.602.1700498342015513713 for ; Mon, 20 Nov 2023 08:39:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=zBMk6Sgu; spf=softfail (domain: sakoman.com, ip: 209.85.166.177, mailfrom: steve@sakoman.com) Received: by mail-il1-f177.google.com with SMTP id e9e14a558f8ab-359c1f42680so12422835ab.2 for ; Mon, 20 Nov 2023 08:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498340; x=1701103140; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bweCzYnmHrUyPnfFF7+12//ohNjOd708tMNRPHLWXe8=; b=zBMk6SgulXdyyi5USqVcKoR7Co18BN/fXxlxGsZGI/XrUmT/otmvhAJelcaFwH90V+ TBsIUPEowAdtBMAhCk4VO8cPDjT0BBwj5pmMr0X5xs+kGhBGhY2rgi3bsncfIt5X9SyH 7+3+AEXFivWygjO6hEgqOuZQL6krkoBnJ66IdweK8YG3hE4/BZKCJLDUPtw3CsJ6MQj6 cRvgODAbf2q68bmJ9kCscy3D1wxv80XSeE3YRkLX8/zM8500MrCCwmWKi9PD+4YiMoVq ljoAluxVAvKZNLhqx20Q/OgjuJWz7GkH/8SG4jzjdzHuTrlIMzUTjvNv1Lk7R11AMAQs ux7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498340; x=1701103140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bweCzYnmHrUyPnfFF7+12//ohNjOd708tMNRPHLWXe8=; b=oeSrOhYwGPXr3gV4k6FS3OYA33jAM2Hgd+J7a9iMmtB6VVwpYxc1DmRpLAjbv0f3mU DCAZoKG5V00aXnpGkEQ+Vy0XWcJBtQlqTvBAzlZ6HOQ63xka3InQkZym2sy4YYpx8nW0 WLRYGYs0ZM55fPxrJsPpMxy/AJgcaBugI5OYjrBio1wZWZZPwQO0LzcSBgKI5U3hWuKw w5prQirtOxjguAn/vYwp2KsksS7jY8PXJxMvrfTXE4Ri8ws+OgzGL+P1DQRb2ixahLGp 8bfLKujobhC8A/f/Udv4xsB6kzf5sJyvp2yA2JyyFGK/pMqLlYqaRBRBVfZk7Qz/PXMG VGrQ== X-Gm-Message-State: AOJu0YyVSA2G+mW03/nhRvw3tArw3oHfVoAqFll1596y+IMfY6B8TPgH zSsoew+CvO2puDzovAr/w90mWTNAa1pjHDDkc9ZtRw== X-Google-Smtp-Source: AGHT+IHy5wtOAnqPqZPq2ET9W3Y8Umb5iJRfcLShUXGx/Rw2mcEwnTg4ePOO45a0GgygT9zDXPnExA== X-Received: by 2002:a05:6e02:ecf:b0:35b:d7a:eb85 with SMTP id i15-20020a056e020ecf00b0035b0d7aeb85mr974360ilk.3.1700498340720; Mon, 20 Nov 2023 08:39:00 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.38.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:00 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 03/33] libsdl2: upgrade 2.28.3 -> 2.28.4 Date: Mon, 20 Nov 2023 06:38:17 -1000 Message-Id: <3923426c799f8772fb84303000d04ac3d968e84f.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190892 From: Wang Mingyu This is a stable bugfix release, with the following changes: Enable clipping for zero sized rectangles in the SDL renderer Notify X11 clipboard managers when the clipboard changes Fixed sensor timestamps for third-party PS5 controllers Added detection for Logitech and Simagic racing wheels Signed-off-by: Wang Mingyu Signed-off-by: Luca Ceresoli (cherry picked from commit f47de111cd66c3f9a5a6d5589e1fd034027a0a75) Signed-off-by: Steve Sakoman --- .../libsdl2/{libsdl2_2.28.3.bb => libsdl2_2.28.4.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-graphics/libsdl2/{libsdl2_2.28.3.bb => libsdl2_2.28.4.bb} (97%) diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.28.3.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.28.4.bb similarity index 97% rename from meta/recipes-graphics/libsdl2/libsdl2_2.28.3.bb rename to meta/recipes-graphics/libsdl2/libsdl2_2.28.4.bb index f866a3618f..3fed10878f 100644 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.28.3.bb +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.28.4.bb @@ -25,7 +25,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz" S = "${WORKDIR}/SDL2-${PV}" -SRC_URI[sha256sum] = "7acb8679652701a2504d734e2ba7543ec1a83e310498ddd22fd44bf965eb5518" +SRC_URI[sha256sum] = "888b8c39f36ae2035d023d1b14ab0191eb1d26403c3cf4d4d5ede30e66a4942c" inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even From patchwork Mon Nov 20 16:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1805C2BB3F for ; Mon, 20 Nov 2023 16:39:12 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mx.groups.io with SMTP id smtpd.web11.604.1700498343783228922 for ; Mon, 20 Nov 2023 08:39:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=pf3vAsIF; spf=softfail (domain: sakoman.com, ip: 209.85.210.179, mailfrom: steve@sakoman.com) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6cb55001124so1249904b3a.0 for ; Mon, 20 Nov 2023 08:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498343; x=1701103143; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=l0WSjumbTbatOiabqm1oeVSAJ3xq68kR9ij0tead1ok=; b=pf3vAsIFColTtzglxuDBn0UYmuvOLD75WNFwW+rJLOLL1soyNbgfUCT3lAe5TiuGpY dAqbhV9DlBXU0fG470Dy6LGBmxDJhaNm6bORY94Q2DinX1xAQnbw/JhyEuATez2evVBL vTB6F2N5c4w8OPf0KnEuFJ/iMU85VgX2QFQr/kBSp1DkVr0zxwxNHH8kSemmc3H+sHtQ 1Z3hsS+1gqe4t5T6tdaBppda8k3gZHPMCAoUdbuS/l1ydItGMNC7R2Y8tcfQ4k7aty6q 5gLxtSmNeqwvRrHOqEsGHh1M9XaLjWq6VGT18H03PF+yiqjt9ALXQ48lZTdlnpNttyLO 902Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498343; x=1701103143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l0WSjumbTbatOiabqm1oeVSAJ3xq68kR9ij0tead1ok=; b=edVdM7ARVbX+BSFOfyevHLDul5NCCYPKOXYr1QmmJNfJaP/fbfOxshWsbKm39A8m+f vlgIGDN3eLPG2IIyndI3BUhS+SnePIuia6czmXOABO8XundNIum7CUuR1Va9YGaMCwi0 7tGv26kGWkpWnysSkHpwYePt8jMn1ZTqMoNqhxMMfKuSctgUMBjoJMlWxOP7cZz4g+tt 4rneCwqGbVLh3Urhh6i0VvPb2uysNbqy70/2caU7539OQ7VmBd4i4g/idJUL8I4lOh1e Bq+p3xS/21gEqN7lMAnCUp2yH9twjQGABXWuU7Uv0UL0zZUCYheymkxwY7aD3bZputP1 yYpA== X-Gm-Message-State: AOJu0Yz6W+nd/BkidlTNdzHi1pq+IoZl8D0E4A5EykjV4DvmDIgY+uJ8 tsWbaKGvYJC11pA//NfZZH+0oKTLpiQfag8rWpTcKQ== X-Google-Smtp-Source: AGHT+IHinn/uYK+r2ax1JKa2AYl7JJ7kf1qLW0p17bYacVj3XpKMlRl3F7GoF/KuHmt+OKRjnJiRwA== X-Received: by 2002:a05:6a20:258d:b0:187:185f:1dbe with SMTP id k13-20020a056a20258d00b00187185f1dbemr8393pzd.11.1700498342708; Mon, 20 Nov 2023 08:39:02 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:02 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 04/33] llvm: Upgrade to 17.0.3 Date: Mon, 20 Nov 2023 06:38:18 -1000 Message-Id: <2c161d842af31b4194d54409bba46cdcc33c1e16.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190893 From: Khem Raj Brings following fixes * 888437e1b600 [asan] Ensure __asan_register_elf_globals is called in COMDAT asan.module_ctor (#67745) * 2e00f4ca4e91 [clang-format][doc] Update the Linux kernel coding style URL * aeb83c3783a6 [clang-format] Fix a serious bug in git-clang-format (#65723) * 268faa377aee [LSan] Mark create_thread_leak.cpp as UNSUPPORTED: darwin. * 491a91e8eea2 [PowerPC] Use zext instead of anyext in custom and combine (#68784) * 8ce6b65c89ad [PowerPC] Add test for #68783 (NFC) * 7a23a5d43c67 [clang-format] Fix a bug in RemoveParentheses: ReturnStatement (#67911) * be4016e52779 [X86] Fix logic for optimizing movmsk(bitcast(shuffle(x))); PR67287 * 496b174053bd [X86] Add tests for incorrectly optimizing out shuffle used in `movmsk`; PR67287 * f50c6382c716 [clang] [MinGW] Explicitly always pass the -fno-use-init-array (#68571) * d10b731adcc8 [LVI][CVP] Treat undef like a full range (#68190) * 37b79e779f44 [X86] combineConcatVectorOps - only concatenate single-use subops * 5a13ce2d6020 Bump version to 17.0.3 * e7b3b94cf500 [clang] Correct behavior of `LLVM_UNREACHABLE_OPTIMIZE=OFF` for `Release` builds (#68284) * f0a687d821c1 [LLD] [COFF] Fix handling of comdat .drectve sections (#68116) * 8a8ade49ff49 workflows/release-binaries: Use more cores to avoid the 6 hour timeout (#67874) * 1090b91a2840 [AArch64] Disable loop alignment for Windows targets (#67894) * 69c8c96691c7 [Sema] Use underlying type of scoped enum for -Wformat diagnostics (#67378) * b2417f51dbbd (tag: llvmorg-17.0.2) Fix release/export.sh to export runtimes tarball, too (#67404) * 23988a1d82d5 [libc++] Fix `std::pair`'s pair-like constructor's incorrect assumption (#66585) * 33e14ecd6aac [CodeGen] Don't treat thread local globals as large data (#67764) * 03f797b51df6 [workflow] Fix abi checker in llvm-tests. Same fix as in 99fb0af80d16b0ff886f032441392219e1cac452 (#67957) * f6cf58eed973 [clang] [MinGW] Tolerate mingw specific linker options during compilation (#67891) * b338a2830a2c [LLD] [COFF] Restore the current dir as the first entry in the search path (#67857) * 6a5be8e95b43 [LLD] [COFF] Clarify -print-search-path for the empty string element (#67856) * 71be0aafe357 [NFC] clang-format lld/COFF/Driver.cpp and lld/Common/Filesystem.cpp * 0a2d7dae6ef2 [compiler-rt] Reinstate removal of CRT choice flags from CMAKE_*_FLAGS* (#67935) * 098e653a5bed [MemCpyOpt] Merge alias metadatas when replacing arguments (#67539) * 78d201ebc3e2 [MemCpyOpt] Add test for #67539 (NFC) * e718f3240a57 [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (#66122) * 45066b9fbc7b [Sema] Fix fixit cast printing inside macros (#66853) * 87ec1f460d0e Work around two more instances of __noinline__ conflicts. (#66138) * 9da5b7a93bca [lldb] Fix building LLDB standlone without framework * c056d720b534 [lldb][NFCI] Change logic to find clang resource dir in standalone builds * cb23434f9e63 [XCOFF] Do not generate the special .ref for zero-length sections (#66805) * 1b55dc9d94c3 Fix buildbot failure caused by D157623 * 28d81a2bfa0a [lld][COFF] Remove incorrect flag from EHcont table * b7eba056b93c workflows/release-tasks: Setup FileCheck and not for release-lit (#66799) * 9678f11b057c [StackColoring] Handle fixed object index * 49e9ee190080 [StackColoring] Handle SEH catch object stack slots conservatively * 17123a60b87c [X86] Add test for #66984 (NFC) * 2839aa915066 [SimpleLoopUnswitch] Fix exponential unswitch * 773f136d6faa [SimpleLoopUnswitch] Fix reversed branch during condition injection * 4362f3e4cf48 [clang] Include `expected-no-diagnostics` in newly-added test (NFC) * 5f1fcc43e592 [clang] Bail out when handling union access with virtual inheritance * 178cf5bc8732 [clang][Diagnostics] Fix wrong line number display (#65238) * 25a150b830f6 Revert "[InlineCost] Check for conflicting target attributes early" Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni (cherry picked from commit 8cfb833b66e514ea911aa4fbdc72592a06233f68) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/llvm/llvm_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 934f842b90..bd2ef0ebec 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb @@ -14,14 +14,14 @@ RDEPENDS:${PN}:append:class-target = " ncurses-terminfo" inherit cmake pkgconfig -PV = "17.0.2" +PV = "17.0.3" MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}" LLVM_RELEASE = "${PV}" BRANCH = "release/${MAJOR_VERSION}.x" -SRCREV = "481358974fb0f732e33d503c224492a543f4d7bd" +SRCREV = "888437e1b60011b8a375dd30928ec925b448da57" SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \ file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ From patchwork Mon Nov 20 16:38:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDEDAC5AD4C for ; Mon, 20 Nov 2023 16:39:12 +0000 (UTC) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mx.groups.io with SMTP id smtpd.web11.605.1700498345837288712 for ; Mon, 20 Nov 2023 08:39:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=uWMHbtMP; spf=softfail (domain: sakoman.com, ip: 209.85.215.174, mailfrom: steve@sakoman.com) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-5bdbe2de25fso3479051a12.3 for ; Mon, 20 Nov 2023 08:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498345; x=1701103145; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Dt+6xK7m0HB0zR3TtULzv01e+CP+7D2CUDO0/QZuuDk=; b=uWMHbtMPGRjp3sMQVj+i2q9oqo+DzIUnSeZ1B1eh5xDlXPj4OigqE1YonqcBhYXTST XGsV2jVfC2jUh0vTFw2PFRe5z5eZTm3By0tQsyYyBo3ce71Pv/AP+Qail+2BQuYjTyND G8cC6oeFR8WbXGaxQ9++fgO1tq4Stf9SJetnCrFEZwFSu6l8KFI6cX0lXCL8P8PFyFSo zBZJEzEN1hxw7vP2cBUbNKx1NUxmb9sHUECZPD5gmlegAYsGfV+bLSSnqnbV7sy+eiyA eTa8/bklmUciCFH4kpCMi99VV+t/977fTQ66dBjOcqC7/qkVprA4ZOX/mLiWrzIvqjdB 8W9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498345; x=1701103145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dt+6xK7m0HB0zR3TtULzv01e+CP+7D2CUDO0/QZuuDk=; b=apeqEZerNZfl0UNzKF2if0QqwOM1otzbfN5fJU/22T3VYLKotS9lK+ef12gITSWDWc RtZeYiBwA+LBKul8q2e1fhc1mt7Z2mQXkwoHm5O2F/Apo+BnAsOAJmykivYUkCl7z1xQ blWk3meE77RC5jQxyPGYlFatMaDMX6yWCTdIVxAy/NpGaMoaZJ751cRGfibQwkjlrjOp FZIIc++QLGH1jojoTlZQ7M/zJleLzkU9i84FjMsowFeGwVmPo/gRq6piADtR0st+R9Rn zlIrqqoU2T8kTYrrh94i3k7n7cvYb8FMRKMSI1fegA9sdtGlW5F/6htYyg2vJAIcsLl6 R7xA== X-Gm-Message-State: AOJu0YxoXCzlsiJ8JlRPG2mvRBrgjTEbHUqyl2bpYWtVPz9R6W6VevpP fXDaZ1znorcYwzHQRbp8Tjtv5Oqnf9EMqQJT0FAWMA== X-Google-Smtp-Source: AGHT+IFqRMokgdof1Pdorszxc3/Hpb9iktjeiZe6OkuNe0l6bbuHVPnUhpa50Sydxph6G7SHsenPHA== X-Received: by 2002:a05:6a21:99a4:b0:140:f6c4:aa71 with SMTP id ve36-20020a056a2199a400b00140f6c4aa71mr10825663pzb.8.1700498344638; Mon, 20 Nov 2023 08:39:04 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:04 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 05/33] openssl: Upgrade 3.1.3 -> 3.1.4 Date: Mon, 20 Nov 2023 06:38:19 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190894 From: Peter Marko https://github.com/openssl/openssl/blob/openssl-3.1/NEWS.md#major-changes-between-openssl-313-and-openssl-314-24-oct-2023 Major changes between OpenSSL 3.1.3 and OpenSSL 3.1.4 [24 Oct 2023] * Mitigate incorrect resize handling for symmetric cipher keys and IVs. (CVE-2023-5363) Signed-off-by: Peter Marko Signed-off-by: Richard Purdie (cherry picked from commit 104ba16de434a08b0c8ba4208be187f0ad1a2cf8) Signed-off-by: Steve Sakoman --- .../openssl/{openssl_3.1.3.bb => openssl_3.1.4.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-connectivity/openssl/{openssl_3.1.3.bb => openssl_3.1.4.bb} (99%) diff --git a/meta/recipes-connectivity/openssl/openssl_3.1.3.bb b/meta/recipes-connectivity/openssl/openssl_3.1.4.bb similarity index 99% rename from meta/recipes-connectivity/openssl/openssl_3.1.3.bb rename to meta/recipes-connectivity/openssl/openssl_3.1.4.bb index cc9452c8ab..b1d5d8766f 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.1.3.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.1.4.bb @@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \ file://environment.d-openssl.sh \ " -SRC_URI[sha256sum] = "f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6" +SRC_URI[sha256sum] = "840af5366ab9b522bde525826be3ef0fb0af81c6a9ebd84caa600fea1731eee3" inherit lib_package multilib_header multilib_script ptest perlnative manpages MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" From patchwork Mon Nov 20 16:38:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34868 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D53E9C5AE5B for ; Mon, 20 Nov 2023 16:39:12 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web11.607.1700498348310978668 for ; Mon, 20 Nov 2023 08:39:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=P2PMn21k; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6c398717726so3779035b3a.2 for ; Mon, 20 Nov 2023 08:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498347; x=1701103147; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Oun6cxPsyO3QlxrANh0Mmz9gWFnoTUTWT1pXlaOodIU=; b=P2PMn21kDlyaQVSHVvsAEol3IQne1qNf5WSaUsrlsc9jU94uLsGTM0VpWAe+7K/yem XTtAsT82qrLQHg8Y9VJxGowe7b6TK3DFQQwhlUcbgyAcvtVUKSpF4uSXZczZXXEtBGHy YjbM63aeTdSofCIaTJQryVtemUjHFKlhbzvY0GpvyM2VWm6v3PBMToH5pOOnzIipERu2 +H1ATWPSGB0JNq2oFvlNXKoWc/xdofs+nqG4WD7SLcATKFfavM4jUWgxTyPMPGgiStW2 SVXFRfxCfRsPVJv/Aq6mFSmtf1oDcMkCzZ3Yq21P9OGHYbv4cbUDAhooN79KvG77O3KD uT3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498347; x=1701103147; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oun6cxPsyO3QlxrANh0Mmz9gWFnoTUTWT1pXlaOodIU=; b=xHjN0+4XYLwiaOy/IYCixiFV2Ev8SGnz8fH4CBp9I8/lSL6LKQU7fLScLOUeLeeVuK tsPt36HshvRKJAguX/foDVZbA4Sv7CSifctRvt9XldS9o/h4cnKl0lwr6Co2nWzMgIZH Zfzi+hWY9YPgbH3Zraa3p3tjhvCwYc3+HlaxhnRSBo9hlh0AWrugy/vIvmvN1ku7mr94 C6+V5EGarUwYcgb3PHj1LoWjB/LSE3K+sYO8axqmtvIjwsc2Z/UKysadub+rkcOo9EQe qoP8UdGn8hVIngUcNgON2KQKejgLgdtZ6Nx5CvgaTP09EGLtDyH6YzMjn+RPUukGLkR7 xNMQ== X-Gm-Message-State: AOJu0Ywf4FFj5jVxGklsfZtYyNjeo84auFGc/upQ/A1Z2wmAqg6mbOhm TMP47HCDVzNmFISxlmk0zZYLI9lLJxadHKt0Cv7xyQ== X-Google-Smtp-Source: AGHT+IGSaQGBEm+xTPEuEf5N5LVTH7tHbRZes/61X4VeZwq0KTZ+CaP2/HOGG1jSi9PfWKZYqUhi0g== X-Received: by 2002:a05:6a00:f07:b0:6cb:b818:c7fc with SMTP id cr7-20020a056a000f0700b006cbb818c7fcmr1062172pfb.23.1700498347043; Mon, 20 Nov 2023 08:39:07 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:06 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 06/33] goarch: Move Go architecture mapping to a library Date: Mon, 20 Nov 2023 06:38:20 -1000 Message-Id: <5e0267aeb7d9f575f270f6856a67ac62ce8a0f71.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190895 From: Joshua Watt Other spaces uses the Go architecture definitions as their own (for example, container arches are defined to be Go arches). To make it easier for other places to use this mapping, move the code that does the translation of OpenEmbedded arches to Go arches to a library. Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie (cherry picked from commit 3e86f72fc2e1cc2e5ea4b4499722d736941167ce) Signed-off-by: Steve Sakoman --- meta/classes-recipe/goarch.bbclass | 29 +++---------------------- meta/lib/oe/__init__.py | 2 +- meta/lib/oe/go.py | 34 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 meta/lib/oe/go.py diff --git a/meta/classes-recipe/goarch.bbclass b/meta/classes-recipe/goarch.bbclass index 5fb6051bde..1ebe03864f 100644 --- a/meta/classes-recipe/goarch.bbclass +++ b/meta/classes-recipe/goarch.bbclass @@ -68,33 +68,10 @@ SECURITY_NOPIE_CFLAGS ??= "" CCACHE_DISABLE ?= "1" def go_map_arch(a, d): - import re - if re.match('i.86', a): - return '386' - elif a == 'x86_64': - return 'amd64' - elif re.match('arm.*', a): - return 'arm' - elif re.match('aarch64.*', a): - return 'arm64' - elif re.match('mips64el.*', a): - return 'mips64le' - elif re.match('mips64.*', a): - return 'mips64' - elif a == 'mips': - return 'mips' - elif a == 'mipsel': - return 'mipsle' - elif re.match('p(pc|owerpc)(64le)', a): - return 'ppc64le' - elif re.match('p(pc|owerpc)(64)', a): - return 'ppc64' - elif a == 'riscv64': - return 'riscv64' - elif a == 'loongarch64': - return 'loong64' - else: + arch = oe.go.map_arch(a) + if not arch: raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a) + return arch def go_map_arm(a, d): if a.startswith("arm"): diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py index da7cbab308..6eb536ad28 100644 --- a/meta/lib/oe/__init__.py +++ b/meta/lib/oe/__init__.py @@ -9,4 +9,4 @@ __path__ = extend_path(__path__, __name__) BBIMPORTS = ["data", "path", "utils", "types", "package", "packagedata", \ "packagegroup", "sstatesig", "lsb", "cachedpath", "license", \ - "qa", "reproducible", "rust", "buildcfg"] + "qa", "reproducible", "rust", "buildcfg", "go"] diff --git a/meta/lib/oe/go.py b/meta/lib/oe/go.py new file mode 100644 index 0000000000..dfd957d157 --- /dev/null +++ b/meta/lib/oe/go.py @@ -0,0 +1,34 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +import re + +def map_arch(a): + if re.match('i.86', a): + return '386' + elif a == 'x86_64': + return 'amd64' + elif re.match('arm.*', a): + return 'arm' + elif re.match('aarch64.*', a): + return 'arm64' + elif re.match('mips64el.*', a): + return 'mips64le' + elif re.match('mips64.*', a): + return 'mips64' + elif a == 'mips': + return 'mips' + elif a == 'mipsel': + return 'mipsle' + elif re.match('p(pc|owerpc)(64le)', a): + return 'ppc64le' + elif re.match('p(pc|owerpc)(64)', a): + return 'ppc64' + elif a == 'riscv64': + return 'riscv64' + elif a == 'loongarch64': + return 'loong64' + return '' From patchwork Mon Nov 20 16:38:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34870 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1A3BC5AE5C for ; Mon, 20 Nov 2023 16:39:12 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web11.609.1700498350082406085 for ; Mon, 20 Nov 2023 08:39:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=CtWGaOzV; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6b7f0170d7bso4384612b3a.2 for ; Mon, 20 Nov 2023 08:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498349; x=1701103149; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aP8rMIa0oJJgjF57nUR5wRFxe3CR61hJDAIlAl6krQc=; b=CtWGaOzV7UT2c32qB6B5OaQSra5x/tW/t5kIFQ0S/7ngdolEd9j7urwPUg8jB5GD87 Qgx2iIOMD8QxR37dLiaA1NLFdKrWC7HL6KdA1tz7b3K4rsIwn5MLAyq1bq5cdLNjX5yp nr+ZtRxX6+fMF/ZYtsE+zEf1PfOYMm7k+ZXjb8Zhn6HduD7rHKgOmIfUzMsSmuyZGPvw WVZ/sYEQ4s6YS633x7hskURZjs6oh3RRUsmLZpIZNwfS19dqn7TSTy/XfvGADAEFTBno PZ+V+g9Y+ynTEjZXY0KLU8359xg7/XjCE/uCJ6xYD3/Y2aTnW+fVTtJaVkCyMg7g5js/ kItg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498349; x=1701103149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aP8rMIa0oJJgjF57nUR5wRFxe3CR61hJDAIlAl6krQc=; b=AUiKn/SOwGZ8uvR/p/qmLFi5Z0wdf22lRG+ofhvRnSD+7sOEgtclL30/CFr71OaP7s YgmeY5BXie2/sapKYiFyJaFObQLPlZP7Uc51AljaDrFOXhJFEOK3dAWhMTNLKGCvyzl9 RQB2V5BZ68MJCn4CgOGPaEigdiCUmGM8P/sLD5/Pq4IFAzYGAVqLyCOcUwuSuhsL8l30 bHmIh5FJesEJ+E3T9n07R9GA/z6snYIOnDK3N4lKQKzYdP1Xf3j5GZNFr8QU9IzcEj/7 bFycZEHqbjT/fyosYbu1ad2vjAnoHqQqdPbO8DGqxGfgm0mHePhWyb5Pu+G/s7p4H5L8 T/sw== X-Gm-Message-State: AOJu0YzFkiYN7cvY2mRSsvBba5Pvi9hJx0h4+sKoUbIzoSaLRsss2YkW AqG04y1/cClR5qd8FxJ5v1n99lqRbr2CBI0osJrebQ== X-Google-Smtp-Source: AGHT+IHv48ISfnGZf33FCDw7k4gawc8S7zHXygKzENW9ctEQN8Ask1/LHKxvbUJelpPnVydfx47Pxw== X-Received: by 2002:a05:6a21:168b:b0:186:ff2d:f964 with SMTP id np11-20020a056a21168b00b00186ff2df964mr11132603pzb.36.1700498349174; Mon, 20 Nov 2023 08:39:09 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:08 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 07/33] perl: fix intermittent test failure Date: Mon, 20 Nov 2023 06:38:21 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190896 From: William Lyu Fixes [YOCTO #15136] This fix addresses the intermittent failure of the Perl ptest t/op/sigsystem.t. Signed-off-by: William Lyu Signed-off-by: Randy MacLeod Reported-by: Alexandre Belloni Signed-off-by: Luca Ceresoli (cherry picked from commit 8c1ee92efa107ed055f1737640a027fa89077494) Signed-off-by: Steve Sakoman --- ...ent-failure-of-test-t-op-sigsystem.t.patch | 77 +++++++++++++++++++ meta/recipes-devtools/perl/perl_5.38.0.bb | 1 + 2 files changed, 78 insertions(+) create mode 100644 meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch diff --git a/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch b/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch new file mode 100644 index 0000000000..86fd42cd3d --- /dev/null +++ b/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch @@ -0,0 +1,77 @@ +From 75d974a58c461b3b5d35280e497810e46abae4ca Mon Sep 17 00:00:00 2001 +From: William Lyu +Date: Wed, 4 Oct 2023 08:58:41 -0400 +Subject: [PATCH] Fix intermittent failure of test t/op/sigsystem.t + +[Perl issue #21546] -- https://github.com/Perl/perl5/issues/21546 + +This fix addresses the intermittent failure of the test +t/op/sigsystem.t by improving its robustness. Before the fix, this +test waits a hard-coded amount of time in the parent process for the +child process to exit, and the child process may not be able to exit +soon enough. With this fix, the parent process in this test polls for +whether the SIGCHLD handler reaped the child process for at most 25 +seconds. + +Upstream-Status: Backport [commit ID: 75d974a] + +Signed-off-by: William Lyu +Signed-off-by: Randy MacLeod +Reported-by: Alexandre Belloni + +Committer: William Lyu is now a Perl author. +--- + AUTHORS | 1 + + t/op/sigsystem.t | 17 ++++++++++++++--- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 21948bfdc7..527dd992fd 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -1443,6 +1443,7 @@ Wayne Scott + Wayne Thompson + Wilfredo Sánchez + William J. Middleton ++William Lyu + William Mann + William Middleton + William R Ward +diff --git a/t/op/sigsystem.t b/t/op/sigsystem.t +index 25da854902..831feefb0f 100644 +--- a/t/op/sigsystem.t ++++ b/t/op/sigsystem.t +@@ -37,7 +37,15 @@ SKIP: { + test_system('with reaper'); + + note("Waiting briefly for SIGCHLD..."); +- Time::HiRes::sleep(0.500); ++ ++ # Wait at most 50 * 0.500 = 25.0 seconds for the child process to be ++ # reaped. If the child process exits and gets reaped early, this polling ++ # loop will exit early. ++ ++ for (1..50) { ++ last if @pids; ++ Time::HiRes::sleep(0.500); ++ } + + ok(@pids == 1, 'Reaped only one process'); + ok($pids[0] == $pid, "Reaped the right process.") or diag(Dumper(\@pids)); +@@ -50,8 +58,11 @@ sub test_system { + my $got_zeroes = 0; + + # This test is looking for a race between system()'s waitpid() and a +- # signal handler. Looping a few times increases the chances of +- # catching the error. ++ # signal handler. The system() call is expected to not interfere with the ++ # SIGCHLD signal handler. In particular, the wait() called within system() ++ # is expected to reap the child process forked by system() before the ++ # SIGCHLD signal handler is called. ++ # Looping a few times increases the chances of catching the error. + + for (1..$expected_zeroes) { + $got_zeroes++ unless system(TRUE); +-- +2.25.1 + diff --git a/meta/recipes-devtools/perl/perl_5.38.0.bb b/meta/recipes-devtools/perl/perl_5.38.0.bb index 956e4d64d7..639664e355 100644 --- a/meta/recipes-devtools/perl/perl_5.38.0.bb +++ b/meta/recipes-devtools/perl/perl_5.38.0.bb @@ -17,6 +17,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \ file://0002-Constant-Fix-up-shebang.patch \ file://determinism.patch \ file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \ + file://0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch \ " SRC_URI:append:class-native = " \ file://perl-configpm-switch.patch \ From patchwork Mon Nov 20 16:38:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34866 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C028EC197A0 for ; Mon, 20 Nov 2023 16:39:12 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web10.591.1700498351986890251 for ; Mon, 20 Nov 2023 08:39:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=gZsLLyEb; spf=softfail (domain: sakoman.com, ip: 209.85.210.177, mailfrom: steve@sakoman.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6c398717726so3779077b3a.2 for ; Mon, 20 Nov 2023 08:39:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498351; x=1701103151; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YdDvndDseUExXGRZlFkhZEBS+ic/MqYkvuP5qgjhopg=; b=gZsLLyEbvqicqzHUDIPuJcIVwkJsXIRcUgRYhXPoskZqnA7kwGm/JOMwuQPP8/rvTb YYf+H3joaQw7+87Zx/O1lKowxhxXeZgin3HSP1Rdn43ycmKFE8F/vImPEJq1jAjf/1IP xKRujUhLnqjwSYtLrMP3MjpY+ulPiPPpURjoOpmwZvPSuRusl+KWao2RTBQcxf3nLlNr COaCFBNgDoa6WJsxkAYvcdWLwIQev9B/fxZ1TDg6Egy9dibIGe3CemFbn+sWbEpkx+cA fmBhS1Bqc08CYlJA7ulnPZqtIPtKINOZoYSnR6Zbb0Vw3bFiQYXi/uHoFcC5yC9Y+7Ls iVtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498351; x=1701103151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YdDvndDseUExXGRZlFkhZEBS+ic/MqYkvuP5qgjhopg=; b=sUnASyAcN3jrxBmAKv3AtVbGwy3fhwELilRirLOrBL0aHNS675ti0Ippgga0YnVW3V jQz0JFrrHtP3DTuS8vrRFohVljU4qIu09Dzs9D0s4ciuRU3ommhiYCk7jChyT18dU4t8 sNbsbMs3NIOPrLx5GcclrP5eXoU2UX69N6EyRfxGb9yup4jsiu7z/t0dTIjVBLiyxFt+ 4sdcozeLtc3f7CCiYXkls0wGmUZpV9DRIyf0mltbXHL81+sdwdXDo4pH9GdDEC2NlxRe tJdDzccGQ9e+ZeOBgFHEyntvwUwbqzLFd0t3ZWlTDLYILMGbAExJkc6wMvT9pG7M/nEX iTpg== X-Gm-Message-State: AOJu0YzmTF17QNkhmYWxlopT+lBDa/h4UxdEL5cSnY4pLEJ6uI2XtgXh X/twR5mLQGRN7Y4ijmFDSbeF2nMrxR7jqfdESrlUCQ== X-Google-Smtp-Source: AGHT+IEQk7cv3AMXntirEMBb48gAGCMGIMGAol6lRhrAFPJNmqFaPGRcON/a00+WmcZEkxXl4OMgLw== X-Received: by 2002:a05:6a20:c184:b0:187:a75d:29db with SMTP id bg4-20020a056a20c18400b00187a75d29dbmr7595339pzb.27.1700498351150; Mon, 20 Nov 2023 08:39:11 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:10 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 08/33] Revert "bin_package.bbclass: Inhibit the default dependencies" Date: Mon, 20 Nov 2023 06:38:22 -1000 Message-Id: <47b436c42ba1ef3b24e8fe48c7ea274b1a53a60e.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190897 From: Max Krummenacher This reverts commit d1d09bd4d7be88f0e341d5fccbfbefeb98d4b727. The commit not only removes the dependencies on the cross compiler but also does not depend on e.g. virtual/${TARGET_PREFIX}compilerlibs and virtual/libc which in turn makes the file-rdeps qa check fail if installing binaries linked against e.g. libc or libstdc++. Signed-off-by: Max Krummenacher Signed-off-by: Richard Purdie (cherry picked from commit ababf6ceebe360c5f59a57428566c27b7a97a9e6) Signed-off-by: Steve Sakoman --- meta/classes-recipe/bin_package.bbclass | 3 --- 1 file changed, 3 deletions(-) diff --git a/meta/classes-recipe/bin_package.bbclass b/meta/classes-recipe/bin_package.bbclass index 9dd2489725..3a1befc29c 100644 --- a/meta/classes-recipe/bin_package.bbclass +++ b/meta/classes-recipe/bin_package.bbclass @@ -20,9 +20,6 @@ # they would be in ${WORKDIR}. # -# Nothing is being built so there is no need for the cross-compiler. -INHIBIT_DEFAULT_DEPS = "1" - # Skip the unwanted steps do_configure[noexec] = "1" do_compile[noexec] = "1" From patchwork Mon Nov 20 16:38:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34874 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7DAAC5AE5C for ; Mon, 20 Nov 2023 16:39:22 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web10.596.1700498354523683027 for ; Mon, 20 Nov 2023 08:39:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=kziZHxJp; spf=softfail (domain: sakoman.com, ip: 209.85.210.173, mailfrom: steve@sakoman.com) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6cb55001124so1250037b3a.0 for ; Mon, 20 Nov 2023 08:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498353; x=1701103153; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qLvvcZQl0NYNGQszSC6Ml60jQAnbEFidx1FBeBPU7gY=; b=kziZHxJpof3ZwvdgvKwzeoouWJ/JASn3qMhNfg/XtDxqXWL9MM57aM0VOo/TvGUcop CY03zJYtwaEfR18gtvzK3a9yyMo77vqqJ0Nkc6kMmNnji4inUcdX+CsKpsiaHuGOASkF 018dfxsumQIyQ1nfolv/HPTKIJMbICtQW4FXbiiHkMTmWly6O7WM07iYVK1S1JY/hJmh Iewdd00mF3HDvUPrTg0KDJzS0x8QpkYJGgUA5U3Mqt48QC6m32DqTh/0K+8GMLUNZqGg BxVkb8cy+pr9/DSCW0wshotQTFnUP8vi5RSMleqOuhuPekjM+XMJbePSIvAnoCdv8r/w NtHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498353; x=1701103153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qLvvcZQl0NYNGQszSC6Ml60jQAnbEFidx1FBeBPU7gY=; b=gHgtSmzqRKlA4uwpRcxpHN49wSfB1uX+xx6w14Hiv2PHsGGmgWEgoFPMhCB3/sUfU9 rvo3oQjlSIrz9zCONrit5KuAItBmZ3/9xR9GQTfieCZfceaSHmyS2AlOWnW7MlPCRWp1 bpb/RBZzxnxU5wA2r7Bb4hnLmQwO2V91tXat+TvbNls8l/f3LSSPgRjO1ziI4+AMpNm/ ICo20WuaXu9CJ550BEZ5jGgh2RGEiaNLjim5J/moTGKqELM8Ak8elmKz+SgIPfBc6/wM eF5bSAfUk1L8IBQUJ4NdFn/m4XT8iWbXoL+Mz1+aBmZGyhKyZMXwo4MCDCMpGiScVOvU HaoA== X-Gm-Message-State: AOJu0Yyk2WgE4Gadgoscz+6Pr/RlSF+pT6Xl1KPK3mOm81uXshG951K6 5uFIBXCg8GFs0b4ZGRO3msrWYzOQ9vsCcO85iKADVw== X-Google-Smtp-Source: AGHT+IH7GAWA27KUBbqi3aMNMTiAJW5vnaFCFFK7MSO8pFZqZH1/2Gcx1vKpVRev+P7ByLOQ4thv6w== X-Received: by 2002:a05:6a20:6a0b:b0:187:b2cb:2b0f with SMTP id p11-20020a056a206a0b00b00187b2cb2b0fmr12216pzk.8.1700498353078; Mon, 20 Nov 2023 08:39:13 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:12 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 09/33] oeqa/ssh: Handle SSHCall timeout error code Date: Mon, 20 Nov 2023 06:38:23 -1000 Message-Id: <82215c855ee39b4e39f24113241a7fb3f20f9531.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190898 From: luca fancellu The current code in ssh.py is terminating the ssh process that does not finish its computation in a given timeout (when timeout is passed), the SSHCall function is returning the process error code. The Openssl ssh before version 8.6_p1 is returning 0 when it is terminated, from commit 8a9520836e71830f4fccca066dba73fea3d16bda onwards (version >= 8.6_p1) ssh is returning 255 instead. So for version of ssh older than 8.6_p1 when the SSHCall time out, the return code will be 0, meaning success, which is wrong. Fix this issue checking if the process has timeout (hence it's been terminated) and checking if the returned code is 0, in that case set it to 255 to advertise that an error occurred. Add a test case excercising the timeout in the SSHTest, test_ssh test function. Signed-off-by: Luca Fancellu Signed-off-by: Alexandre Belloni (cherry picked from commit 948fecca1db4c7a30fcca5fcf5eef95cd12efb00) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/core/target/ssh.py | 17 ++++++++++++++++- meta/lib/oeqa/runtime/cases/ssh.py | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index f22836d390..f4dd0ca417 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -232,11 +232,12 @@ def SSHCall(command, logger, timeout=None, **opts): output_raw = b'' starttime = time.time() process = subprocess.Popen(command, **options) + has_timeout = False if timeout: endtime = starttime + timeout eof = False os.set_blocking(process.stdout.fileno(), False) - while time.time() < endtime and not eof: + while not has_timeout and not eof: try: logger.debug('Waiting for process output: time: %s, endtime: %s' % (time.time(), endtime)) if select.select([process.stdout], [], [], 5)[0] != []: @@ -257,6 +258,10 @@ def SSHCall(command, logger, timeout=None, **opts): logger.debug('BlockingIOError') continue + if time.time() >= endtime: + logger.debug('SSHCall has timeout! Time: %s, endtime: %s' % (time.time(), endtime)) + has_timeout = True + process.stdout.close() # process hasn't returned yet @@ -293,6 +298,16 @@ def SSHCall(command, logger, timeout=None, **opts): pass process.wait() + if has_timeout: + # Version of openssh before 8.6_p1 returns error code 0 when killed + # by a signal, when the timeout occurs we will receive a 0 error + # code because the process is been terminated and it's wrong because + # that value means success, but the process timed out. + # Afterwards, from version 8.6_p1 onwards, the returned code is 255. + # Fix this behaviour by checking the return code + if process.returncode == 0: + process.returncode = 255 + options = { "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, diff --git a/meta/lib/oeqa/runtime/cases/ssh.py b/meta/lib/oeqa/runtime/cases/ssh.py index 13aac54396..cdbef59500 100644 --- a/meta/lib/oeqa/runtime/cases/ssh.py +++ b/meta/lib/oeqa/runtime/cases/ssh.py @@ -13,6 +13,9 @@ class SSHTest(OERuntimeTestCase): @OETestDepends(['ping.PingTest.test_ping']) @OEHasPackage(['dropbear', 'openssh-sshd']) def test_ssh(self): + (status, output) = self.target.run('sleep 20', timeout=2) + msg='run() timed out but return code was zero.' + self.assertNotEqual(status, 0, msg=msg) (status, output) = self.target.run('uname -a') self.assertEqual(status, 0, msg='SSH Test failed: %s' % output) (status, output) = self.target.run('cat /etc/controllerimage') From patchwork Mon Nov 20 16:38:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34872 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6832C5AE5B for ; Mon, 20 Nov 2023 16:39:22 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by mx.groups.io with SMTP id smtpd.web11.619.1700498356503054090 for ; Mon, 20 Nov 2023 08:39:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=rqTn2U9f; spf=softfail (domain: sakoman.com, ip: 209.85.167.169, mailfrom: steve@sakoman.com) Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3b6d88dbaa3so3045419b6e.1 for ; Mon, 20 Nov 2023 08:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498355; x=1701103155; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=utgOX76huIwlfXXkDFEn5LHemJ5rhnFRTvYSeQBqqHk=; b=rqTn2U9fv4dnDhFS8HikUuqD1xntk7ESNsRO6tWuEKeiP59oFV3Vz23RhjQwx96S83 x1uPJrJoGYd3LnpUvfhYm1I5ySnUKKvnA1PGCZEbRT35lICrx5DNw6GNoyFdsANA11x7 uvnCbS/FnbI/KuFmSDHZxRQPKmzgxDOQEYEBpLZYuXQJCENtNcNvUFvXW2YLv6moMvmH KP2JOcW++nHtJv6Uyf85kZLy15xUgsvE8sVEJHvTJHktSm/I7qaIoziKwVqS5WQ/G1BE zg3q4RPiVZXMHvGm/pmkHg29r7NiRTV44wp95UzqhjtR/4OUq+UifJoQUDfDPznWhMX2 oV9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498355; x=1701103155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=utgOX76huIwlfXXkDFEn5LHemJ5rhnFRTvYSeQBqqHk=; b=h3c+s9y7YO8nEh/yEoJJpOKxKHbBQdYIrutJmVWCFvywCGiO/b1r6CfqGTDEsafnIx QoUBRalKoKUZqyibaBUK327wtmRrgJP9g6OK8TDb9v5hvOKQqYq5qHZ9pu2Fh08zzVg7 /rpWCzO/oLkX0+b+7kqy6/EiDsW+GAIc7OwSmeIMv7dV6s/Ijfnux79m1s4DL5of85y2 YGYuK39pryWVFjCtVs7pjqxbxpDA5X5JMgczAOmiKih7/X4OBFTarq42NIs3VhsqHdOS x1I+Jhp4N0bX7KSqsFvR2j2LRBGufb2yhYfksQFeO+DyUNA6LDNexM/32MsaxZFGGcWC uHhg== X-Gm-Message-State: AOJu0Yz6NW9nVzvy3c7Bj7N6iKYxlaRgElkVHbMGoKzgCKO8Uyxq4hp9 +nURNO2ctIwlhiF83wMPE15Ew1p0II/z8+RiCRIVhw== X-Google-Smtp-Source: AGHT+IE6vdr3WXcqgRfVrCVCp6KlFb91fRY/AJnIROTcM6SlQfRgntgDcrQP+BYDLxT8uVjbmhDp1Q== X-Received: by 2002:a05:6808:2392:b0:3af:9851:4d32 with SMTP id bp18-20020a056808239200b003af98514d32mr11143343oib.7.1700498355196; Mon, 20 Nov 2023 08:39:15 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:14 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 10/33] bb-matrix-plot.sh: Show underscores correctly in labels Date: Mon, 20 Nov 2023 06:38:24 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190899 From: Peter Kjellerstedt Underscores previously caused the next character in the label to be printed using subscript due to the enhanced string support in gnuplot. Signed-off-by: Peter Kjellerstedt Signed-off-by: Alexandre Belloni (cherry picked from commit 282b48f90f77e0766993018d22fe03dd303febdc) Signed-off-by: Steve Sakoman --- scripts/contrib/bb-perf/bb-matrix-plot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/contrib/bb-perf/bb-matrix-plot.sh b/scripts/contrib/bb-perf/bb-matrix-plot.sh index e7bd129e9e..6672189c95 100755 --- a/scripts/contrib/bb-perf/bb-matrix-plot.sh +++ b/scripts/contrib/bb-perf/bb-matrix-plot.sh @@ -16,8 +16,8 @@ # Setup the defaults DATFILE="bb-matrix.dat" -XLABEL="BB_NUMBER_THREADS" -YLABEL="PARALLEL_MAKE" +XLABEL="BB\\\\_NUMBER\\\\_THREADS" +YLABEL="PARALLEL\\\\_MAKE" FIELD=3 DEF_TITLE="Elapsed Time (seconds)" PM3D_FRAGMENT="unset surface; set pm3d at s hidden3d 100" From patchwork Mon Nov 20 16:38:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1ADFC5AE5E for ; Mon, 20 Nov 2023 16:39:22 +0000 (UTC) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by mx.groups.io with SMTP id smtpd.web11.621.1700498358241169924 for ; Mon, 20 Nov 2023 08:39:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=KhS5hVdU; spf=softfail (domain: sakoman.com, ip: 209.85.166.182, mailfrom: steve@sakoman.com) Received: by mail-il1-f182.google.com with SMTP id e9e14a558f8ab-35b00cdc9b7so5205005ab.3 for ; Mon, 20 Nov 2023 08:39:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498357; x=1701103157; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Gxgc+WpuLLbx2sPSmy/3xjrQhRCQFyYd+KmdPyYOjDs=; b=KhS5hVdUQ5u9bazre3kSbTIKvSf5REcjTl8SwkL26LYXJ09k2WAhBFw/D6niWizT84 Bxmr63TInrQIT9y8mIar08BSWuyjvnZp0COGywnD0BZ3d7j02GHw08pfTfXV8/bJgoSX iH2r8UCUAmyMmxguWp/EaN5cjM/kGZ3PPaGoUWA/thJt/lq/qyr95/G+yyFNQEri4Ee9 ZiGYuO42S0dWgaOBi/OwqB+HK9S1TEZdIbZ5VG1vOhxGPKqmbeDtD+63Uxqa/CYXHjk2 wZtP0w7hUrJMsBk6wLj7HBbCKtq8+12seP9tRXSOmXKMbdGby+xxWIS0DvPS/LpJTgOC d3tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498357; x=1701103157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gxgc+WpuLLbx2sPSmy/3xjrQhRCQFyYd+KmdPyYOjDs=; b=bWlkqu4DzFCU+QdiV01kI4rBaymCbuzpyLCIYKkX8IDQia65rVdX1/VjgsmQa9q4py F5qykfYuDSZOoEEAy5vyiUb+cAtBJVbi0Usp+W1t9T3854Tmzr3t3EaqdcsKJqeNJR// aJNHN2lt1pMFa/xIDB+tk6cFKgZOVtlF7KGZ3vsKvLKQ8gJnhHom3EYgC/RKz+jeW3Oh iGbkZTcicatWicU2bxiLH3Evjwd8s4o3ROrzc/aXRkd/R+i1lbw46eD4y3ks+AFYuDaR xp8xrJ2bxRbNHjOxDt4Og3JaWq2p/ssxPKXMYnLN2+3loypRIdxS2+vOSk9FBa8SsMJz reVg== X-Gm-Message-State: AOJu0YwVGXHXiDJKa6CQOIvGsotDU60jxFMaCsNtkGlTg4k7sUIMDuOl 9hB18PWiGWyVc1VJZZB8igXlRzSt82OOUxncFps3+A== X-Google-Smtp-Source: AGHT+IE4eu8LIFEN6Set7qE4obRfQBYFSoEUjFZViolER0UUFhQBk4QHCW3y/0u41yIihSo8oOP6LA== X-Received: by 2002:a05:6e02:f42:b0:359:cc15:b0b3 with SMTP id y2-20020a056e020f4200b00359cc15b0b3mr9018643ilj.25.1700498357025; Mon, 20 Nov 2023 08:39:17 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:16 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 11/33] kernel.bbclass: Use strip utility used for kernel build in do_package Date: Mon, 20 Nov 2023 06:38:25 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190900 From: Khem Raj os.environ does not pass this down to runstrip() function and in strip_execs() its using STRIP bitbake variable to find the strip utility to use. Since there might be a trailing whitespace in KERNEL_STRIP remove that otherwise python is not able to launch it. e.g. FileNotFoundError: [Errno 2] No such file or directory: 'riscv64-yoe-linux-strip ' This is more evident when STRIP and KERNEL_STRIP are different utilities e.g. when using clang as default toolchain but using gcc+binutils only for kernel build. Signed-off-by: Khem Raj Cc: Bruce Ashfield Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit 77497dbdca92ab4d6386a071bc281c42a7e8a14b) Signed-off-by: Steve Sakoman --- meta/classes-recipe/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 2ec9ea2091..16b85dbca4 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -336,7 +336,7 @@ kernel_do_transform_bundled_initramfs() { do_transform_bundled_initramfs[dirs] = "${B}" python do_package:prepend () { - os.environ['STRIP'] = d.getVar('KERNEL_STRIP') + d.setVar('STRIP', d.getVar('KERNEL_STRIP').strip()) } python do_devshell:prepend () { From patchwork Mon Nov 20 16:38:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A578C5AD4C for ; Mon, 20 Nov 2023 16:39:23 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web11.623.1700498359850450579 for ; Mon, 20 Nov 2023 08:39:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=WmRVI70H; spf=softfail (domain: sakoman.com, ip: 209.85.210.173, mailfrom: steve@sakoman.com) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6c4eaa5202aso4703429b3a.1 for ; Mon, 20 Nov 2023 08:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498359; x=1701103159; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yQgs+X4q58wHxyIn6arIV2eKrl1fcK/T6AN5nvZzXms=; b=WmRVI70Hajw+oBykxI5D+xeQgTrlkZSD8+sKtGqDs9jBhljdRiE1BK8D7yZsjRhPo+ 3xV/5MEXzUblgGFgMBoR8o14eR+FAYM8vWalHR04uTx8ITVXyYDy//lCt0fI7YylwEAb /vbHIu6r4U+KvGPcdBh3J4BBHoX/Ynct6bbufBsU0o/lSEXeR0+hSin6EJzdm0KFCkW+ kSWxD36M8mmSQX6PtaZuJB2wnAf8/V8USZnNdyh2TpYsdR3muXxfms4J4kb1CwE0Pxsi 4IJLlhIF7Le+lcHVDEuGLCCEWaetQdEpJIDWSfgzojA2tqQzLTVBCV5aH2PbqaLXsN3N VwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498359; x=1701103159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yQgs+X4q58wHxyIn6arIV2eKrl1fcK/T6AN5nvZzXms=; b=sZhJwczeG8F+IqULjnujF/MUPsUMAtWY7w+a7yESXCduWVP91wP7fDJOKrY6z4qbuN +mXN+mcO0CoCINRODBP7XjFCMCDxTa2NyCWBN9f1fji6ZHH6YAY0YM3qZT+djp5Xe0O/ tsOYnqoT5Qvx1Ad/X6VEnhrTCP6f8FX2kfjNrq0rqfF2pVrEOeL3Bz8aYFn3/WPy7UiI hm0PFwimLWSh3wneomXT8/1pyNrZ/XNFnQiRMPIbNKku/r7yGxlJciB1kRMyt0JoZHIR PfgL/XzlSNmSTJfHt7WSK+Q1EbMKcBTYki3k7os88cv4WjFx9KpzjTF5LZ+gh2T2/EWN oZ4w== X-Gm-Message-State: AOJu0Yx51wWttAC4PUJM4hQ1tTyr5bzjmRoo0B1XwBxVpdA2DfsrW/L9 Hx7QYgJ0s5I1+dYdc9yIjIRZIT14bwb7hoXkZQguAg== X-Google-Smtp-Source: AGHT+IHlru0j1W4GAAmjUEjiGAMEZGjgun0LLq4goKfblqgEYyYxISN+gm3k44WdC8Pu3oxtOJSoww== X-Received: by 2002:a05:6a00:3a12:b0:6c3:1c74:9c5 with SMTP id fj18-20020a056a003a1200b006c31c7409c5mr9802067pfb.0.1700498358963; Mon, 20 Nov 2023 08:39:18 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:18 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 12/33] oeqa/selftest/devtool: abort if a local workspace already exist Date: Mon, 20 Nov 2023 06:38:26 -1000 Message-Id: <74c852619b7496cf772ea8f1ecd4ac8b1934f65a.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190901 From: Julien Stephan if user run devtool selftests with a local workspacelayer the tests fail with various error such as: - devtool.DevtoolAddTests.test_devtool_add just hangs - devtool.DevtoolModifyTests.* fail with the following error: ERROR: Found duplicated BBFILE_COLLECTIONS 'workspacelayer', check bblayers.conf or layer.conf to fix it. Found duplicated BBFILE_COLLECTIONS 'workspacelayer', check bblayers.conf or layer.conf to fix it. Check if a workspacelayer exists, warn the user and abort the tests Signed-off-by: Julien Stephan Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit a74962cfb0485f6f2b9e2b751c33c8eafca8705a) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/selftest/cases/devtool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index b577f6d62a..c36b1efa78 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -27,6 +27,9 @@ def setUpModule(): corecopydir = os.path.join(templayerdir, 'core-copy') bblayers_conf = os.path.join(os.environ['BUILDDIR'], 'conf', 'bblayers.conf') edited_layers = [] + # make sure user doesn't have a local workspace + result = runCmd('bitbake-layers show-layers') + assert "workspacelayer" not in result.output, "Devtool test suite cannot be run with a local workspace directory" # We need to take a copy of the meta layer so we can modify it and not # have any races against other tests that might be running in parallel From patchwork Mon Nov 20 16:38:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34871 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D64B6C2BB3F for ; Mon, 20 Nov 2023 16:39:22 +0000 (UTC) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mx.groups.io with SMTP id smtpd.web10.600.1700498361958211255 for ; Mon, 20 Nov 2023 08:39:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Ejg4k/3q; spf=softfail (domain: sakoman.com, ip: 209.85.215.180, mailfrom: steve@sakoman.com) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5bdbe2de25fso3479250a12.3 for ; Mon, 20 Nov 2023 08:39:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498361; x=1701103161; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JDjxAUTDyqXsSES+Vn4gVZ3TCpcuA2p6RdP++xKCoAc=; b=Ejg4k/3qXbt/YmwRWdEMxpSU9px5mxeGhq7HN63LzRVf0p1LvrTWtuT3JV5vgDcasT PxISWi30Mpo6aDbj13Hl0bhZPdg9KSpiLnim/3MGwoxsw6WOfFYAG9oxQFrHhL7ldWuN Qydb46nZoxirT6SdJc2+pc7esvk95E1qTbC2hjCymYnkIqiX0KAK8hTw99JTh3WfqsPx UY5C0bnHZ7yW2vOl1ij78HQXeQnzslqOgSna1UUvSwz075HyHZT2x7z8I0nRuRaHSn6O ECQTeYMGJy/9dF8OvP/BWltqwmtBjiMRSrZS3Tg7y+hzlYhl2ecoWgWwOv7yQFIUJr9P mq+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498361; x=1701103161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JDjxAUTDyqXsSES+Vn4gVZ3TCpcuA2p6RdP++xKCoAc=; b=c1KyhwKp/gl2DLIumtKHKFc5izu0skoqoMYEzl4hoFpFfJBZUPhoIt+SDIW8zhwkbU o21kw461QlAjxMfXPDJ00DaWpryby0gXWkUDz/Uow3egwiABZjso8/Y7aJ7DniJz8mS3 JY43TOw7C21hg9KM4+1X05uZYpZ8Uh0pJpLce1A98kj5KvVyoP+NEOLul28CGm3V06BQ mAm8cr+NrCCaYp9UtgcFN7dblUIRXibcqR0YUtwWkKtcBIxYxdMuvC07tuflor9GieGW aE66kOL9hpWAzm3NuTlF3eFZ8W/JGhuCNxJTy6XZExzwT9l+H8ZhVYk00Emg14xBxOZ5 CKvA== X-Gm-Message-State: AOJu0YzvyelIf9v5Vb8bHivbNsJ7FI71maJ5K2St4qTxFbVcaETzywmv 0aQ/CuBN3QFml7mMwVtP407rdU4lwckRt3aGRv4QBA== X-Google-Smtp-Source: AGHT+IGloxRHT8agPLxVw144WmAHjmGePWsJKjCwJnqJ8H1hOooALkbC0p2yzXhHpI2wspwHUWFH3A== X-Received: by 2002:a05:6a21:3414:b0:186:664b:44bf with SMTP id yn20-20020a056a21341400b00186664b44bfmr9860872pzb.60.1700498360785; Mon, 20 Nov 2023 08:39:20 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:20 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 13/33] linux-yocto: make sure the pahole-native available before do_kernel_configme Date: Mon, 20 Nov 2023 06:38:27 -1000 Message-Id: <9a175e954d1dd485293e0c3c49332fa2fe2bab1b.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190902 From: Xiangyu Chen When using debug-btf.scc in a clean workspace, the CONFIG_MODULE_ALLOW_BTF_MISMATCH cannot apply to kernel until clean the kernel code(bitbake linux-yocto -c cleanall) and rebuild. After tracking the code, some options depend on CONFIG_PAHOLE_VERSION, it was generated by scripts/pahole-version.sh in kernel, but during do_kernel_configme step, the pahole-native is not available in sysroot-native, so need to wait pahole-native install to sysroot-native before do_kernel_configme. Signed-off-by: Xiangyu Chen Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit 217a4db53edbd88001f6390bbff39e5dd3d137af) Signed-off-by: Steve Sakoman --- meta/recipes-kernel/linux/linux-yocto.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 0cc303c009..0132fcffb3 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -65,7 +65,10 @@ KERNEL_DEBUG ?= "" DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}' DEPENDS += "openssl-native util-linux-native" DEPENDS += "gmp-native libmpc-native" -DEPENDS += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native", "", d)}' + +# Some options depend on CONFIG_PAHOLE_VERSION, so need to make pahole-native available before do_kernel_configme +do_kernel_configme[depends] += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native:do_populate_sysroot", "", d)}' + EXTRA_OEMAKE += '${@bb.utils.contains("KERNEL_DEBUG", "True", "", "PAHOLE=false", d)}' do_devshell:prepend() { From patchwork Mon Nov 20 16:38:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0417FC2BB3F for ; Mon, 20 Nov 2023 16:39:33 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.605.1700498363678163872 for ; Mon, 20 Nov 2023 08:39:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=vwW9EpKU; spf=softfail (domain: sakoman.com, ip: 209.85.215.179, mailfrom: steve@sakoman.com) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5be24d41bb8so3144110a12.0 for ; Mon, 20 Nov 2023 08:39:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498363; x=1701103163; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SrKyqOlYOL06cWz5acqC7XdnCpeaww+W6vd9DmNmHWE=; b=vwW9EpKUscJ8P5OwbGe/9lYutMSXZBwGALgNuHx1PlVdnIrGF9+CGtg9CMzdjOCwGz VohESsCvJfQVkUe8HTYAl94Udl80JTylxHGa93PxXnGPM1dEItLgGijrFxWPym0II8QI rD0MiFBSK+iXhCDPBRwuSS5Up+B04UvObo5DMDqI6aVD6hk69kGWZTO1IrrkpRWYMRYy zmvJ9rDKHGzkCzfdnBtBZMleRKOOHKZ58lh/GJSf/HPAZopU/LqaBOua14FNf7/S6uT+ 4gsqbzFDysgTYT+bdpxlxw2RlZfBTWm2M95xLFq8XAUEdK52Lf0/b55h5qnfm+p9LDdr m5pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498363; x=1701103163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SrKyqOlYOL06cWz5acqC7XdnCpeaww+W6vd9DmNmHWE=; b=h3ZD+Vi22bYAmQf3fOFk8q3aRHmqM0vc8e86q3hy7Y8SV5tptIVIIqGFJYEuH4RIL8 GqGK+pfM92gZS7sp51W2PeFpC1J6TsweDasz2onI6zocMNXeT209HXNEX/yltDJLZgdO dXi5jy+1/kbzHzc7EIYpBjoE77Cq3UEzNExZhBqBk785kBsDK3BRQTcPdWM2MB4Cfy9j GDrSemquDna5iAElEZylC5O7Ehc8YbCai+yqlVF/iAvI5s85OzHUGo5H1jdOFaeHHx92 W+beav3Z+8xBrKcTVdf+tP/WO3N0R1NioxbBM6WV0GIdl336Og8TPa5+ASphTEEeJ9uH 1pNA== X-Gm-Message-State: AOJu0YzoynNdFsykN1DGvRo1yYbv8FGDbtaz8FsozcPprP6fG+nEdahR t2T2+3qH9Ajyi6/RVuDIPudwy1EsMCcPBSqEP8x63w== X-Google-Smtp-Source: AGHT+IEm2aRk/XImfkbfbyFnAGVuL2arTRqiNkkbZcO2KewslvkBDUyGRichWP4B4MOp6nXxgLNxGA== X-Received: by 2002:a05:6a20:e118:b0:187:3765:1798 with SMTP id kr24-20020a056a20e11800b0018737651798mr19209442pzb.22.1700498362782; Mon, 20 Nov 2023 08:39:22 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:22 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 14/33] base: Ensure recipes using mercurial-native have certificates Date: Mon, 20 Nov 2023 06:38:28 -1000 Message-Id: <667d02c729fe882a414d09f5b4d4279aabd24b5c.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190903 From: Richard Purdie If you try and fetch using mercurial-native, you see certificate errors since it is configured to find ones in the sysroot, not the system. Add the missing dependency so that mercurial recipes using the native tool work. Found trying to make mirroring for old meta-oe stable branches work. Signed-off-by: Richard Purdie (cherry picked from commit fc567e35b374f8b08975602609ee71e64357fb3d) Signed-off-by: Steve Sakoman --- meta/classes-global/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index f57f9cf827..ac84312a87 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -634,7 +634,7 @@ python () { # Mercurial packages should DEPEND on mercurial-native elif uri.scheme == "hg": d.appendVar("EXTRANATIVEPATH", ' python3-native ') - d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot') + d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot') # OSC packages should DEPEND on osc-native elif uri.scheme == "osc": From patchwork Mon Nov 20 16:38:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FB5CC5AD4C for ; Mon, 20 Nov 2023 16:39:33 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by mx.groups.io with SMTP id smtpd.web10.608.1700498365943990463 for ; Mon, 20 Nov 2023 08:39:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=nvnKsCP2; spf=softfail (domain: sakoman.com, ip: 209.85.167.182, mailfrom: steve@sakoman.com) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3b6ce6fac81so2886369b6e.1 for ; Mon, 20 Nov 2023 08:39:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498364; x=1701103164; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RAj+hM8omCUFRNuZtSyUlLiSqS5S0mwgZJ3MykmAx24=; b=nvnKsCP2KcP+MD5h+Z8K74svdnyl0Lxz020hGM7C+nXuGmFoBMkIPkRVmKO7oNIkMM DPOxUPujVjSJ7oNWwKOYlUVOKCH3ym11SA0K+WUziE5dtFU/rKVDhNBwRGtapDT7B1hi vsKb+1up7kzjgS8JJZBz3XTbfBvSNlWSmGhIav9vWQV2LHuf3cs9LZzwXDBIkBZcl5qZ KDF1tBAkrp43e5W6mjK3AK+wYMOX5R/FPP8tXrWVAD7rTAGhpFTbVrKDXyPlX2X6HI3f nVV4PabzKKmtbwKbtz7oYtRNqlRvutFAtMO6OOawehSV2U2R4sWKBDgIYT2FFBkR1kN9 JNFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498364; x=1701103164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RAj+hM8omCUFRNuZtSyUlLiSqS5S0mwgZJ3MykmAx24=; b=uN5Qv4CjFS1RmnUYXz+v4GkmP3dkCo1TiqTnBZiQURwBy0PLt5o2fDNSbUCR8Jx+L7 klof0qMpE2VEyFewudTqsypqKkiN3r8USSPrqOemo/XFyCQDVkpMwW/38oJa0va8PHAC 2b3mIjklKbniiB3Gf7ovjEqTjQgnpdq/gSD4XLAPcjSx3ULxw30skYoHjDCu8//PovSe GLH77H6JhBvODvwS4fZtJE2HckEjJC5u7mbZYyUU4pq1YjXtahb0uR9vYry+9zghiz1k Nnw29sfBOks5penzAcfwNwcJtgHWVqCgx7kiGhHkd1N9g/nECUHhJ3RkPH50lOmHPRm0 1/zg== X-Gm-Message-State: AOJu0YyJl/tVninX0MOgz7ZNN4ck4FWFIunZNzdFciTzeSlfAdEd94o3 S2WgupaI1ACg+ZAEUL3g4G6MwEANXp4v73fSBvxDLw== X-Google-Smtp-Source: AGHT+IHkV/iklqCLbypnYDd/85LOHFWmgsAh4iHFe4/U+vU+klwU8rO6SJ+7aqQCxpy2+xnllkFTvg== X-Received: by 2002:a05:6808:188c:b0:3a7:215c:e34 with SMTP id bi12-20020a056808188c00b003a7215c0e34mr11736672oib.15.1700498364644; Mon, 20 Nov 2023 08:39:24 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:24 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 15/33] glib-2.0: Remove unnecessary assignement Date: Mon, 20 Nov 2023 06:38:29 -1000 Message-Id: <06423508e2b67bfe9871ba833ab6ea89ee2796bb.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190904 From: Rouven Czerwinski FILES:${PN}-utils is += extended and than replaced completely later, remove the first extension. Signed-off-by: Rouven Czerwinski Signed-off-by: Richard Purdie (cherry picked from commit d9d61c5217938749e3edc5f8a5c987f46bbab3d7) Signed-off-by: Steve Sakoman --- meta/recipes-core/glib-2.0/glib.inc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index b946e798bb..cec06b2f88 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -57,11 +57,6 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \ ${datadir}/glib-2.0/dtds \ ${datadir}/glib-2.0/schemas" -FILES:${PN}-utils += "${bindir}/glib-genmarshal \ - ${bindir}/glib-gettextize \ - ${bindir}/glib-mkenums \ - ${bindir}/glib-compile-resources" - FILES:${PN}-dev += "${libdir}/glib-2.0/include \ ${libdir}/gio/modules/lib*${SOLIBSDEV} \ ${libdir}/gio/modules/*.la \ From patchwork Mon Nov 20 16:38:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19C5AC5AE5C for ; Mon, 20 Nov 2023 16:39:33 +0000 (UTC) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web10.609.1700498367622878133 for ; Mon, 20 Nov 2023 08:39:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=p7uOpbKO; spf=softfail (domain: sakoman.com, ip: 209.85.215.177, mailfrom: steve@sakoman.com) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5bd6ac9833fso2499852a12.0 for ; Mon, 20 Nov 2023 08:39:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498366; x=1701103166; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UA7YdednANPv1zRKaT9FQhvM1osO5S6mEJINP/svuoI=; b=p7uOpbKO6Jq359E0n5MUpzuoKjozdBmuieVgdEaw+m5pbDH8KFnRxSzIjPVNCNMF+r CfomWmaipAOu0qbCz6qmnPh3QhEtNBscCz2vbscdGyufAszQuKuZSz+Y8PWyqfjEhU36 u4bc+JrWToAEB8J3wCZ01w0IY4gi2uPfuwgdkPvLfFWkPqxsYIEFkgPRkzjykbxXBOYy gXO/Q6yKXfPammsPviKIr0ApK3v4QttwnW7XJT/tQyXVrsfkGr3W6NdbD3173HoJulQP EZeqysUb/7b6f1k8VBz0v+fvqy4qsP/7RbXUp7ZFCZC7660VY3BTEui3GqsU/fE0W4ab M9VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498366; x=1701103166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UA7YdednANPv1zRKaT9FQhvM1osO5S6mEJINP/svuoI=; b=jEXzQYaGXy0yU98/CRpYIkpQMdPQf32DqIETcPmUWhlIQ/Rk4M0wGNoVJX5b3/ZjzS iSendkCMhNOsngY1y8JXUbsrcnDoXAfJV9/6+dObnXK3f5wGsJ77OtBzNGiDTjE2Y/BG xN6MC59CAZZvG8i8sQ2SYUuCAtejdhrS0XFpau3wpQVpAQEMwvMrpmYhbDg/2eZPBIYl rPzyPNq/dn7kQPMeRFxSe9vLc0hrJkKXTw8Oqn+zgWLG5dkGE367IfQBx8OX7i+vguKr olvfsb/QGpXVRl/b8ZWLTJPV0OuTtugipvryOgzCkkmq/GDLPhRG9AFuMX6C4DlsvBFC SRTA== X-Gm-Message-State: AOJu0YzvuINKfYwlGlZIZlvl6QJ8MRimRJ+52D3iHWKYGAFIc6csUVJs S9HnQqJU5+oGltozjrOoeMiIOCwPRitb4VHt6jDkhA== X-Google-Smtp-Source: AGHT+IE3yAsbBp3c3yOHlh2/gzSBNsWaq4yKgUqsULjG27hr+CMzlTL/EQWN/l+UJ3xJeRCW8003rw== X-Received: by 2002:a05:6a20:158b:b0:187:b9a6:61d4 with SMTP id h11-20020a056a20158b00b00187b9a661d4mr6289391pzj.47.1700498366472; Mon, 20 Nov 2023 08:39:26 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:26 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 16/33] baremetal-helloworld: Pull in fix for race condition on x86-64 Date: Mon, 20 Nov 2023 06:38:30 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190905 From: Alejandro Hernandez Samaniego It was previously discovered that there was a race condition during the Makefile execution between the assemble and compile targets, the previous fix attempted to serialize the build targets, but the fix was missing for x86-64. Pull in latest commit from upstream to fix this issue on x86-64. [YOCTO #15146] Signed-off-by: Alejandro Enedino Hernandez Samaniego Signed-off-by: Richard Purdie (cherry picked from commit e7e1631a1efbcf421de801e94734f67f25668540) Signed-off-by: Steve Sakoman --- .../baremetal-example/baremetal-helloworld_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb b/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb index fde75ec2fd..6832ccc541 100644 --- a/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb +++ b/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb @@ -4,7 +4,7 @@ DESCRIPTION = "These are introductory examples to showcase the use of QEMU to ru LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449" -SRCREV = "fc7c43d138185028b6ac14c83f6492fce26eca95" +SRCREV = "db2bf750eaef7fc0832e13ada8291343bbcc3afe" PV = "0.1+git" SRC_URI = "git://github.com/ahcbb6/baremetal-helloqemu.git;protocol=https;branch=master" From patchwork Mon Nov 20 16:38:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23675C5B55F for ; Mon, 20 Nov 2023 16:39:33 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web10.611.1700498369525046673 for ; Mon, 20 Nov 2023 08:39:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=TCWQldEc; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6cb66f23eddso1135226b3a.0 for ; Mon, 20 Nov 2023 08:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498368; x=1701103168; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DxKf9iy847YC1nrQNG1Tsf/SzmsneK0BLB0jvcivbuo=; b=TCWQldEc9Hsdy3tH3MooeKishqy5LnDLCbi30QcRalvv3LshpMBUfGmQlzFRmwqbCV mSKcivW/wooaO0JRmcXam/t+mX7+7Nq0bZxZJgMYPEyS6i2WULw53GmMCKMfz8UyfqBl at9WJhIerqLYI4m1W87IR6t8+OjvrEYJnEyC0R2EfRpGarYVehuuF5gu/qsZFal9sQdl paKsR/MsRQMwmGMDD5jCBvtwjpSHPkawtAXKxVaBptrltOlwLralhfWQGvO452zPZ/LU 3Nc25FMN0tD/+lbA6tLwLj0ZIXCGaapVhRrFRJAawCeNgdoLToFPWLq7KSBDFME3khRi qoKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498368; x=1701103168; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DxKf9iy847YC1nrQNG1Tsf/SzmsneK0BLB0jvcivbuo=; b=cIbLT5j/LMCUtgIXVJP5GeGdvf1JNj1gtxB0ZE8cEek46cwvXb1Woe+Vx2rrTZJ3BX voHnN1ahZdnLsobfD0aa9QGpfNEi5lJe3MPQXIcv1ZqBxVaxTkz2lpf0NGxxiL5SXavW IJte2Es+cSa2PSnDNqDR70GHVPJiSbm8kputRqrQd3dgB6kZNofHwLdFXWbTniePA01Z FoYb8tKrZMfMQ7HnZcXpnHNWo9ZBHk6QkOBhuEjcnb/DQ2cbVn06h/E4fBAEmZdWqaR7 05rFi34a5EfRBDrMUgdcDJU6sewvToi5F6LkVUp8MrK8CxC1adCEFH9gadCbPj2kXh+y RVbQ== X-Gm-Message-State: AOJu0YyNKmJKonZTDrJjUe/TcKbEyZaLJaty7QpwKMc0nttUiuH0x1ON VEUgRPI3b4BIplG/Wy1b+FUXMcbJJP1qMgFUOuU+og== X-Google-Smtp-Source: AGHT+IFftazldvpY6UJNeLYExSgV+uiWhz802FfSAqQUsa2696mLGVJsflPS22RedL8FNu2rRDOurw== X-Received: by 2002:a05:6a00:27aa:b0:6cb:a8dc:26ed with SMTP id bd42-20020a056a0027aa00b006cba8dc26edmr2678485pfb.16.1700498368287; Mon, 20 Nov 2023 08:39:28 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:27 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 17/33] patchtest: remove unused imports Date: Mon, 20 Nov 2023 06:38:31 -1000 Message-Id: <48b07348a8601129c591dd42cf6af6dc7844d33d.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190906 From: Ross Burton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit be8429d986335aae65c2426862b97836ba46e42a) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/data.py | 1 - meta/lib/patchtest/repo.py | 1 - meta/lib/patchtest/tests/test_mbox_cve.py | 1 - meta/lib/patchtest/tests/test_mbox_mailinglist.py | 1 - meta/lib/patchtest/tests/test_metadata_src_uri.py | 1 - meta/lib/patchtest/tests/test_patch_cve.py | 1 - meta/lib/patchtest/tests/test_patch_upstream_status.py | 1 - meta/lib/patchtest/utils.py | 1 - scripts/patchtest | 1 - scripts/patchtest-get-branch | 1 - 10 files changed, 10 deletions(-) diff --git a/meta/lib/patchtest/data.py b/meta/lib/patchtest/data.py index 25a9a57dfb..356259921d 100644 --- a/meta/lib/patchtest/data.py +++ b/meta/lib/patchtest/data.py @@ -16,7 +16,6 @@ import os import argparse import collections -import tempfile import logging logger=logging.getLogger('patchtest') diff --git a/meta/lib/patchtest/repo.py b/meta/lib/patchtest/repo.py index 8a11af5fd6..d3788f466d 100644 --- a/meta/lib/patchtest/repo.py +++ b/meta/lib/patchtest/repo.py @@ -11,7 +11,6 @@ import os import utils import logging -import json from patch import PatchTestPatch logger = logging.getLogger('patchtest') diff --git a/meta/lib/patchtest/tests/test_mbox_cve.py b/meta/lib/patchtest/tests/test_mbox_cve.py index 31faeb5ef5..29ab12cbb5 100644 --- a/meta/lib/patchtest/tests/test_mbox_cve.py +++ b/meta/lib/patchtest/tests/test_mbox_cve.py @@ -6,7 +6,6 @@ # import base -import os import parse_cve_tags import pyparsing diff --git a/meta/lib/patchtest/tests/test_mbox_mailinglist.py b/meta/lib/patchtest/tests/test_mbox_mailinglist.py index 0ffb6056c0..feff436089 100644 --- a/meta/lib/patchtest/tests/test_mbox_mailinglist.py +++ b/meta/lib/patchtest/tests/test_mbox_mailinglist.py @@ -4,7 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-only -import subprocess import collections import base import pyparsing diff --git a/meta/lib/patchtest/tests/test_metadata_src_uri.py b/meta/lib/patchtest/tests/test_metadata_src_uri.py index 01d8a45103..87a24ea937 100644 --- a/meta/lib/patchtest/tests/test_metadata_src_uri.py +++ b/meta/lib/patchtest/tests/test_metadata_src_uri.py @@ -4,7 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-only -import subprocess import base import os import pyparsing diff --git a/meta/lib/patchtest/tests/test_patch_cve.py b/meta/lib/patchtest/tests/test_patch_cve.py index c0c7e742ee..c77848de45 100644 --- a/meta/lib/patchtest/tests/test_patch_cve.py +++ b/meta/lib/patchtest/tests/test_patch_cve.py @@ -6,7 +6,6 @@ # import base -import os import pyparsing class CVE(base.Base): diff --git a/meta/lib/patchtest/tests/test_patch_upstream_status.py b/meta/lib/patchtest/tests/test_patch_upstream_status.py index 957817ba8d..a5b278304e 100644 --- a/meta/lib/patchtest/tests/test_patch_upstream_status.py +++ b/meta/lib/patchtest/tests/test_patch_upstream_status.py @@ -7,7 +7,6 @@ import base import parse_upstream_status import pyparsing -import os class PatchUpstreamStatus(base.Base): diff --git a/meta/lib/patchtest/utils.py b/meta/lib/patchtest/utils.py index 8dcac30941..a4a523b4e2 100644 --- a/meta/lib/patchtest/utils.py +++ b/meta/lib/patchtest/utils.py @@ -11,7 +11,6 @@ import os import subprocess import logging -import sys import re import mailbox diff --git a/scripts/patchtest b/scripts/patchtest index 7b47d45dce..a1c824f7b7 100755 --- a/scripts/patchtest +++ b/scripts/patchtest @@ -12,7 +12,6 @@ import sys import os import unittest -import fileinput import logging import traceback import json diff --git a/scripts/patchtest-get-branch b/scripts/patchtest-get-branch index 962f572b20..b5fb2b0f04 100755 --- a/scripts/patchtest-get-branch +++ b/scripts/patchtest-get-branch @@ -15,7 +15,6 @@ import mailbox import argparse import re import git -import sys re_prefix = re.compile("(\[.*\])", re.DOTALL) From patchwork Mon Nov 20 16:38:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 047C4C5AE5B for ; Mon, 20 Nov 2023 16:39:33 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web11.631.1700498371348716756 for ; Mon, 20 Nov 2023 08:39:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=RtQFdVpk; spf=softfail (domain: sakoman.com, ip: 209.85.214.176, mailfrom: steve@sakoman.com) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1cf6373ce31so6376765ad.0 for ; Mon, 20 Nov 2023 08:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498370; x=1701103170; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fXySRxg+TjBqsX4RWzyaNWYOTyMDdk5Qop+dwQhVKxE=; b=RtQFdVpkU+2KyhJ2UH6Az0Nza68VTsBhEOm6OGkzqZZBOTjA5XzhEi+z1S5kJKTg7i d4q4J4PBKivAObgNYKyT3R16eGGKIcErtmrwFoZxYNI4MP+PMvRpVMaZea6UVH3uro3R B8aB8xajsl1BJd13PkRfryYlyIlTbIPr5rjxN+aSjv9eJ9fplkOcRB5Cq/ANBpx1EdIs XoYRl06WaBCSpQAljcb841UiYSbyivjJnGpC4zp8liZFMdGsZXRwoh/x6uQw93bpk32X 58E7/AAMy5MfgW/0jhdnutwwG7jQkV3tirZAfsunF/gsGS3EEIqNQyJ76wmKUvz9h2Ry lwVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498370; x=1701103170; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fXySRxg+TjBqsX4RWzyaNWYOTyMDdk5Qop+dwQhVKxE=; b=gT3V9/GS2V5cW8GgNm5mUVa+cvZZMW+D+wa7o925HwA2xlEXHkFF0v1T/gQJhL3SF0 +MzYpB89luvpZ9tViy5Ohm8wG+ICkTXo422mLEU8R4HKUlmCoFubuLxzjuSLKqIcF9a5 D/FaWEhF+2uGxIgmUO2H9GFDF+RiKpNFYk3v71Dtr/QA034dDCjHUBYpqCBR3BwBbLZD oxUKN6Rpe60+ervGoNeQkWeESOuopQKSMuhkONTZ/9avzHaa4OXFC4PBGNMylnLTZmrE G+5npT5AUS054X/ildGkcbT4nv67guflHmcvucCBz5H0wgOkwM2aQaWDg9EQwvgQYCLD Q5Jg== X-Gm-Message-State: AOJu0YxGjLk6ohB/URq/joOO476+Wb5cOMDkfGx/MCNrVbKwXM/XwCa0 i7t71RscCEtveCiO0ru3ZTe+E8mnWOTpOg1KHRqhRA== X-Google-Smtp-Source: AGHT+IExmoAeHeqwajkCY9byPSURi9X0EZ5mN4WNrmbjLdMDVk7qLLPkmALSbExh5PH+/fS25fnJqw== X-Received: by 2002:a17:903:188:b0:1ce:b83f:bd0c with SMTP id z8-20020a170903018800b001ceb83fbd0cmr19496plg.7.1700498370312; Mon, 20 Nov 2023 08:39:30 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:29 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 18/33] patchtest: test regardless of mergeability Date: Mon, 20 Nov 2023 06:38:32 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190907 From: Trevor Gamblin Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit dc089073eb120de76c8907e476c341ed3e97c164) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | 5 ----- meta/lib/patchtest/tests/test_metadata_license.py | 5 ----- meta/lib/patchtest/tests/test_metadata_summary.py | 5 ----- meta/lib/patchtest/tests/test_python_pylint.py | 2 -- 4 files changed, 17 deletions(-) diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py index b2c32507ff..cb3e7c9d34 100644 --- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py +++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py @@ -15,11 +15,6 @@ class LicFilesChkSum(base.Metadata): lictag = 'License-Update' lictag_re = pyparsing.Regex("^%s:" % lictag) - def setUp(self): - # these tests just make sense on patches that can be merged - if not PatchTestInput.repo.canbemerged: - self.skip('Patch cannot be merged') - def test_lic_files_chksum_presence(self): if not self.added: self.skip('No added recipes, skipping test') diff --git a/meta/lib/patchtest/tests/test_metadata_license.py b/meta/lib/patchtest/tests/test_metadata_license.py index a5bc03b83f..1a7f09b747 100644 --- a/meta/lib/patchtest/tests/test_metadata_license.py +++ b/meta/lib/patchtest/tests/test_metadata_license.py @@ -12,11 +12,6 @@ class License(base.Metadata): metadata = 'LICENSE' invalid_license = 'PATCHTESTINVALID' - def setUp(self): - # these tests just make sense on patches that can be merged - if not PatchTestInput.repo.canbemerged: - self.skip('Patch cannot be merged') - def test_license_presence(self): if not self.added: self.skip('No added recipes, skipping test') diff --git a/meta/lib/patchtest/tests/test_metadata_summary.py b/meta/lib/patchtest/tests/test_metadata_summary.py index 1502863df0..170e79eb4b 100644 --- a/meta/lib/patchtest/tests/test_metadata_summary.py +++ b/meta/lib/patchtest/tests/test_metadata_summary.py @@ -10,11 +10,6 @@ from data import PatchTestInput class Summary(base.Metadata): metadata = 'SUMMARY' - def setUp(self): - # these tests just make sense on patches that can be merged - if not PatchTestInput.repo.canbemerged: - self.skip('Patch cannot be merged') - def test_summary_presence(self): if not self.added: self.skip('No added recipes, skipping test') diff --git a/meta/lib/patchtest/tests/test_python_pylint.py b/meta/lib/patchtest/tests/test_python_pylint.py index 9cfc491a13..304b2d5ee9 100644 --- a/meta/lib/patchtest/tests/test_python_pylint.py +++ b/meta/lib/patchtest/tests/test_python_pylint.py @@ -26,8 +26,6 @@ class PyLint(base.Base): def setUp(self): if self.unidiff_parse_error: self.skip('Python-unidiff parse error') - if not PatchTestInput.repo.canbemerged: - self.skip('Patch cannot be merged, no reason to execute the test method') if not PyLint.pythonpatches: self.skip('No python related patches, skipping test') From patchwork Mon Nov 20 16:38:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12916C2BB3F for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by mx.groups.io with SMTP id smtpd.web10.613.1700498373211068375 for ; Mon, 20 Nov 2023 08:39:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=1CgrVN8O; spf=softfail (domain: sakoman.com, ip: 209.85.167.176, mailfrom: steve@sakoman.com) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3b5ff072fc4so2962516b6e.3 for ; Mon, 20 Nov 2023 08:39:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498372; x=1701103172; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=V2dtyVRT5/8BhSxCzWIx3Ud0/1HirtUG0Ag/liKFrTo=; b=1CgrVN8OFz0vIdfc7hkoks0IDhtZV5rVxgDHGhfCZwVh7LG71OVq99XmuF1SgDJuwB KpDoSSARK1XEHdcbksfiafm8MPGj7n6oAk8j6x6TimbfN0f+35fAhzDwY2xxewhJf3FM tNcrTWkVNpegVkPRDnUzcKKlTAScARUOLByHhoeINEw9SNZCiZQ7azw9oDFM0ThN1Vfg JBOJMQvOC66KzoCLYDLf8HQxUASSVxiYnPnkXe/gdBw+xSPI8ALUrDfyp9bc9U8iVZEA L6MudbMzG9sYN7qjodmFG7cF0JVc5iUyoOqxbLiiwQOL1St5z36YJxSijvX7iK7xK7n3 EoDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498372; x=1701103172; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V2dtyVRT5/8BhSxCzWIx3Ud0/1HirtUG0Ag/liKFrTo=; b=Ihf44/Bl/kzInzF0COa/OZwe9KvperR4ur3bWZaoO/1l8ULS89G8qzY7aUqZaonJ6S Cjd0mwDFxPeBA4fk2E8sXkB5JSRjWPPlDzZWfaemF5rUoFMRkRoIJB9YwgXxVGpswsQo VYHlMPkbR3vv1aRQys0nZEpCRdjSIdpUhzD5/VDMhL5u4dHcGs9CP89s/O3fTX7kwC5C tGrmTeMpFXMU11U0jaIUks9ZO/JLbUxmqq4OS3lv0FVxLTqKj7ot6KW4tfxS+jbPPy4e 4Vwil70l6n1d3nsei6ju23GqsXAf/QLd+1HvwynO7K/xtKJyvs6Vm3N1eQPTkzVJPIOi k03Q== X-Gm-Message-State: AOJu0YwAhlT2b357GXD984WI4cnHMMzrFJEKwsFduGDK81AEialZVQyz TnKrNvpTS+cfknq+VZenbyqNCJATKlARZ+SKzZaalA== X-Google-Smtp-Source: AGHT+IFI5alrYnmmikSC0C1uSIG5OgpY4l6xHsDXnPQ+Jpw3WzINJ61+teYaJ7E+dJQfHTgCtOSWrw== X-Received: by 2002:a05:6808:1789:b0:398:5d57:3d08 with SMTP id bg9-20020a056808178900b003985d573d08mr3232817oib.37.1700498372253; Mon, 20 Nov 2023 08:39:32 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:31 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 19/33] patchtest: skip merge test if not targeting master Date: Mon, 20 Nov 2023 06:38:33 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190908 From: Trevor Gamblin Avoid testing mergeability of a patch when not targeting master, so that patches tested via other means (e.g. maintainer branches and AB runs) don't get unnecessarily reviewed an extra time. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit e6cf23e353f48c57249681bd0b12bd8494d4959a) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_mbox_merge.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py b/meta/lib/patchtest/tests/test_mbox_merge.py index bc55c588b4..f69d57c71b 100644 --- a/meta/lib/patchtest/tests/test_mbox_merge.py +++ b/meta/lib/patchtest/tests/test_mbox_merge.py @@ -18,6 +18,8 @@ def headlog(): class Merge(base.Base): def test_series_merge_on_head(self): + if PatchTestInput.repo.branch != "master": + self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) if not PatchTestInput.repo.ismerged: commithash, author, date, shortlog = headlog() self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', From patchwork Mon Nov 20 16:38:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2456EC5AE5E for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web10.614.1700498375162132369 for ; Mon, 20 Nov 2023 08:39:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=UkYbIB74; spf=softfail (domain: sakoman.com, ip: 209.85.215.178, mailfrom: steve@sakoman.com) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5c210e34088so2217779a12.2 for ; Mon, 20 Nov 2023 08:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498374; x=1701103174; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=520WahFbhtKDJ8Yl98Jt7ndMsfdOC6iwzdv4xOjC0qc=; b=UkYbIB74FjiiB2RNfDECbCCY+mkdGoDwkf68T3h8FsIedw/PE3FaOxCsUHxWFDLP3U BidMvWmVyf45xiZGVIVWymfPSHC5iXQhWnB8B5WlIP0wJR1xsGFLh704L6sBRidETVhH MTQqQKj5exX72MTei6dilkMym3URxHUET86+LVvolAD3Ddza7k30WDyb/sAIUWROZeOl +rth5A1tCKOc5pmwuLYWSsfpapBCUQqMcIzDSsRWaH0tZC2ns9hhrl2UKBRGOqd3Pt5g DSSJ94Oh6GWlbzr4oIFuVT51QKTxAvreRfKE/8vCvqZEY89envb1BcEBeet753n/sK8L YN/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498374; x=1701103174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=520WahFbhtKDJ8Yl98Jt7ndMsfdOC6iwzdv4xOjC0qc=; b=aXExP5a7GjYXgGETLE8PN8h2HcE6L2CIL1Uf1sOmmVV7fs+AKc5JuKfrqxucKXz6FN +MTsx4gWffJTKZjp/Jg0EmRqawfIVbSvVNHx6t7fdmY6FuFQpQcmZqeL11lI82jwqg91 t2Yq48Su4qA1sbJ1PJAjvhz60vdw3t8NiGsmWSynT5Vi/D89QhSOGPZLf7SA0FXk8rYU o8zZKvEAwj89E0j8HCLp6qF+N5rwyZHvp5IDYyT/if9BOdrSW9N8MQHJYqSEA3FxDOJQ +djBBPD1EqyHhhPH66VKX1BCvbNAbO6y9+mbPau4QCYwgxgnndLkDFcOvKM3RNHJuomg skLw== X-Gm-Message-State: AOJu0YykwtbdUp57sIG+DlcWAzaWhbJbeAt2EzUaeh+zQV1DUfNsrFuy WRTZyYBcg3lssQWdA1ccRedfEZ2+F8zWoP216wCL2g== X-Google-Smtp-Source: AGHT+IHedxwc7o59pPtA7480YtVcr/1/1HEuBKKEuEfx9L1cbOOqstapHkefwbSp5iqzoPTxrGHzXw== X-Received: by 2002:a05:6a20:9189:b0:184:26d8:db7e with SMTP id v9-20020a056a20918900b0018426d8db7emr10017019pzd.14.1700498374333; Mon, 20 Nov 2023 08:39:34 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:34 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 20/33] patchtest: fix lic_files_chksum test regex Date: Mon, 20 Nov 2023 06:38:34 -1000 Message-Id: <2403d8ab38471a3c20cdb7722ba573b0b0774699.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190909 From: Trevor Gamblin the test_lic_files_chksum_modified_not_mentioned test in patchtest wasn't picking up on 'License-Update:' tags correctly. Use pyparsing's AtLineStart class to simplify the regex setup and search. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit dc9126e45e74b915faaf296037e7ece41785bf4a) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py index cb3e7c9d34..fa4a28c7b2 100644 --- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py +++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py @@ -12,8 +12,7 @@ class LicFilesChkSum(base.Metadata): metadata = 'LIC_FILES_CHKSUM' license = 'LICENSE' closed = 'CLOSED' - lictag = 'License-Update' - lictag_re = pyparsing.Regex("^%s:" % lictag) + lictag_re = pyparsing.AtLineStart("License-Update:") def test_lic_files_chksum_presence(self): if not self.added: @@ -71,5 +70,5 @@ class LicFilesChkSum(base.Metadata): if self.lictag_re.search_string(commit.commit_message): break else: - self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "%s" tag in commit message. Include it with a brief description' % (pn, self.lictag), + self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "License-Update:" tag in commit message. Include it with a brief description' % pn, data=[('Current checksum', pretest), ('New checksum', test)]) From patchwork Mon Nov 20 16:38:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 305AAC5B55F for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by mx.groups.io with SMTP id smtpd.web11.637.1700498377239639714 for ; Mon, 20 Nov 2023 08:39:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=wNuDUB9f; spf=softfail (domain: sakoman.com, ip: 209.85.167.170, mailfrom: steve@sakoman.com) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3b2f4a5ccebso3198716b6e.3 for ; Mon, 20 Nov 2023 08:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498376; x=1701103176; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CG+uNEliWPJJewp5+jR5tN6xV3766+phub5FNT/t2Y8=; b=wNuDUB9fSC9IUS8c7AoVlVHoBui7VMqwiyze0dQv+APirYXOxlUAzEvC/yqzv2+Bwy ogJB0Hw7dDwlrqzA9OKpp9XPnkpN+G52UCsz2cawNYcqQsR+uZO1gkFls+ZknjmDZwYR ZKxMpTIuQuwfheFOWr4leXkNHq5ve1UPpEQJSyKFhOmlb4BJ73fBDQBgpOkYREU+Ahn1 bVANB2tR2Sus5vY+/xMGzMPPJSh4cRbUPO4lBDzKLj2mv+LU5X21g2MV4HWKYEB8CfDg yBaeAVdjhDqcKTY0SQPsyWm5V1nzdWPmwj4qArC76KmzGmJUoEQK64n+xvwz45RNI+hJ 2Ilw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498376; x=1701103176; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CG+uNEliWPJJewp5+jR5tN6xV3766+phub5FNT/t2Y8=; b=I8EGZRjplaStgtyKlz6yLu8//TMIbm5DE2XSMc4ivIhzRknHcvBK3TaCk38CiAGydQ 3QxvpnXcdRcXylc1wK/aaPEYeOX/GstCmDBtU4ClHaAFygXH1/HnAVO2V2Gyg2oPwzHo 2HcsUbVLdL3Th2Hbup+wX2/IzMV0IlncyILN94NJUDDuZuTHM6B3BJSEmTXIceaYjd9o leHHdC+i9Bmfz7ZKXMzyagwVOl/XtdIVtQVuG2CpX/pAuY+ZDiMdz31Owi3zCS31MsPH b9CXOphVPiNPx68+F59HgfG7dKNDQHPz5Dj1zIsw+LVPk52PaZW0WwG3+9MfAqmhi1n7 vilQ== X-Gm-Message-State: AOJu0YzbZUCf7ts4LyanSr4De6RqGQOcOxSaW/Om6fFDvXFlC50pHxOP /NPf4B3eNeoQc3HZcP3UgfK2aoxRxM6X/tOhWPLVGw== X-Google-Smtp-Source: AGHT+IG1s8EAxgvXUI5GVzq+4K7Lw8TXjoY9ygt05azzycRrPMmAfvudccv7VHpkn3Y2YULq7T4CGw== X-Received: by 2002:a05:6808:1448:b0:3b2:e32f:fddd with SMTP id x8-20020a056808144800b003b2e32ffdddmr10452467oiv.43.1700498376107; Mon, 20 Nov 2023 08:39:36 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:35 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 21/33] patchtest-send-results: improve subject line Date: Mon, 20 Nov 2023 06:38:35 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190910 From: Trevor Gamblin Pull the actual email's subject line from the .mbox file and use that in patchtest's test results response, so that it's clearer which patch it is replying to. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 98ca0b151517b3544454fd5c1656a2de631c4897) Signed-off-by: Steve Sakoman --- scripts/patchtest-send-results | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 15ee5b077f..bb4604aeaf 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -53,7 +53,12 @@ with open(result_file, "r") as f: testresult = f.read() reply_contents = greeting + testresult + suggestions -subject_line = f"Patchtest results for {result_basename}" + +# we know these patch files will only contain a single patch, so only +# worry about the first element for getting the subject +mbox = mailbox.mbox(args.patch) +mbox_subject = mbox[0]['subject'] +subject_line = f"Patchtest results for {mbox_subject}" if "FAIL" in testresult: ses_client = boto3.client('ses', region_name='us-west-2') From patchwork Mon Nov 20 16:38:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D58DC5AE5C for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web10.617.1700498378832062882 for ; Mon, 20 Nov 2023 08:39:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=HzNEEi8Y; spf=softfail (domain: sakoman.com, ip: 209.85.210.174, mailfrom: steve@sakoman.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso3910687b3a.2 for ; Mon, 20 Nov 2023 08:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498378; x=1701103178; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NrXMK8ZKTcDceZgmVd46O8RrbSw82I25enJLJeo+nqo=; b=HzNEEi8YDg035OE3x817wbdBvoc0w8i1tqTglecTvi4EEdQ/JZmMuO8bCJ+0WfHBY1 qO6vnmOrPWW3t9NG6DMO5zZHWBLaEQ/j14fwVWG+N0GHd0WfStCNj5lTicpfaTh8uLcp MSyP7wIr1V+2zdJOBefPiODJV6YZ7Vfx8MF0rr/V95CIF15Y/bQrcGKMM48Af2FfuLDJ Mq0b0kK78ZyvBgOsOgfKKs6om6V6A8jzeydqoHI3mgrIG04zEJvTGgkTQPbAOr10XppF +5IjyTIZgRHejmbzkltCJIwPbnoD95hGA4obDRLkYjLIESAM8uJ6snGKnMe3EZ7F0h3e L8Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498378; x=1701103178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NrXMK8ZKTcDceZgmVd46O8RrbSw82I25enJLJeo+nqo=; b=k9tn1Y6Z4LvZ9TUtPa6MmFkUX6VfWFlY1grDP85uiZUUtaeEW5wKmtpj4Ddz2mWoq+ wqGq8gGlOjUNSpZFBlA0gWICwc/vdwkIjOL+Vp2tpmkVlzevVaJ+YduSZfVFlDd5DRfS pFwAp73sBxhvJSetFcvPXy/aKUvWDTXC2piC06lkoecLxHpXI3FdDPIhRkY30iHDjFU8 hAdSogpFjd0VuH6jy8q+MGiMxwOw/ILU0xMm9IotJucAjU9TRPDyPrtzHAa04cdO328k V/I2SxgcTu1CzPKn6rhIh646ACT5My7mleVFY4vmRmxEvcaV+B0iUBtO5ruNeS+hyvJ1 ixMA== X-Gm-Message-State: AOJu0YzLD6xjDmtEgRgHbVY1D2NaTXyXo0wu4Tj9/4tlxB+BjOUc0e3o TP8SyJPFbHp1T3vo6YDYQFxkegmheS1+KdfEHIEiwg== X-Google-Smtp-Source: AGHT+IHDDVFgQthXhgpNLYX4/FEZb+NLV/pdsSTjdzHHTT9yvYHhuLiCLl2qFisIN7XKCt0wDMl5hg== X-Received: by 2002:a05:6a00:3923:b0:68e:3eab:9e18 with SMTP id fh35-20020a056a00392300b0068e3eab9e18mr6405255pfb.12.1700498378009; Mon, 20 Nov 2023 08:39:38 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:37 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 22/33] patchtest: disable merge test Date: Mon, 20 Nov 2023 06:38:36 -1000 Message-Id: <0a8c8fef6ece7b0802f0b6f2d6aa2eb71afcc2fe.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190911 From: Trevor Gamblin Disable the merge-on-head test until patchtest properly handles merging of series subsets and accounts for patches that are rapidly merged (i.e. before patchtest is run). Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit e561c614dc72b7f8bf5e09a09bbe6ebc3cf500bb) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_mbox_merge.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py b/meta/lib/patchtest/tests/test_mbox_merge.py index f69d57c71b..535026209f 100644 --- a/meta/lib/patchtest/tests/test_mbox_merge.py +++ b/meta/lib/patchtest/tests/test_mbox_merge.py @@ -18,6 +18,7 @@ def headlog(): class Merge(base.Base): def test_series_merge_on_head(self): + self.skip("Merge test is disabled for now") if PatchTestInput.repo.branch != "master": self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) if not PatchTestInput.repo.ismerged: From patchwork Mon Nov 20 16:38:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17DC6C5AE5B for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web11.638.1700498380648573948 for ; Mon, 20 Nov 2023 08:39:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=rrqYVJe6; spf=softfail (domain: sakoman.com, ip: 209.85.210.180, mailfrom: steve@sakoman.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6bee11456baso3822647b3a.1 for ; Mon, 20 Nov 2023 08:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498380; x=1701103180; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=K2ZUPGvD9FBaBq+HskjD05uaQ5BquoN3VAPcZkVOFZs=; b=rrqYVJe6gDt5yQ81EiFCmuH3xZa0ft2UyIVE9ClOZb5E0sYWa61ckY2iOoaiQ6Hx+f ulK6I2mUPQ9SaXtB5XMhn1zcauaQKTOFuydxlBw8WvRtUNDi02G5DTl7PbEpSa/WcNnl Q1WkSuJFxRTt39AH7+19FuX/PH24m2qiAhAVXIpPE+CuCsawDb5jKdWN9GKy3+5tWktO sFXQJB1JDZUDNmvPu7lms+4OwDn5k7dOkuzYQ1VpCmYgCz7RNaokZ9lfqg1lzcjP+qLO 7PXCSa5DNaK9Do98MRWIytmoPBRY0vsm5Zv52iDfgf0apVjGwyp+RcyK2e24xComxV/R EKOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498380; x=1701103180; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K2ZUPGvD9FBaBq+HskjD05uaQ5BquoN3VAPcZkVOFZs=; b=AOthtC8O94rAPK6h/Zlm7K2CxPXa6+cIscEIJQd1lBDyJQVQo/KMS64hSpLJ5IaGPo vYkVHMGivd6NpSnXSJrg9aFpmJ/sTO2l2i8joZ1TS1wlR7yKeV89CJet1G2v8mJ1Ykia kMDMs8HrTCWkpCXuS2f3wGCBncZhauIX+TNcQDTSKRj8Umn2WlyHxRpQTfiC6WQ1HrwH KCLJWc6b4BghK11wd4JvElvoqR74ALhvesHs6hrjE+uGjY00KDxt91921SmjmxnZ9RjL 6e/njWPOjbsRqaMch0d/iDiwTOvfLaBIV13jwywgUM0VIe71+iqMnPguQ8rpNbH8v3eM VbAw== X-Gm-Message-State: AOJu0YxijBWazS/XI2Y1eOR3/692QWftJLMToyCpozF+F0MMaFaprn1P ih7V1DjWojeS3GujU+0u34D2KSzXEYgEj7lqFQCIpQ== X-Google-Smtp-Source: AGHT+IGgz3NoYIn9wA8VXYMiIb2V+qD+YeyitSwrxLzCMKA8r1OiRpxIGMEtspJ3dL2s+2fKxootQw== X-Received: by 2002:a05:6a20:9183:b0:187:ce9f:e198 with SMTP id v3-20020a056a20918300b00187ce9fe198mr7058362pzd.5.1700498379686; Mon, 20 Nov 2023 08:39:39 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:39 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 23/33] patchtest-send-results: check max line length, simplify responses Date: Mon, 20 Nov 2023 06:38:37 -1000 Message-Id: <5be9766d5c70e9b4e9ff57ba73e582f1dd6a18bf.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190912 From: Trevor Gamblin Check that the maximum line length of the testresult file is less than 220 characters, to help guard against malicious changes being sent in email responses. If any line exceeds this length, replace the normal testresults used in the response with a line stating that tests failed, but the results could not be processed. Also clean up the respone substrings slightly to go along with the change. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit b0d53cf587dc9afb97f00c1089e45b758e96dd7c) Signed-off-by: Steve Sakoman --- scripts/patchtest-send-results | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index bb4604aeaf..078651ec38 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -25,12 +25,8 @@ more information:\n\n---\n""" suggestions = """\n---\n\nPlease address the issues identified and submit a new revision of the patch, or alternatively, reply to this -email with an explanation of why the patch format should be accepted. -Note that patchtest may report failures in the merge-on-head test for -patches that are part of a series if they rely on changes from -preceeding entries. - -If you believe these results are due to an error in patchtest, please +email with an explanation of why the patch format should be accepted. If +you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). Thank you!""" @@ -52,8 +48,6 @@ testresult = None with open(result_file, "r") as f: testresult = f.read() -reply_contents = greeting + testresult + suggestions - # we know these patch files will only contain a single patch, so only # worry about the first element for getting the subject mbox = mailbox.mbox(args.patch) @@ -61,6 +55,13 @@ mbox_subject = mbox[0]['subject'] subject_line = f"Patchtest results for {mbox_subject}" if "FAIL" in testresult: + reply_contents = None + if len(max(open(result_file, 'r'), key=len)) > 220: + warning = "Tests failed for the patch, but the results log could not be processed due to excessive result line length." + reply_contents = greeting + warning + suggestions + else: + reply_contents = greeting + testresult + suggestions + ses_client = boto3.client('ses', region_name='us-west-2') response = ses_client.send_email( Source='patchtest@automation.yoctoproject.org', From patchwork Mon Nov 20 16:38:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2451DC5AD4C for ; Mon, 20 Nov 2023 16:39:43 +0000 (UTC) Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by mx.groups.io with SMTP id smtpd.web10.621.1700498382567376455 for ; Mon, 20 Nov 2023 08:39:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=eGCqP148; spf=softfail (domain: sakoman.com, ip: 209.85.166.174, mailfrom: steve@sakoman.com) Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3580b94ac2eso17309665ab.0 for ; Mon, 20 Nov 2023 08:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498381; x=1701103181; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RA5ha+QCL2KVAmoiqS92uNYbUAPRtjl1Au6aYRyHHYk=; b=eGCqP148nfWi20b7NWF7gBDIa9KuQKbz8iycBvpt3Q+8kCFWlfBAydrZCe4oTUd3KD MWT41n3lsC3xzhGb2rt1ZS7AdteP86cw0KGIJkeVwEo8egKzj1xKHQqLeSfzNjeU+7pM H8O4PdWnl7q4bhnEA5TIj0SyCKcu8yd3lIwE41fl6cQRoPR3vnIUlmODdk1eJUEo80mk 2m6uLaqor67ndpglsLo28W3ffhzwgfwprPIkcSu3z0cR5UnsNZGhTXrpL6zxj7oSx4se k/NC3WCjBkOemewM1PGbFwg4iX8H8EHmPQxeRAUfftxUfHiEZMRBjkuybPlhETUBtfD6 XMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498381; x=1701103181; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RA5ha+QCL2KVAmoiqS92uNYbUAPRtjl1Au6aYRyHHYk=; b=A93KFAglUF4RznYCllEzBsXmeED7w0zZXh3uF3d34X0t1YJyBd/WPWhubdq8KvrKjq 5uSYKSAbqnpY8SbeW+Svt1HeKoZUScL1CKAHm31EpVVLu1vdl70rIvS+vSKoxLlGivSi GESG0AC2DfjHUOtjazKP9fBpLBDkbLX7r8BiQr2y2xwy/EpUzKPhTb4Kc6J/UwuG8Il7 0i4L2wRXUk7LQ0ibFR1emJsteMBpYW4Hr8vVBAeNtxXqguxhBVtpHeZF3JF2F+xn48pp nrhx/oXIK21RQ45mIEu20+7II1akKbZAdbQQbHC4qrvcPgNc6LkqlLbqX3NEkiBrKFlQ YrgA== X-Gm-Message-State: AOJu0YyUev9gUAwbi/KzvIX5y7rvK0FmJ0Gm5xphW71TLYOS+DKhDmmM uigoi+2TBpWxSB5Zbhct+0TWP5o/qUn+pY4E0unpZg== X-Google-Smtp-Source: AGHT+IGTdt4vzR/ZqSZXD/C04qPR3ZYdcrs9dVvKCd2ZbIhwbhvG8ClfYI5D2hDTYWEMColqivqSWg== X-Received: by 2002:a05:6e02:348c:b0:34f:c7f7:18b with SMTP id bp12-20020a056e02348c00b0034fc7f7018bmr13094079ilb.2.1700498381532; Mon, 20 Nov 2023 08:39:41 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:41 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 24/33] patchtest/selftest: add XSKIP, update test files Date: Mon, 20 Nov 2023 06:38:38 -1000 Message-Id: <3941cb809f16ef0c11ef4a4321125a8f11020561.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190913 From: Trevor Gamblin Since we are skipping the merge test, two of the selftests now report SKIP instead of XPASS/XFAIL as expected. Adjust the two files to have the right endings for XSKIP, and add the category so that it can be used for more extensive testing in the future. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 3331f53c0be2575784a042bb2401eeba4f2a5a3e) Signed-off-by: Steve Sakoman --- ...ad.pass => Merge.test_series_merge_on_head.1.skip} | 0 ...ad.fail => Merge.test_series_merge_on_head.2.skip} | 0 meta/lib/patchtest/selftest/selftest | 11 ++++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.pass => Merge.test_series_merge_on_head.1.skip} (100%) rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.fail => Merge.test_series_merge_on_head.2.skip} (100%) diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip similarity index 100% rename from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass rename to meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip similarity index 100% rename from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail rename to meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip diff --git a/meta/lib/patchtest/selftest/selftest b/meta/lib/patchtest/selftest/selftest index 006d1badf8..6fad50ce61 100755 --- a/meta/lib/patchtest/selftest/selftest +++ b/meta/lib/patchtest/selftest/selftest @@ -18,14 +18,15 @@ parentdir = os.path.dirname(topdir) # path to the repo root repodir = os.path.dirname(os.path.dirname(parentdir)) -def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount): - total = passcount + skipcount + failcount + xpasscount + xfailcount + errorcount +def print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount): + total = passcount + skipcount + failcount + xpasscount + xfailcount + xskipcount + errorcount print("============================================================================") print("Testsuite summary for %s" % os.path.basename(topdir)) print("============================================================================") print("# TOTAL: %s" % str(total)) print("# XPASS: %s" % str(xpasscount)) print("# XFAIL: %s" % str(xfailcount)) + print("# XSKIP: %s" % str(xskipcount)) print("# PASS: %s" % str(passcount)) print("# FAIL: %s" % str(failcount)) print("# SKIP: %s" % str(skipcount)) @@ -48,6 +49,7 @@ if __name__ == '__main__': skipcount = 0 xpasscount = 0 xfailcount = 0 + xskipcount = 0 errorcount = 0 results = None @@ -71,6 +73,9 @@ if __name__ == '__main__': elif expected_result.upper() == "PASS" and result.upper() == "PASS": xpasscount = xpasscount + 1 print("XPASS: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) + elif expected_result.upper() == "SKIP" and result.upper() == "SKIP": + xskipcount = xskipcount + 1 + print("XSKIP: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) else: print("%s: %s (%s)" % (result.upper(), testid.strip("."), os.path.basename(patch))) if result.upper() == "PASS": @@ -86,4 +91,4 @@ if __name__ == '__main__': else: print ("No test for=%s" % patch) - print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount) + print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount) From patchwork Mon Nov 20 16:38:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F548C2BB3F for ; Mon, 20 Nov 2023 16:39:53 +0000 (UTC) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by mx.groups.io with SMTP id smtpd.web10.623.1700498386242719668 for ; Mon, 20 Nov 2023 08:39:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=mcG8idWx; spf=softfail (domain: sakoman.com, ip: 209.85.167.177, mailfrom: steve@sakoman.com) Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-3b6d80daae8so3087578b6e.2 for ; Mon, 20 Nov 2023 08:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498385; x=1701103185; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=u0y7xfvu1yJyk0JZtlXZhj/gjdsxBOJi2y9xDsjlSSc=; b=mcG8idWx4fRP3G5GKESvQ7iRE1txwJE6Uhba9fEOXmv3Vk5NtBZ4jQcHAkwkvZLXnA 2LpRyusd7xKWMZJsmqaMUcOVBKxnAAB8LQdkBmc5aCHZg+x3ZqhAppeGPRjg3MCXUZDV tLn5dnGb2IY+ffSmoaER/8kUShBPWVpUvlUwOYwgle+ypeHOypkXB7lCXSfyNroU1AfO O4vJahuuyeJbk2lcWhUJg+1xAzO9fgJd5cbkgKc3Ik4Yj7xkMCXO0WSEWsZGeG3zsbdW XA0uIu+8KwDw/VuyzLCj3IghkgTs38ZgrjsWLGm6H0OAT3/AqY5EEcu+FsWe6CVdgkYj BaTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498385; x=1701103185; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u0y7xfvu1yJyk0JZtlXZhj/gjdsxBOJi2y9xDsjlSSc=; b=b5HdFETdsyDOnEV90fWU9rvvEMOq4aQzBUyUoz5jShUaUoai/ccecq15nlPah+B4aJ MtqiuX8L7VLmV2AtxcDOx/amw5WnPgApmQortDBowZ1R2l1vQnwzxalbZy0HZc8nFIvG dXLIQ12vKJ31/uf6SCMyMqy/rX8Geek/1uC2tzGIhN1WViu7TZAH0R5FMpJ2veiTPN66 W1RROTliPZIZFIZ1DXLeitK7KKHTEzJoDqJubasZ/ARXCNNKPK2nUiO1fX1QPPh/litS HnBkHJWNI8zSBvcpKN6JBltwFMfqXgQeXeZIglZ1V5G7Gt3k3tt3/F7D7oOopdxNbK61 PveA== X-Gm-Message-State: AOJu0YxInTrzB82LXE4yEcVtQGDF+N5Fjlyv+Q2Hm+kYbKq2ibJrgvwQ wQmW3TmXlYTk6at0Ofk/gnf+zb1QJpzqzNcnzONuFw== X-Google-Smtp-Source: AGHT+IESOiHScR0dgjVFAnzOspnAgmEQraQvWx51+sht/zYSvttuRDOQkpxEERtf1Z6Ut+BaWOkzUQ== X-Received: by 2002:a05:6808:180f:b0:3a4:316c:8eeb with SMTP id bh15-20020a056808180f00b003a4316c8eebmr11130376oib.40.1700498383865; Mon, 20 Nov 2023 08:39:43 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:43 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 25/33] patchtest: simplify test directory structure Date: Mon, 20 Nov 2023 06:38:39 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190914 From: Trevor Gamblin Consolidate the various mbox tests into a new TestMbox class, metadata tests into TestMetadata, and patch tests into TestPatch. Also update the selftest filenames to match the changes. The test contents are not significantly changed (other than to reference the new class names). While this doesn't improve overall readability, it does result in more obvious categorization, and more importantly reduces the number of calls to setup tinfoil in the tests, resulting in a roughly 25% reduction in runtime. Before: [tgamblin@megalith poky]$ time ./meta/lib/patchtest/selftest/selftest XPASS: PatchSignedOffBy.test_signed_off_by_presence (file: PatchSignedOffBy.test_signed_off_by_presence.pass) XFAIL: Shortlog.test_shortlog_format (file: Shortlog.test_shortlog_format.fail) XFAIL: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.1.fail) XPASS: Shortlog.test_shortlog_length (file: Shortlog.test_shortlog_length.pass) XFAIL: CommitMessage.test_commit_message_presence (file: CommitMessage.test_commit_message_presence.fail) XFAIL: SrcUri.test_src_uri_left_files (file: SrcUri.test_src_uri_left_files.fail) XPASS: Author.test_author_valid (file: Author.test_author_valid.1.pass) XFAIL: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned (file: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail) XPASS: CVE.test_cve_tag_format (file: CVE.test_cve_tag_format.pass) XPASS: CVE.test_cve_presence_in_commit_message (file: CVE.test_cve_presence_in_commit_message.pass) XFAIL: CVE.test_cve_tag_format (file: CVE.test_cve_tag_format.fail) XFAIL: Author.test_author_valid (file: Author.test_author_valid.1.fail) XFAIL: LicFilesChkSum.test_lic_files_chksum_presence (file: LicFilesChkSum.test_lic_files_chksum_presence.fail) XSKIP: Merge.test_series_merge_on_head (file: Merge.test_series_merge_on_head.2.skip) XPASS: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.pass) XFAIL: SignedOffBy.test_signed_off_by_presence (file: SignedOffBy.test_signed_off_by_presence.1.fail) XPASS: Shortlog.test_shortlog_format (file: Shortlog.test_shortlog_format.pass) XFAIL: SignedOffBy.test_signed_off_by_presence (file: SignedOffBy.test_signed_off_by_presence.2.fail) XFAIL: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.2.fail) XFAIL: Summary.test_summary_presence (file: Summary.test_summary_presence.fail) XPASS: Author.test_author_valid (file: Author.test_author_valid.2.pass) XSKIP: Merge.test_series_merge_on_head (file: Merge.test_series_merge_on_head.1.skip) XPASS: Bugzilla.test_bugzilla_entry_format (file: Bugzilla.test_bugzilla_entry_format.pass) XFAIL: CVE.test_cve_presence_in_commit_message (file: CVE.test_cve_presence_in_commit_message.fail) XPASS: SignedOffBy.test_signed_off_by_presence (file: SignedOffBy.test_signed_off_by_presence.pass) XPASS: LicFilesChkSum.test_lic_files_chksum_presence (file: LicFilesChkSum.test_lic_files_chksum_presence.pass) XPASS: CommitMessage.test_commit_message_presence (file: CommitMessage.test_commit_message_presence.pass) XPASS: Summary.test_summary_presence (file: Summary.test_summary_presence.pass) XPASS: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned (file: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.pass) XFAIL: Shortlog.test_shortlog_length (file: Shortlog.test_shortlog_length.fail) XFAIL: PatchSignedOffBy.test_signed_off_by_presence (file: PatchSignedOffBy.test_signed_off_by_presence.fail) XFAIL: Bugzilla.test_bugzilla_entry_format (file: Bugzilla.test_bugzilla_entry_format.fail) XPASS: SrcUri.test_src_uri_left_files (file: SrcUri.test_src_uri_left_files.pass) XFAIL: Author.test_author_valid (file: Author.test_author_valid.2.fail) ============================================================================ Testsuite summary for patchtest ============================================================================ ============================================================================ real 24m14.386s user 1m13.599s sys 0m21.477s After: [tgamblin@megalith poky]$ time ./meta/lib/patchtest/selftest/selftest XFAIL: TestMbox.test_bugzilla_entry_format (file: TestMbox.test_bugzilla_entry_format.fail) XPASS: TestMetadata.test_summary_presence (file: TestMetadata.test_summary_presence.pass) XFAIL: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.1.fail) XFAIL: TestMetadata.test_src_uri_left_files (file: TestMetadata.test_src_uri_left_files.fail) XSKIP: TestMbox.test_series_merge_on_head (file: TestMbox.test_series_merge_on_head.2.skip) XPASS: TestMbox.test_commit_message_presence (file: TestMbox.test_commit_message_presence.pass) XFAIL: TestMbox.test_commit_message_presence (file: TestMbox.test_commit_message_presence.fail) XPASS: TestMbox.test_signed_off_by_presence (file: TestMbox.test_signed_off_by_presence.pass) XFAIL: TestPatch.test_cve_tag_format (file: TestPatch.test_cve_tag_format.fail) XFAIL: TestMbox.test_author_valid (file: TestMbox.test_author_valid.1.fail) XFAIL: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.fail) XPASS: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.pass) XFAIL: TestPatch.test_signed_off_by_presence (file: TestPatch.test_signed_off_by_presence.fail) XFAIL: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.fail) XFAIL: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.2.fail) XPASS: TestPatch.test_cve_tag_format (file: TestPatch.test_cve_tag_format.pass) XSKIP: TestMbox.test_series_merge_on_head (file: TestMbox.test_series_merge_on_head.1.skip) XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.pass) XPASS: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass) XPASS: TestMbox.test_bugzilla_entry_format (file: TestMbox.test_bugzilla_entry_format.pass) XPASS: TestMetadata.test_src_uri_left_files (file: TestMetadata.test_src_uri_left_files.pass) XPASS: TestMetadata.test_lic_files_chksum_presence (file: TestMetadata.test_lic_files_chksum_presence.pass) XPASS: TestMbox.test_cve_presence_in_commit_message (file: TestMbox.test_cve_presence_in_commit_message.pass) XFAIL: TestMbox.test_signed_off_by_presence (file: TestMbox.test_signed_off_by_presence.2.fail) XFAIL: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.fail) XFAIL: TestMetadata.test_lic_files_chksum_presence (file: TestMetadata.test_lic_files_chksum_presence.fail) XPASS: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.pass) XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.1.pass) XPASS: TestPatch.test_signed_off_by_presence (file: TestPatch.test_signed_off_by_presence.pass) XFAIL: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail) XPASS: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.pass) XFAIL: TestMbox.test_signed_off_by_presence (file: TestMbox.test_signed_off_by_presence.1.fail) XFAIL: TestMbox.test_cve_presence_in_commit_message (file: TestMbox.test_cve_presence_in_commit_message.fail) XFAIL: TestMetadata.test_summary_presence (file: TestMetadata.test_summary_presence.fail) ============================================================================ Testsuite summary for patchtest ============================================================================ ============================================================================ real 18m39.749s user 0m41.857s sys 0m14.708s Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit f788592da2fd0e21638ce2c3326675a060ba51cf) Signed-off-by: Steve Sakoman --- ...fail => TestMbox.test_author_valid.1.fail} | 0 ...pass => TestMbox.test_author_valid.1.pass} | 0 ...fail => TestMbox.test_author_valid.2.fail} | 0 ...pass => TestMbox.test_author_valid.2.pass} | 0 ... TestMbox.test_bugzilla_entry_format.fail} | 0 ... TestMbox.test_bugzilla_entry_format.pass} | 0 ...estMbox.test_commit_message_presence.fail} | 0 ...estMbox.test_commit_message_presence.pass} | 0 ....test_cve_presence_in_commit_message.fail} | 0 ....test_cve_presence_in_commit_message.pass} | 0 ....fail => TestMbox.test_mbox_format.1.fail} | 0 ....fail => TestMbox.test_mbox_format.2.fail} | 0 ...at.pass => TestMbox.test_mbox_format.pass} | 0 ...TestMbox.test_series_merge_on_head.1.skip} | 0 ...TestMbox.test_series_merge_on_head.2.skip} | 0 ...ail => TestMbox.test_shortlog_format.fail} | 0 ...ass => TestMbox.test_shortlog_format.pass} | 0 ...ail => TestMbox.test_shortlog_length.fail} | 2 +- ...ass => TestMbox.test_shortlog_length.pass} | 0 ...stMbox.test_signed_off_by_presence.1.fail} | 0 ...stMbox.test_signed_off_by_presence.2.fail} | 0 ...TestMbox.test_signed_off_by_presence.pass} | 0 ..._files_chksum_modified_not_mentioned.fail} | 0 ..._files_chksum_modified_not_mentioned.pass} | 0 ...adata.test_lic_files_chksum_presence.fail} | 0 ...adata.test_lic_files_chksum_presence.pass} | 0 ...TestMetadata.test_src_uri_left_files.fail} | 0 ...TestMetadata.test_src_uri_left_files.pass} | 0 ...> TestMetadata.test_summary_presence.fail} | 0 ...> TestMetadata.test_summary_presence.pass} | 0 ...ail => TestPatch.test_cve_tag_format.fail} | 0 ...ass => TestPatch.test_cve_tag_format.pass} | 0 ...estPatch.test_signed_off_by_presence.fail} | 0 ...estPatch.test_signed_off_by_presence.pass} | 0 meta/lib/patchtest/tests/test_mbox.py | 183 ++++++++++++++++ meta/lib/patchtest/tests/test_mbox_author.py | 29 --- .../lib/patchtest/tests/test_mbox_bugzilla.py | 20 -- meta/lib/patchtest/tests/test_mbox_cve.py | 38 ---- .../patchtest/tests/test_mbox_description.py | 15 -- meta/lib/patchtest/tests/test_mbox_format.py | 14 -- .../patchtest/tests/test_mbox_mailinglist.py | 62 ------ meta/lib/patchtest/tests/test_mbox_merge.py | 27 --- .../lib/patchtest/tests/test_mbox_shortlog.py | 39 ---- .../tests/test_mbox_signed_off_by.py | 27 --- meta/lib/patchtest/tests/test_metadata.py | 204 ++++++++++++++++++ .../tests/test_metadata_lic_files_chksum.py | 74 ------- .../patchtest/tests/test_metadata_license.py | 50 ----- .../tests/test_metadata_max_length.py | 25 --- .../patchtest/tests/test_metadata_src_uri.py | 73 ------- .../patchtest/tests/test_metadata_summary.py | 26 --- ...patch_upstream_status.py => test_patch.py} | 53 ++++- meta/lib/patchtest/tests/test_patch_cve.py | 37 ---- .../tests/test_patch_signed_off_by.py | 41 ---- 53 files changed, 436 insertions(+), 603 deletions(-) rename meta/lib/patchtest/selftest/files/{Author.test_author_valid.1.fail => TestMbox.test_author_valid.1.fail} (100%) rename meta/lib/patchtest/selftest/files/{Author.test_author_valid.1.pass => TestMbox.test_author_valid.1.pass} (100%) rename meta/lib/patchtest/selftest/files/{Author.test_author_valid.2.fail => TestMbox.test_author_valid.2.fail} (100%) rename meta/lib/patchtest/selftest/files/{Author.test_author_valid.2.pass => TestMbox.test_author_valid.2.pass} (100%) rename meta/lib/patchtest/selftest/files/{Bugzilla.test_bugzilla_entry_format.fail => TestMbox.test_bugzilla_entry_format.fail} (100%) rename meta/lib/patchtest/selftest/files/{Bugzilla.test_bugzilla_entry_format.pass => TestMbox.test_bugzilla_entry_format.pass} (100%) rename meta/lib/patchtest/selftest/files/{CommitMessage.test_commit_message_presence.fail => TestMbox.test_commit_message_presence.fail} (100%) rename meta/lib/patchtest/selftest/files/{CommitMessage.test_commit_message_presence.pass => TestMbox.test_commit_message_presence.pass} (100%) rename meta/lib/patchtest/selftest/files/{CVE.test_cve_presence_in_commit_message.fail => TestMbox.test_cve_presence_in_commit_message.fail} (100%) rename meta/lib/patchtest/selftest/files/{CVE.test_cve_presence_in_commit_message.pass => TestMbox.test_cve_presence_in_commit_message.pass} (100%) rename meta/lib/patchtest/selftest/files/{MboxFormat.test_mbox_format.1.fail => TestMbox.test_mbox_format.1.fail} (100%) rename meta/lib/patchtest/selftest/files/{MboxFormat.test_mbox_format.2.fail => TestMbox.test_mbox_format.2.fail} (100%) rename meta/lib/patchtest/selftest/files/{MboxFormat.test_mbox_format.pass => TestMbox.test_mbox_format.pass} (100%) rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.1.skip => TestMbox.test_series_merge_on_head.1.skip} (100%) rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.2.skip => TestMbox.test_series_merge_on_head.2.skip} (100%) rename meta/lib/patchtest/selftest/files/{Shortlog.test_shortlog_format.fail => TestMbox.test_shortlog_format.fail} (100%) rename meta/lib/patchtest/selftest/files/{CVE.test_cve_tag_format.pass => TestMbox.test_shortlog_format.pass} (100%) rename meta/lib/patchtest/selftest/files/{Shortlog.test_shortlog_length.fail => TestMbox.test_shortlog_length.fail} (97%) rename meta/lib/patchtest/selftest/files/{Shortlog.test_shortlog_format.pass => TestMbox.test_shortlog_length.pass} (100%) rename meta/lib/patchtest/selftest/files/{SignedOffBy.test_signed_off_by_presence.1.fail => TestMbox.test_signed_off_by_presence.1.fail} (100%) rename meta/lib/patchtest/selftest/files/{SignedOffBy.test_signed_off_by_presence.2.fail => TestMbox.test_signed_off_by_presence.2.fail} (100%) rename meta/lib/patchtest/selftest/files/{PatchSignedOffBy.test_signed_off_by_presence.pass => TestMbox.test_signed_off_by_presence.pass} (100%) rename meta/lib/patchtest/selftest/files/{LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail => TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail} (100%) rename meta/lib/patchtest/selftest/files/{LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.pass => TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass} (100%) rename meta/lib/patchtest/selftest/files/{LicFilesChkSum.test_lic_files_chksum_presence.fail => TestMetadata.test_lic_files_chksum_presence.fail} (100%) rename meta/lib/patchtest/selftest/files/{LicFilesChkSum.test_lic_files_chksum_presence.pass => TestMetadata.test_lic_files_chksum_presence.pass} (100%) rename meta/lib/patchtest/selftest/files/{SrcUri.test_src_uri_left_files.fail => TestMetadata.test_src_uri_left_files.fail} (100%) rename meta/lib/patchtest/selftest/files/{SrcUri.test_src_uri_left_files.pass => TestMetadata.test_src_uri_left_files.pass} (100%) rename meta/lib/patchtest/selftest/files/{Summary.test_summary_presence.fail => TestMetadata.test_summary_presence.fail} (100%) rename meta/lib/patchtest/selftest/files/{Summary.test_summary_presence.pass => TestMetadata.test_summary_presence.pass} (100%) rename meta/lib/patchtest/selftest/files/{CVE.test_cve_tag_format.fail => TestPatch.test_cve_tag_format.fail} (100%) rename meta/lib/patchtest/selftest/files/{Shortlog.test_shortlog_length.pass => TestPatch.test_cve_tag_format.pass} (100%) rename meta/lib/patchtest/selftest/files/{PatchSignedOffBy.test_signed_off_by_presence.fail => TestPatch.test_signed_off_by_presence.fail} (100%) rename meta/lib/patchtest/selftest/files/{SignedOffBy.test_signed_off_by_presence.pass => TestPatch.test_signed_off_by_presence.pass} (100%) create mode 100644 meta/lib/patchtest/tests/test_mbox.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_author.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_bugzilla.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_cve.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_description.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_format.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_mailinglist.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_merge.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_shortlog.py delete mode 100644 meta/lib/patchtest/tests/test_mbox_signed_off_by.py create mode 100644 meta/lib/patchtest/tests/test_metadata.py delete mode 100644 meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py delete mode 100644 meta/lib/patchtest/tests/test_metadata_license.py delete mode 100644 meta/lib/patchtest/tests/test_metadata_max_length.py delete mode 100644 meta/lib/patchtest/tests/test_metadata_src_uri.py delete mode 100644 meta/lib/patchtest/tests/test_metadata_summary.py rename meta/lib/patchtest/tests/{test_patch_upstream_status.py => test_patch.py} (56%) delete mode 100644 meta/lib/patchtest/tests/test_patch_cve.py delete mode 100644 meta/lib/patchtest/tests/test_patch_signed_off_by.py diff --git a/meta/lib/patchtest/selftest/files/Author.test_author_valid.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/Author.test_author_valid.1.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail diff --git a/meta/lib/patchtest/selftest/files/Author.test_author_valid.1.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Author.test_author_valid.1.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass diff --git a/meta/lib/patchtest/selftest/files/Author.test_author_valid.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/Author.test_author_valid.2.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail diff --git a/meta/lib/patchtest/selftest/files/Author.test_author_valid.2.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Author.test_author_valid.2.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass diff --git a/meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail diff --git a/meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass diff --git a/meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail diff --git a/meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass diff --git a/meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail diff --git a/meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass diff --git a/meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.1.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail diff --git a/meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.2.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail diff --git a/meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/MboxFormat.test_mbox_format.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip similarity index 100% rename from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip rename to meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip similarity index 100% rename from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip rename to meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip diff --git a/meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_format.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail diff --git a/meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass diff --git a/meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_length.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail similarity index 97% rename from meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_length.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail index 247b2a8a80..629e78540b 100644 --- a/meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_length.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail @@ -56,7 +56,7 @@ index 547587bef4..76975a6729 100644 -SRC_URI = "file://helloworld.c" +SRC_URI = "file://helloworld.c \ -+ file://CVE-1234-56789.patch \ ++ file://0001-Fix-CVE-1234-56789.patch \ + " S = "${WORKDIR}" diff --git a/meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_format.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass diff --git a/meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.1.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail diff --git a/meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.2.fail rename to meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail diff --git a/meta/lib/patchtest/selftest/files/PatchSignedOffBy.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/PatchSignedOffBy.test_signed_off_by_presence.pass rename to meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass diff --git a/meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail rename to meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail diff --git a/meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.pass rename to meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass diff --git a/meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_presence.fail rename to meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail diff --git a/meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/LicFilesChkSum.test_lic_files_chksum_presence.pass rename to meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass diff --git a/meta/lib/patchtest/selftest/files/SrcUri.test_src_uri_left_files.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/SrcUri.test_src_uri_left_files.fail rename to meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail diff --git a/meta/lib/patchtest/selftest/files/SrcUri.test_src_uri_left_files.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/SrcUri.test_src_uri_left_files.pass rename to meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass diff --git a/meta/lib/patchtest/selftest/files/Summary.test_summary_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/Summary.test_summary_presence.fail rename to meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail diff --git a/meta/lib/patchtest/selftest/files/Summary.test_summary_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Summary.test_summary_presence.pass rename to meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass diff --git a/meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.fail rename to meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail diff --git a/meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_length.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/Shortlog.test_shortlog_length.pass rename to meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass diff --git a/meta/lib/patchtest/selftest/files/PatchSignedOffBy.test_signed_off_by_presence.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail similarity index 100% rename from meta/lib/patchtest/selftest/files/PatchSignedOffBy.test_signed_off_by_presence.fail rename to meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail diff --git a/meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass similarity index 100% rename from meta/lib/patchtest/selftest/files/SignedOffBy.test_signed_off_by_presence.pass rename to meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass diff --git a/meta/lib/patchtest/tests/test_mbox.py b/meta/lib/patchtest/tests/test_mbox.py new file mode 100644 index 0000000000..95002c9e2a --- /dev/null +++ b/meta/lib/patchtest/tests/test_mbox.py @@ -0,0 +1,183 @@ +# Checks related to the patch's author +# +# Copyright (C) 2016 Intel Corporation +# +# SPDX-License-Identifier: GPL-2.0-only + +import base +import collections +import parse_cve_tags +import parse_shortlog +import parse_signed_off_by +import pyparsing +import subprocess +from data import PatchTestInput + +def headlog(): + output = subprocess.check_output( + "cd %s; git log --pretty='%%h#%%aN#%%cD:#%%s' -1" % PatchTestInput.repodir, + universal_newlines=True, + shell=True + ) + return output.split('#') + +class TestMbox(base.Base): + + auh_email = 'auh@auh.yoctoproject.org' + + invalids = [pyparsing.Regex("^Upgrade Helper.+"), + pyparsing.Regex(auh_email), + pyparsing.Regex("uh@not\.set"), + pyparsing.Regex("\S+@example\.com")] + + rexp_detect = pyparsing.Regex('\[\s?YOCTO.*\]') + rexp_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]') + revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') + prog = parse_cve_tags.cve_tag + patch_prog = parse_cve_tags.patch_cve_tag + signoff_prog = parse_signed_off_by.signed_off_by + revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') + maxlength = 90 + + # base paths of main yocto project sub-projects + paths = { + 'oe-core': ['meta-selftest', 'meta-skeleton', 'meta', 'scripts'], + 'bitbake': ['bitbake'], + 'documentation': ['documentation'], + 'poky': ['meta-poky','meta-yocto-bsp'], + 'oe': ['meta-gpe', 'meta-gnome', 'meta-efl', 'meta-networking', 'meta-multimedia','meta-initramfs', 'meta-ruby', 'contrib', 'meta-xfce', 'meta-filesystems', 'meta-perl', 'meta-webserver', 'meta-systemd', 'meta-oe', 'meta-python'] + } + + # scripts folder is a mix of oe-core and poky, most is oe-core code except: + poky_scripts = ['scripts/yocto-bsp', 'scripts/yocto-kernel', 'scripts/yocto-layer', 'scripts/lib/bsp'] + + Project = collections.namedtuple('Project', ['name', 'listemail', 'gitrepo', 'paths']) + + bitbake = Project(name='Bitbake', listemail='bitbake-devel@lists.openembedded.org', gitrepo='http://git.openembedded.org/bitbake/', paths=paths['bitbake']) + doc = Project(name='Documentantion', listemail='yocto@yoctoproject.org', gitrepo='http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/', paths=paths['documentation']) + poky = Project(name='Poky', listemail='poky@yoctoproject.org', gitrepo='http://git.yoctoproject.org/cgit/cgit.cgi/poky/', paths=paths['poky']) + oe = Project(name='oe', listemail='openembedded-devel@lists.openembedded.org', gitrepo='http://git.openembedded.org/meta-openembedded/', paths=paths['oe']) + + + def test_signed_off_by_presence(self): + for commit in TestMbox.commits: + # skip those patches that revert older commits, these do not required the tag presence + if self.revert_shortlog_regex.search_string(commit.shortlog): + continue + if not self.signoff_prog.search_string(commit.payload): + self.fail('Mbox is missing Signed-off-by. Add it manually or with "git commit --amend -s"', + commit=commit) + + def test_shortlog_format(self): + for commit in TestMbox.commits: + shortlog = commit.shortlog + if not shortlog.strip(): + self.skip('Empty shortlog, no reason to execute shortlog format test') + else: + # no reason to re-check on revert shortlogs + if shortlog.startswith('Revert "'): + continue + try: + parse_shortlog.shortlog.parseString(shortlog) + except pyparsing.ParseException as pe: + self.fail('Commit shortlog (first line of commit message) should follow the format ": "', + commit=commit) + + def test_shortlog_length(self): + for commit in TestMbox.commits: + # no reason to re-check on revert shortlogs + shortlog = commit.shortlog + if shortlog.startswith('Revert "'): + continue + l = len(shortlog) + if l > self.maxlength: + self.fail('Edit shortlog so that it is %d characters or less (currently %d characters)' % (self.maxlength, l), + commit=commit) + + def test_series_merge_on_head(self): + self.skip("Merge test is disabled for now") + if PatchTestInput.repo.branch != "master": + self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) + if not PatchTestInput.repo.ismerged: + commithash, author, date, shortlog = headlog() + self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', + data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) + + def test_target_mailing_list(self): + """In case of merge failure, check for other targeted projects""" + if PatchTestInput.repo.ismerged: + self.skip('Series merged, no reason to check other mailing lists') + + # a meta project may be indicted in the message subject, if this is the case, just fail + # TODO: there may be other project with no-meta prefix, we also need to detect these + project_regex = pyparsing.Regex("\[(?Pmeta-.+)\]") + for commit in TestMbox.commits: + match = project_regex.search_string(commit.subject) + if match: + self.fail('Series sent to the wrong mailing list. Check the project\'s README (%s) and send the patch to the indicated list' % match.group('project'), + commit=commit) + + for patch in self.patchset: + folders = patch.path.split('/') + base_path = folders[0] + for project in [self.bitbake, self.doc, self.oe, self.poky]: + if base_path in project.paths: + self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', + data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), + ('Patch\'s path:', patch.path)]) + + # check for poky's scripts code + if base_path.startswith('scripts'): + for poky_file in self.poky_scripts: + if patch.path.startswith(poky_file): + self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', + data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) + + def test_mbox_format(self): + if self.unidiff_parse_error: + self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', + data=[('Diff line',self.unidiff_parse_error)]) + + def test_commit_message_presence(self): + for commit in TestMbox.commits: + if not commit.commit_message.strip(): + self.fail('Mbox is missing a descriptive commit message. Please include a commit message on your patch explaining the change', commit=commit) + + def test_cve_presence_in_commit_message(self): + if self.unidiff_parse_error: + self.skip('Parse error %s' % self.unidiff_parse_error) + + # we are just interested in series that introduce CVE patches, thus discard other + # possibilities: modification to current CVEs, patch directly introduced into the + # recipe, upgrades already including the CVE, etc. + new_patches = [p for p in self.patchset if p.path.endswith('.patch') and p.is_added_file] + if not new_patches: + self.skip('No new patches introduced') + + for commit in TestMbox.commits: + # skip those patches that revert older commits, these do not required the tag presence + if self.revert_shortlog_regex.search_string(commit.shortlog): + continue + if not self.patch_prog.search_string(commit.payload): + self.skip("No CVE tag in added patch, so not needed in mbox") + elif not self.prog.search_string(commit.payload): + self.fail('Missing or incorrectly formatted CVE tag in mbox. Correct or include the CVE tag in the mbox with format: "CVE: CVE-YYYY-XXXX"', + commit=commit) + + def test_bugzilla_entry_format(self): + for commit in TestMbox.commits: + if not self.rexp_detect.search_string(commit.commit_message): + self.skip("No bug ID found") + elif not self.rexp_validation.search_string(commit.commit_message): + self.fail('Bugzilla issue ID is not correctly formatted - specify it with format: "[YOCTO #]"', commit=commit) + + def test_author_valid(self): + for commit in self.commits: + for invalid in self.invalids: + if invalid.search_string(commit.author): + self.fail('Invalid author %s. Resend the series with a valid patch author' % commit.author, commit=commit) + + def test_non_auh_upgrade(self): + for commit in self.commits: + if self.auh_email in commit.payload: + self.fail('Invalid author %s. Resend the series with a valid patch author' % self.auh_email, commit=commit) diff --git a/meta/lib/patchtest/tests/test_mbox_author.py b/meta/lib/patchtest/tests/test_mbox_author.py deleted file mode 100644 index 74bc441250..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_author.py +++ /dev/null @@ -1,29 +0,0 @@ -# Checks related to the patch's author -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import pyparsing - -class Author(base.Base): - - auh_email = 'auh@auh.yoctoproject.org' - - invalids = [pyparsing.Regex("^Upgrade Helper.+"), - pyparsing.Regex(auh_email), - pyparsing.Regex("uh@not\.set"), - pyparsing.Regex("\S+@example\.com")] - - - def test_author_valid(self): - for commit in self.commits: - for invalid in self.invalids: - if invalid.search_string(commit.author): - self.fail('Invalid author %s. Resend the series with a valid patch author' % commit.author, commit=commit) - - def test_non_auh_upgrade(self): - for commit in self.commits: - if self.auh_email in commit.payload: - self.fail('Invalid author %s. Resend the series with a valid patch author' % self.auh_email, commit=commit) diff --git a/meta/lib/patchtest/tests/test_mbox_bugzilla.py b/meta/lib/patchtest/tests/test_mbox_bugzilla.py deleted file mode 100644 index 99b529b755..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_bugzilla.py +++ /dev/null @@ -1,20 +0,0 @@ -# Checks related to the patch's bugzilla tag -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import pyparsing -import base - -class Bugzilla(base.Base): - rexp_detect = pyparsing.Regex('\[\s?YOCTO.*\]') - rexp_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]') - - def test_bugzilla_entry_format(self): - for commit in Bugzilla.commits: - if not self.rexp_detect.search_string(commit.commit_message): - self.skip("No bug ID found") - elif not self.rexp_validation.search_string(commit.commit_message): - self.fail('Bugzilla issue ID is not correctly formatted - specify it with format: "[YOCTO #]"', commit=commit) - diff --git a/meta/lib/patchtest/tests/test_mbox_cve.py b/meta/lib/patchtest/tests/test_mbox_cve.py deleted file mode 100644 index 29ab12cbb5..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_cve.py +++ /dev/null @@ -1,38 +0,0 @@ -# Checks related to the patch's CVE lines -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only -# - -import base -import parse_cve_tags -import pyparsing - -class CVE(base.Base): - - revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') - prog = parse_cve_tags.cve_tag - patch_prog = parse_cve_tags.patch_cve_tag - - def setUp(self): - if self.unidiff_parse_error: - self.skip('Parse error %s' % self.unidiff_parse_error) - - # we are just interested in series that introduce CVE patches, thus discard other - # possibilities: modification to current CVEs, patch directly introduced into the - # recipe, upgrades already including the CVE, etc. - new_patches = [p for p in self.patchset if p.path.endswith('.patch') and p.is_added_file] - if not new_patches: - self.skip('No new patches introduced') - - def test_cve_presence_in_commit_message(self): - for commit in CVE.commits: - # skip those patches that revert older commits, these do not required the tag presence - if self.revert_shortlog_regex.search_string(commit.shortlog): - continue - if not self.patch_prog.search_string(commit.payload): - self.skip("No CVE tag in added patch, so not needed in mbox") - elif not self.prog.search_string(commit.payload): - self.fail('Missing or incorrectly formatted CVE tag in mbox. Correct or include the CVE tag in the mbox with format: "CVE: CVE-YYYY-XXXX"', - commit=commit) diff --git a/meta/lib/patchtest/tests/test_mbox_description.py b/meta/lib/patchtest/tests/test_mbox_description.py deleted file mode 100644 index 7874f9d038..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_description.py +++ /dev/null @@ -1,15 +0,0 @@ -# Checks related to the patch's commit_message -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base - -class CommitMessage(base.Base): - - def test_commit_message_presence(self): - for commit in CommitMessage.commits: - if not commit.commit_message.strip(): - self.fail('Mbox is missing a descriptive commit message. Please include a commit message on your patch explaining the change', commit=commit) - diff --git a/meta/lib/patchtest/tests/test_mbox_format.py b/meta/lib/patchtest/tests/test_mbox_format.py deleted file mode 100644 index fea3793e2e..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_format.py +++ /dev/null @@ -1,14 +0,0 @@ -# Checks correct parsing of mboxes -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base - -class MboxFormat(base.Base): - - def test_mbox_format(self): - if self.unidiff_parse_error: - self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', - data=[('Diff line',self.unidiff_parse_error)]) diff --git a/meta/lib/patchtest/tests/test_mbox_mailinglist.py b/meta/lib/patchtest/tests/test_mbox_mailinglist.py deleted file mode 100644 index feff436089..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_mailinglist.py +++ /dev/null @@ -1,62 +0,0 @@ -# Check if the series was intended for other project (not OE-Core) -# -# Copyright (C) 2017 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import collections -import base -import pyparsing -from data import PatchTestInput - -class MailingList(base.Base): - - # base paths of main yocto project sub-projects - paths = { - 'oe-core': ['meta-selftest', 'meta-skeleton', 'meta', 'scripts'], - 'bitbake': ['bitbake'], - 'documentation': ['documentation'], - 'poky': ['meta-poky','meta-yocto-bsp'], - 'oe': ['meta-gpe', 'meta-gnome', 'meta-efl', 'meta-networking', 'meta-multimedia','meta-initramfs', 'meta-ruby', 'contrib', 'meta-xfce', 'meta-filesystems', 'meta-perl', 'meta-webserver', 'meta-systemd', 'meta-oe', 'meta-python'] - } - - # scripts folder is a mix of oe-core and poky, most is oe-core code except: - poky_scripts = ['scripts/yocto-bsp', 'scripts/yocto-kernel', 'scripts/yocto-layer', 'scripts/lib/bsp'] - - Project = collections.namedtuple('Project', ['name', 'listemail', 'gitrepo', 'paths']) - - bitbake = Project(name='Bitbake', listemail='bitbake-devel@lists.openembedded.org', gitrepo='http://git.openembedded.org/bitbake/', paths=paths['bitbake']) - doc = Project(name='Documentantion', listemail='yocto@yoctoproject.org', gitrepo='http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/', paths=paths['documentation']) - poky = Project(name='Poky', listemail='poky@yoctoproject.org', gitrepo='http://git.yoctoproject.org/cgit/cgit.cgi/poky/', paths=paths['poky']) - oe = Project(name='oe', listemail='openembedded-devel@lists.openembedded.org', gitrepo='http://git.openembedded.org/meta-openembedded/', paths=paths['oe']) - - - def test_target_mailing_list(self): - """In case of merge failure, check for other targeted projects""" - if PatchTestInput.repo.ismerged: - self.skip('Series merged, no reason to check other mailing lists') - - # a meta project may be indicted in the message subject, if this is the case, just fail - # TODO: there may be other project with no-meta prefix, we also need to detect these - project_regex = pyparsing.Regex("\[(?Pmeta-.+)\]") - for commit in MailingList.commits: - match = project_regex.search_string(commit.subject) - if match: - self.fail('Series sent to the wrong mailing list. Check the project\'s README (%s) and send the patch to the indicated list' % match.group('project'), - commit=commit) - - for patch in self.patchset: - folders = patch.path.split('/') - base_path = folders[0] - for project in [self.bitbake, self.doc, self.oe, self.poky]: - if base_path in project.paths: - self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', - data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), - ('Patch\'s path:', patch.path)]) - - # check for poky's scripts code - if base_path.startswith('scripts'): - for poky_file in self.poky_scripts: - if patch.path.startswith(poky_file): - self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', - data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py b/meta/lib/patchtest/tests/test_mbox_merge.py deleted file mode 100644 index 535026209f..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_merge.py +++ /dev/null @@ -1,27 +0,0 @@ -# Check if mbox was merged by patchtest -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import subprocess -import base -from data import PatchTestInput - -def headlog(): - output = subprocess.check_output( - "cd %s; git log --pretty='%%h#%%aN#%%cD:#%%s' -1" % PatchTestInput.repodir, - universal_newlines=True, - shell=True - ) - return output.split('#') - -class Merge(base.Base): - def test_series_merge_on_head(self): - self.skip("Merge test is disabled for now") - if PatchTestInput.repo.branch != "master": - self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) - if not PatchTestInput.repo.ismerged: - commithash, author, date, shortlog = headlog() - self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', - data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) diff --git a/meta/lib/patchtest/tests/test_mbox_shortlog.py b/meta/lib/patchtest/tests/test_mbox_shortlog.py deleted file mode 100644 index f5dbbc7807..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_shortlog.py +++ /dev/null @@ -1,39 +0,0 @@ -# Checks related to the patch's summary -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import parse_shortlog -import pyparsing - -maxlength = 90 - -class Shortlog(base.Base): - - def test_shortlog_format(self): - for commit in Shortlog.commits: - shortlog = commit.shortlog - if not shortlog.strip(): - self.skip('Empty shortlog, no reason to execute shortlog format test') - else: - # no reason to re-check on revert shortlogs - if shortlog.startswith('Revert "'): - continue - try: - parse_shortlog.shortlog.parseString(shortlog) - except pyparsing.ParseException as pe: - self.fail('Commit shortlog (first line of commit message) should follow the format ": "', - commit=commit) - - def test_shortlog_length(self): - for commit in Shortlog.commits: - # no reason to re-check on revert shortlogs - shortlog = commit.shortlog - if shortlog.startswith('Revert "'): - continue - l = len(shortlog) - if l > maxlength: - self.fail('Edit shortlog so that it is %d characters or less (currently %d characters)' % (maxlength, l), - commit=commit) diff --git a/meta/lib/patchtest/tests/test_mbox_signed_off_by.py b/meta/lib/patchtest/tests/test_mbox_signed_off_by.py deleted file mode 100644 index f3c5770961..0000000000 --- a/meta/lib/patchtest/tests/test_mbox_signed_off_by.py +++ /dev/null @@ -1,27 +0,0 @@ -# Checks related to the patch's signed-off-by lines -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import parse_signed_off_by -import pyparsing - -class SignedOffBy(base.Base): - - revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') - - @classmethod - def setUpClassLocal(cls): - # match self.mark with no '+' preceding it - cls.prog = parse_signed_off_by.signed_off_by - - def test_signed_off_by_presence(self): - for commit in SignedOffBy.commits: - # skip those patches that revert older commits, these do not required the tag presence - if self.revert_shortlog_regex.search_string(commit.shortlog): - continue - if not SignedOffBy.prog.search_string(commit.payload): - self.fail('Mbox is missing Signed-off-by. Add it manually or with "git commit --amend -s"', - commit=commit) diff --git a/meta/lib/patchtest/tests/test_metadata.py b/meta/lib/patchtest/tests/test_metadata.py new file mode 100644 index 0000000000..34e119174f --- /dev/null +++ b/meta/lib/patchtest/tests/test_metadata.py @@ -0,0 +1,204 @@ +# Checks related to the patch's LIC_FILES_CHKSUM metadata variable +# +# Copyright (C) 2016 Intel Corporation +# +# SPDX-License-Identifier: GPL-2.0-only + +import base +import os +import pyparsing +from data import PatchTestInput, PatchTestDataStore + +class TestMetadata(base.Metadata): + metadata_lic = 'LICENSE' + invalid_license = 'PATCHTESTINVALID' + metadata_chksum = 'LIC_FILES_CHKSUM' + license_var = 'LICENSE' + closed = 'CLOSED' + lictag_re = pyparsing.AtLineStart("License-Update:") + add_mark = pyparsing.Regex('\+ ') + max_length = 200 + metadata_src_uri = 'SRC_URI' + md5sum = 'md5sum' + sha256sum = 'sha256sum' + git_regex = pyparsing.Regex('^git\:\/\/.*') + metadata_summary = 'SUMMARY' + + def test_license_presence(self): + if not self.added: + self.skip('No added recipes, skipping test') + + # TODO: this is a workaround so we can parse the recipe not + # containing the LICENSE var: add some default license instead + # of INVALID into auto.conf, then remove this line at the end + auto_conf = os.path.join(os.environ.get('BUILDDIR'), 'conf', 'auto.conf') + open_flag = 'w' + if os.path.exists(auto_conf): + open_flag = 'a' + with open(auto_conf, open_flag) as fd: + for pn in self.added: + fd.write('LICENSE ??= "%s"\n' % self.invalid_license) + + no_license = False + for pn in self.added: + rd = self.tinfoil.parse_recipe(pn) + license = rd.getVar(self.metadata_lic) + if license == self.invalid_license: + no_license = True + break + + # remove auto.conf line or the file itself + if open_flag == 'w': + os.remove(auto_conf) + else: + fd = open(auto_conf, 'r') + lines = fd.readlines() + fd.close() + with open(auto_conf, 'w') as fd: + fd.write(''.join(lines[:-1])) + + if no_license: + self.fail('Recipe does not have the LICENSE field set.') + + def test_lic_files_chksum_presence(self): + if not self.added: + self.skip('No added recipes, skipping test') + + for pn in self.added: + rd = self.tinfoil.parse_recipe(pn) + pathname = rd.getVar('FILE') + # we are not interested in images + if '/images/' in pathname: + continue + lic_files_chksum = rd.getVar(self.metadata_chksum) + if rd.getVar(self.license_var) == self.closed: + continue + if not lic_files_chksum: + self.fail('%s is missing in newly added recipe' % self.metadata_chksum) + + def pretest_lic_files_chksum_modified_not_mentioned(self): + if not self.modified: + self.skip('No modified recipes, skipping pretest') + # get the proper metadata values + for pn in self.modified: + rd = self.tinfoil.parse_recipe(pn) + pathname = rd.getVar('FILE') + # we are not interested in images + if '/images/' in pathname: + continue + PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum) + + def test_lic_files_chksum_modified_not_mentioned(self): + if not self.modified: + self.skip('No modified recipes, skipping test') + + # get the proper metadata values + for pn in self.modified: + rd = self.tinfoil.parse_recipe(pn) + pathname = rd.getVar('FILE') + # we are not interested in images + if '/images/' in pathname: + continue + PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum) + # compare if there were changes between pre-merge and merge + for pn in self.modified: + pretest = PatchTestDataStore['pre%s-%s-%s' % (self.shortid(),self.metadata_chksum, pn)] + test = PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum, pn)] + + # TODO: this is workaround to avoid false-positives when pretest metadata is empty (not reason found yet) + # For more info, check bug 12284 + if not pretest: + return + + if pretest != test: + # if any patch on the series contain reference on the metadata, fail + for commit in self.commits: + if self.lictag_re.search_string(commit.commit_message): + break + else: + self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "License-Update:" tag in commit message. Include it with a brief description' % pn, + data=[('Current checksum', pretest), ('New checksum', test)]) + + def test_max_line_length(self): + for patch in self.patchset: + # for the moment, we are just interested in metadata + if patch.path.endswith('.patch'): + continue + payload = str(patch) + for line in payload.splitlines(): + if self.add_mark.search_string(line): + current_line_length = len(line[1:]) + if current_line_length > self.max_length: + self.fail('Patch line too long (current length %s, maximum is %s)' % (current_line_length, self.max_length), + data=[('Patch', patch.path), ('Line', '%s ...' % line[0:80])]) + + def pretest_src_uri_left_files(self): + # these tests just make sense on patches that can be merged + if not PatchTestInput.repo.canbemerged: + self.skip('Patch cannot be merged') + if not self.modified: + self.skip('No modified recipes, skipping pretest') + + # get the proper metadata values + for pn in self.modified: + # we are not interested in images + if 'core-image' in pn: + continue + rd = self.tinfoil.parse_recipe(pn) + PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata_src_uri, pn)] = rd.getVar(self.metadata_src_uri) + + def test_src_uri_left_files(self): + # these tests just make sense on patches that can be merged + if not PatchTestInput.repo.canbemerged: + self.skip('Patch cannot be merged') + if not self.modified: + self.skip('No modified recipes, skipping pretest') + + # get the proper metadata values + for pn in self.modified: + # we are not interested in images + if 'core-image' in pn: + continue + rd = self.tinfoil.parse_recipe(pn) + PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata_src_uri, pn)] = rd.getVar(self.metadata_src_uri) + + for pn in self.modified: + pretest_src_uri = PatchTestDataStore['pre%s-%s-%s' % (self.shortid(), self.metadata_src_uri, pn)].split() + test_src_uri = PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata_src_uri, pn)].split() + + pretest_files = set([os.path.basename(patch) for patch in pretest_src_uri if patch.startswith('file://')]) + test_files = set([os.path.basename(patch) for patch in test_src_uri if patch.startswith('file://')]) + + # check if files were removed + if len(test_files) < len(pretest_files): + + # get removals from patchset + filesremoved_from_patchset = set() + for patch in self.patchset: + if patch.is_removed_file: + filesremoved_from_patchset.add(os.path.basename(patch.path)) + + # get the deleted files from the SRC_URI + filesremoved_from_usr_uri = pretest_files - test_files + + # finally, get those patches removed at SRC_URI and not removed from the patchset + # TODO: we are not taking into account renames, so test may raise false positives + not_removed = filesremoved_from_usr_uri - filesremoved_from_patchset + if not_removed: + self.fail('Patches not removed from tree. Remove them and amend the submitted mbox', + data=[('Patch', f) for f in not_removed]) + + def test_summary_presence(self): + if not self.added: + self.skip('No added recipes, skipping test') + + for pn in self.added: + # we are not interested in images + if 'core-image' in pn: + continue + rd = self.tinfoil.parse_recipe(pn) + summary = rd.getVar(self.metadata_summary) + + # "${PN} version ${PN}-${PR}" is the default, so fail if default + if summary.startswith('%s version' % pn): + self.fail('%s is missing in newly added recipe' % self.metadata_summary) diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py deleted file mode 100644 index fa4a28c7b2..0000000000 --- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py +++ /dev/null @@ -1,74 +0,0 @@ -# Checks related to the patch's LIC_FILES_CHKSUM metadata variable -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import pyparsing -from data import PatchTestInput, PatchTestDataStore - -class LicFilesChkSum(base.Metadata): - metadata = 'LIC_FILES_CHKSUM' - license = 'LICENSE' - closed = 'CLOSED' - lictag_re = pyparsing.AtLineStart("License-Update:") - - def test_lic_files_chksum_presence(self): - if not self.added: - self.skip('No added recipes, skipping test') - - for pn in self.added: - rd = self.tinfoil.parse_recipe(pn) - pathname = rd.getVar('FILE') - # we are not interested in images - if '/images/' in pathname: - continue - lic_files_chksum = rd.getVar(self.metadata) - if rd.getVar(self.license) == self.closed: - continue - if not lic_files_chksum: - self.fail('%s is missing in newly added recipe' % self.metadata) - - def pretest_lic_files_chksum_modified_not_mentioned(self): - if not self.modified: - self.skip('No modified recipes, skipping pretest') - # get the proper metadata values - for pn in self.modified: - rd = self.tinfoil.parse_recipe(pn) - pathname = rd.getVar('FILE') - # we are not interested in images - if '/images/' in pathname: - continue - PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata,pn)] = rd.getVar(self.metadata) - - def test_lic_files_chksum_modified_not_mentioned(self): - if not self.modified: - self.skip('No modified recipes, skipping test') - - # get the proper metadata values - for pn in self.modified: - rd = self.tinfoil.parse_recipe(pn) - pathname = rd.getVar('FILE') - # we are not interested in images - if '/images/' in pathname: - continue - PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata,pn)] = rd.getVar(self.metadata) - # compare if there were changes between pre-merge and merge - for pn in self.modified: - pretest = PatchTestDataStore['pre%s-%s-%s' % (self.shortid(),self.metadata, pn)] - test = PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata, pn)] - - # TODO: this is workaround to avoid false-positives when pretest metadata is empty (not reason found yet) - # For more info, check bug 12284 - if not pretest: - return - - if pretest != test: - # if any patch on the series contain reference on the metadata, fail - for commit in self.commits: - if self.lictag_re.search_string(commit.commit_message): - break - else: - self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "License-Update:" tag in commit message. Include it with a brief description' % pn, - data=[('Current checksum', pretest), ('New checksum', test)]) diff --git a/meta/lib/patchtest/tests/test_metadata_license.py b/meta/lib/patchtest/tests/test_metadata_license.py deleted file mode 100644 index 1a7f09b747..0000000000 --- a/meta/lib/patchtest/tests/test_metadata_license.py +++ /dev/null @@ -1,50 +0,0 @@ -# Checks related to the patch's LIC_FILES_CHKSUM metadata variable -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import os -from data import PatchTestInput - -class License(base.Metadata): - metadata = 'LICENSE' - invalid_license = 'PATCHTESTINVALID' - - def test_license_presence(self): - if not self.added: - self.skip('No added recipes, skipping test') - - # TODO: this is a workaround so we can parse the recipe not - # containing the LICENSE var: add some default license instead - # of INVALID into auto.conf, then remove this line at the end - auto_conf = os.path.join(os.environ.get('BUILDDIR'), 'conf', 'auto.conf') - open_flag = 'w' - if os.path.exists(auto_conf): - open_flag = 'a' - with open(auto_conf, open_flag) as fd: - for pn in self.added: - fd.write('LICENSE ??= "%s"\n' % self.invalid_license) - - no_license = False - for pn in self.added: - rd = self.tinfoil.parse_recipe(pn) - license = rd.getVar(self.metadata) - if license == self.invalid_license: - no_license = True - break - - # remove auto.conf line or the file itself - if open_flag == 'w': - os.remove(auto_conf) - else: - fd = open(auto_conf, 'r') - lines = fd.readlines() - fd.close() - with open(auto_conf, 'w') as fd: - fd.write(''.join(lines[:-1])) - - if no_license: - self.fail('Recipe does not have the LICENSE field set.') - diff --git a/meta/lib/patchtest/tests/test_metadata_max_length.py b/meta/lib/patchtest/tests/test_metadata_max_length.py deleted file mode 100644 index 98c48ef787..0000000000 --- a/meta/lib/patchtest/tests/test_metadata_max_length.py +++ /dev/null @@ -1,25 +0,0 @@ -# Checks related to patch line lengths -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import pyparsing - -class MaxLength(base.Base): - add_mark = pyparsing.Regex('\+ ') - max_length = 200 - - def test_max_line_length(self): - for patch in self.patchset: - # for the moment, we are just interested in metadata - if patch.path.endswith('.patch'): - continue - payload = str(patch) - for line in payload.splitlines(): - if self.add_mark.search_string(line): - current_line_length = len(line[1:]) - if current_line_length > self.max_length: - self.fail('Patch line too long (current length %s, maximum is %s)' % (current_line_length, self.max_length), - data=[('Patch', patch.path), ('Line', '%s ...' % line[0:80])]) diff --git a/meta/lib/patchtest/tests/test_metadata_src_uri.py b/meta/lib/patchtest/tests/test_metadata_src_uri.py deleted file mode 100644 index 87a24ea937..0000000000 --- a/meta/lib/patchtest/tests/test_metadata_src_uri.py +++ /dev/null @@ -1,73 +0,0 @@ -# Checks related to the patch's SRC_URI metadata variable -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import os -import pyparsing -from data import PatchTestInput, PatchTestDataStore - -class SrcUri(base.Metadata): - - metadata = 'SRC_URI' - md5sum = 'md5sum' - sha256sum = 'sha256sum' - git_regex = pyparsing.Regex('^git\:\/\/.*') - - def setUp(self): - # these tests just make sense on patches that can be merged - if not PatchTestInput.repo.canbemerged: - self.skip('Patch cannot be merged') - - def pretest_src_uri_left_files(self): - if not self.modified: - self.skip('No modified recipes, skipping pretest') - - # get the proper metadata values - for pn in self.modified: - # we are not interested in images - if 'core-image' in pn: - continue - rd = self.tinfoil.parse_recipe(pn) - PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata, pn)] = rd.getVar(self.metadata) - - def test_src_uri_left_files(self): - if not self.modified: - self.skip('No modified recipes, skipping pretest') - - # get the proper metadata values - for pn in self.modified: - # we are not interested in images - if 'core-image' in pn: - continue - rd = self.tinfoil.parse_recipe(pn) - PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata, pn)] = rd.getVar(self.metadata) - - for pn in self.modified: - pretest_src_uri = PatchTestDataStore['pre%s-%s-%s' % (self.shortid(), self.metadata, pn)].split() - test_src_uri = PatchTestDataStore['%s-%s-%s' % (self.shortid(), self.metadata, pn)].split() - - pretest_files = set([os.path.basename(patch) for patch in pretest_src_uri if patch.startswith('file://')]) - test_files = set([os.path.basename(patch) for patch in test_src_uri if patch.startswith('file://')]) - - # check if files were removed - if len(test_files) < len(pretest_files): - - # get removals from patchset - filesremoved_from_patchset = set() - for patch in self.patchset: - if patch.is_removed_file: - filesremoved_from_patchset.add(os.path.basename(patch.path)) - - # get the deleted files from the SRC_URI - filesremoved_from_usr_uri = pretest_files - test_files - - # finally, get those patches removed at SRC_URI and not removed from the patchset - # TODO: we are not taking into account renames, so test may raise false positives - not_removed = filesremoved_from_usr_uri - filesremoved_from_patchset - if not_removed: - self.fail('Patches not removed from tree. Remove them and amend the submitted mbox', - data=[('Patch', f) for f in not_removed]) - diff --git a/meta/lib/patchtest/tests/test_metadata_summary.py b/meta/lib/patchtest/tests/test_metadata_summary.py deleted file mode 100644 index 170e79eb4b..0000000000 --- a/meta/lib/patchtest/tests/test_metadata_summary.py +++ /dev/null @@ -1,26 +0,0 @@ -# Checks related to the patch's summary metadata variable -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -from data import PatchTestInput - -class Summary(base.Metadata): - metadata = 'SUMMARY' - - def test_summary_presence(self): - if not self.added: - self.skip('No added recipes, skipping test') - - for pn in self.added: - # we are not interested in images - if 'core-image' in pn: - continue - rd = self.tinfoil.parse_recipe(pn) - summary = rd.getVar(self.metadata) - - # "${PN} version ${PN}-${PR}" is the default, so fail if default - if summary.startswith('%s version' % pn): - self.fail('%s is missing in newly added recipe' % self.metadata) diff --git a/meta/lib/patchtest/tests/test_patch_upstream_status.py b/meta/lib/patchtest/tests/test_patch.py similarity index 56% rename from meta/lib/patchtest/tests/test_patch_upstream_status.py rename to meta/lib/patchtest/tests/test_patch.py index a5b278304e..b6904b185f 100644 --- a/meta/lib/patchtest/tests/test_patch_upstream_status.py +++ b/meta/lib/patchtest/tests/test_patch.py @@ -1,15 +1,19 @@ -# Checks related to the patch's upstream-status lines +# Checks related to the patch's CVE lines # # Copyright (C) 2016 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only +# import base +import parse_signed_off_by import parse_upstream_status import pyparsing -class PatchUpstreamStatus(base.Base): +class TestPatch(base.Base): + re_cve_pattern = pyparsing.Regex("CVE\-\d{4}\-\d+") + re_cve_payload_tag = pyparsing.Regex("\+CVE:(\s+CVE\-\d{4}\-\d+)+") upstream_status_regex = pyparsing.AtLineStart("+" + "Upstream-Status") @classmethod @@ -20,17 +24,30 @@ class PatchUpstreamStatus(base.Base): if patch.path.endswith('.patch') and patch.is_added_file: cls.newpatches.append(patch) + cls.mark = str(parse_signed_off_by.signed_off_by_mark).strip('"') + + # match PatchSignedOffBy.mark with '+' preceding it + cls.prog = parse_signed_off_by.patch_signed_off_by + def setUp(self): if self.unidiff_parse_error: - self.skip('Python-unidiff parse error') + self.skip('Parse error %s' % self.unidiff_parse_error) + self.valid_status = ', '.join(parse_upstream_status.upstream_status_nonliteral_valid_status) self.standard_format = 'Upstream-Status: ' + # we are just interested in series that introduce CVE patches, thus discard other + # possibilities: modification to current CVEs, patch directly introduced into the + # recipe, upgrades already including the CVE, etc. + new_cves = [p for p in self.patchset if p.path.endswith('.patch') and p.is_added_file] + if not new_cves: + self.skip('No new CVE patches introduced') + def test_upstream_status_presence_format(self): - if not PatchUpstreamStatus.newpatches: + if not TestPatch.newpatches: self.skip("There are no new software patches, no reason to test Upstream-Status presence/format") - for newpatch in PatchUpstreamStatus.newpatches: + for newpatch in TestPatch.newpatches: payload = newpatch.__str__() if not self.upstream_status_regex.search_string(payload): self.fail('Added patch file is missing Upstream-Status in the header. Add Upstream-Status: to the header', @@ -57,3 +74,29 @@ class PatchUpstreamStatus(base.Base): except pyparsing.ParseException as pe: self.fail('Upstream-Status is in incorrect format', data=[('Current', pe.pstr), ('Standard format', self.standard_format), ('Valid status', self.valid_status)]) + + def test_signed_off_by_presence(self): + if not TestPatch.newpatches: + self.skip("There are no new software patches, no reason to test %s presence" % PatchSignedOffBy.mark) + + for newpatch in TestPatch.newpatches: + payload = newpatch.__str__() + for line in payload.splitlines(): + if self.patchmetadata_regex.match(line): + continue + if TestPatch.prog.search_string(payload): + break + else: + self.fail('A patch file has been added, but does not have a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) + + def test_cve_tag_format(self): + for commit in TestPatch.commits: + if self.re_cve_pattern.search_string(commit.shortlog) or self.re_cve_pattern.search_string(commit.commit_message): + tag_found = False + for line in commit.payload.splitlines(): + if self.re_cve_payload_tag.search_string(line): + tag_found = True + break + if not tag_found: + self.fail('Missing or incorrectly formatted CVE tag in patch file. Correct or include the CVE tag in the patch with format: "CVE: CVE-YYYY-XXXX"', + commit=commit) diff --git a/meta/lib/patchtest/tests/test_patch_cve.py b/meta/lib/patchtest/tests/test_patch_cve.py deleted file mode 100644 index c77848de45..0000000000 --- a/meta/lib/patchtest/tests/test_patch_cve.py +++ /dev/null @@ -1,37 +0,0 @@ -# Checks related to the patch's CVE lines -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only -# - -import base -import pyparsing - -class CVE(base.Base): - - re_cve_pattern = pyparsing.Regex("CVE\-\d{4}\-\d+") - re_cve_payload_tag = pyparsing.Regex("\+CVE:(\s+CVE\-\d{4}\-\d+)+") - - def setUp(self): - if self.unidiff_parse_error: - self.skip('Parse error %s' % self.unidiff_parse_error) - - # we are just interested in series that introduce CVE patches, thus discard other - # possibilities: modification to current CVEs, patch directly introduced into the - # recipe, upgrades already including the CVE, etc. - new_cves = [p for p in self.patchset if p.path.endswith('.patch') and p.is_added_file] - if not new_cves: - self.skip('No new CVE patches introduced') - - def test_cve_tag_format(self): - for commit in CVE.commits: - if self.re_cve_pattern.search_string(commit.shortlog) or self.re_cve_pattern.search_string(commit.commit_message): - tag_found = False - for line in commit.payload.splitlines(): - if self.re_cve_payload_tag.search_string(line): - tag_found = True - break - if not tag_found: - self.fail('Missing or incorrectly formatted CVE tag in patch file. Correct or include the CVE tag in the patch with format: "CVE: CVE-YYYY-XXXX"', - commit=commit) diff --git a/meta/lib/patchtest/tests/test_patch_signed_off_by.py b/meta/lib/patchtest/tests/test_patch_signed_off_by.py deleted file mode 100644 index b091ff6f10..0000000000 --- a/meta/lib/patchtest/tests/test_patch_signed_off_by.py +++ /dev/null @@ -1,41 +0,0 @@ -# Checks related to the patch's signed-off-by lines -# -# Copyright (C) 2016 Intel Corporation -# -# SPDX-License-Identifier: GPL-2.0-only - -import base -import parse_signed_off_by - -class PatchSignedOffBy(base.Base): - - @classmethod - def setUpClassLocal(cls): - cls.newpatches = [] - # get just those relevant patches: new software patches - for patch in cls.patchset: - if patch.path.endswith('.patch') and patch.is_added_file: - cls.newpatches.append(patch) - - cls.mark = str(parse_signed_off_by.signed_off_by_mark).strip('"') - - # match PatchSignedOffBy.mark with '+' preceding it - cls.prog = parse_signed_off_by.patch_signed_off_by - - def setUp(self): - if self.unidiff_parse_error: - self.skip('Parse error %s' % self.unidiff_parse_error) - - def test_signed_off_by_presence(self): - if not PatchSignedOffBy.newpatches: - self.skip("There are no new software patches, no reason to test %s presence" % PatchSignedOffBy.mark) - - for newpatch in PatchSignedOffBy.newpatches: - payload = newpatch.__str__() - for line in payload.splitlines(): - if self.patchmetadata_regex.match(line): - continue - if PatchSignedOffBy.prog.search_string(payload): - break - else: - self.fail('A patch file has been added, but does not have a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) From patchwork Mon Nov 20 16:38:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44540C5AD4C for ; Mon, 20 Nov 2023 16:39:53 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web11.642.1700498386924668359 for ; Mon, 20 Nov 2023 08:39:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=n2NfTGhY; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6c4eb5fda3cso4700671b3a.2 for ; Mon, 20 Nov 2023 08:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498386; x=1701103186; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RxAscVq9JXm5TS+3fZUPt92EEbZgyZmSBkdVaZXCz7o=; b=n2NfTGhYysqTVcP+ST2jDF25e9DOCQlw+Wel11ZbmbB8oRxF4XRkOU0JaHFO21IOhb 12R4sdVqwCgENVE6qXDzbHQ4BLHyy+GzS1B82bUDkyouFToTNd11eYsw6681I3CPYYXW 7OSZH9IPcPQRMVEVXrYxFmCE4WuoJq1T+WdvGfJeAX6lSZ/tgdeNilZgtfpBg0VuiHct X1teD+tveOin0vYHMx/g/5yurzm1wZE9yW/IGIzG9tSWMpMeUkBMOX1heixQe7HNQ6zm vvWVHh3Q54LoFvzitkEMN9ol6ZZDPwEmw94ipQCvgAALW+NMIt5SawbLdy+WpkVtFwUH REIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498386; x=1701103186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RxAscVq9JXm5TS+3fZUPt92EEbZgyZmSBkdVaZXCz7o=; b=tZa8nl8VcTjxKiqQqAm0JcWMjIXidFOed6V8EXytpoywujQouOpngysJzJ1BCZvUQU HqpHXNAZmzUSAg+APqCBpwiJ8amLmA692Tz48+z11euaLQBF4RWZYfwlV0VZhPYsSO76 KZ05+/mbAbsphJcMrMNjyt9Gx3fnf5wxmZ9LW0h61fFsqXAfCLhS+Hh0PN2U/8SEpvb5 JA2qCRWjuQ4WMZiIxIYGIrtphqwbeCqqu/qKorDjN/VFal1+IDnRlfqiKzvJ8v1DIjPQ bVWFYa2yQZ7TrikrqvO4YNntqMsqNP8J4AqK5T/kaYg5ejFbVby41aEan3noAGyvXr9+ hnJg== X-Gm-Message-State: AOJu0YztEWCZq9Qm3d8UdcvqBH7G7bgL+amkbzXfGmxnqI0+WTOPZayz kyN5V83ggNc8h4jiqVBQ9sfV5ywHYBhGSvs8UdyxYw== X-Google-Smtp-Source: AGHT+IFjupIq8kjJ4/uL5GfYgntafFAh0nlmwq12aQ5b/sYkI2Vf/j0NCjGR2iklj3/Hg9fm8QmDuQ== X-Received: by 2002:a05:6a21:6d97:b0:187:d808:f082 with SMTP id wl23-20020a056a216d9700b00187d808f082mr10454874pzb.48.1700498386006; Mon, 20 Nov 2023 08:39:46 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:45 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 26/33] patchtest: reduce checksum test output length Date: Mon, 20 Nov 2023 06:38:40 -1000 Message-Id: <24abdf75f75ad1f9ada19a9115ddac9d7997eb91.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190915 From: Trevor Gamblin The test_lic_files_chksum_modified_not_mentioned test in TestMetadata is outputting very long lines that fail the maximum length check when sending email results, preventing the actual errors from being displayed. Reduce the length of the failure message by rewording and removing redundant information. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 2e2625735181160e9760a6f3af4955bda2ea6d4d) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/patchtest/tests/test_metadata.py b/meta/lib/patchtest/tests/test_metadata.py index 34e119174f..3742760b45 100644 --- a/meta/lib/patchtest/tests/test_metadata.py +++ b/meta/lib/patchtest/tests/test_metadata.py @@ -116,7 +116,7 @@ class TestMetadata(base.Metadata): if self.lictag_re.search_string(commit.commit_message): break else: - self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "License-Update:" tag in commit message. Include it with a brief description' % pn, + self.fail('LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message', data=[('Current checksum', pretest), ('New checksum', test)]) def test_max_line_length(self): From patchwork Mon Nov 20 16:38:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FACAC197A0 for ; Mon, 20 Nov 2023 16:39:53 +0000 (UTC) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by mx.groups.io with SMTP id smtpd.web11.649.1700498389589328181 for ; Mon, 20 Nov 2023 08:39:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ZXwAU1N5; spf=softfail (domain: sakoman.com, ip: 209.85.167.174, mailfrom: steve@sakoman.com) Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3b2df2fb611so3333896b6e.0 for ; Mon, 20 Nov 2023 08:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498388; x=1701103188; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BstJjODz7uGY3FQlmtrGKH232/qPeLK8Bjexm+xDA1g=; b=ZXwAU1N5K8DhDe75An3l5c4u2y3lM0N1AFegTARZWad+zLFYDOJIzB4ZvUuq0bbrc6 zndXzTZn2+6wq29RrXc26hnjPPbQPg023efCCGZzwHLXLdo07wGEMeVfuxDH36xsX0E6 0nRW2icWiqLkouYbu5tvussD7jABE4mNXgHa3XWcLPmBf1O+owVkaarW2LtURNUJg4+o z2oHOuLZYSgz/6ijcIjC0IIUBOL+0ziasObmiaUkrd2TKfEsosleveQOFrP+0jZGrr4C I+Kb28k6bB4ddlNj7THZsQFov+QyzT+juj8jqTi82ifJ7LPC6ytIWtEb6q6UwsBc414B Hxbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498388; x=1701103188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BstJjODz7uGY3FQlmtrGKH232/qPeLK8Bjexm+xDA1g=; b=jbpkIhHJpKojt3TKRI2Jtu/+Azwtkmvv1Ra+8g7Okdu+FH4zABb3nzeNN/tvLlXGLv d4zpExcldLzHJtDyKIKMr3Qx6pQP8diTTnTvAb3Y4bYYDp64y+mF+rQUjcY+5OKhtJ4Z 2r98/0P/Todom3ciFOOGOV8C+9M2J5yBl0qDYgBcxhGndofsuVAdw1T1l4CS8pIXuq42 fphstaWr07h4WgWT6st+IpdcHZQ2H9EJgxjYkUFtGlX2SY6TXRs6bd2r2zotpuKs+50O tbEA3Fe1khUcPPLztJrhRHtvQnh+GwKlh3lR6rW+zlJ3XzhVjp2i+a1hcgvaw40wP8rK Hq4g== X-Gm-Message-State: AOJu0Yyifhikhs1/AcHBqsBFG1P7/TJLb0mn3lq057I3khtoEqJc6Dm/ fox5JcLb85Ed0obdSD8HCLyQJtYQg6yy7l2H5nm+BQ== X-Google-Smtp-Source: AGHT+IHAey5GecYD/5+zpuR4c53WGsP0TEDvDYNgkaRnJDWE3eH9UHQUzzjRlLbFhKUBOWSTSHwYSQ== X-Received: by 2002:a05:6808:10c7:b0:3b6:4e53:e7ac with SMTP id s7-20020a05680810c700b003b64e53e7acmr11774415ois.56.1700498387948; Mon, 20 Nov 2023 08:39:47 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:47 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 27/33] patchtest: shorten test result outputs Date: Mon, 20 Nov 2023 06:38:41 -1000 Message-Id: <0d518057b8e4d8b68fb542115a18ec180897693f.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190916 From: Trevor Gamblin Some test result lines in TestMbox and TestPatch are still too long to avoid being flagged by the mailer script. Clean them up by removing redundant information, so that they are all under the length limit of 220 characters. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit c10d0bb542b23fbdc14d76dfa8e5885aa4d33083) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_mbox.py | 14 +++++++------- meta/lib/patchtest/tests/test_patch.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meta/lib/patchtest/tests/test_mbox.py b/meta/lib/patchtest/tests/test_mbox.py index 95002c9e2a..2449564d0f 100644 --- a/meta/lib/patchtest/tests/test_mbox.py +++ b/meta/lib/patchtest/tests/test_mbox.py @@ -100,7 +100,7 @@ class TestMbox(base.Base): self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) if not PatchTestInput.repo.ismerged: commithash, author, date, shortlog = headlog() - self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', + self.fail('Series does not apply on top of target branch %s' % PatchTestInput.repo.branch, data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) def test_target_mailing_list(self): @@ -114,7 +114,7 @@ class TestMbox(base.Base): for commit in TestMbox.commits: match = project_regex.search_string(commit.subject) if match: - self.fail('Series sent to the wrong mailing list. Check the project\'s README (%s) and send the patch to the indicated list' % match.group('project'), + self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists', commit=commit) for patch in self.patchset: @@ -122,7 +122,7 @@ class TestMbox(base.Base): base_path = folders[0] for project in [self.bitbake, self.doc, self.oe, self.poky]: if base_path in project.paths: - self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', + self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists', data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), ('Patch\'s path:', patch.path)]) @@ -130,18 +130,18 @@ class TestMbox(base.Base): if base_path.startswith('scripts'): for poky_file in self.poky_scripts: if patch.path.startswith(poky_file): - self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', + self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists', data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) def test_mbox_format(self): if self.unidiff_parse_error: - self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', + self.fail('Series has malformed diff lines. Create the series again using git-format-patch and ensure it applies using git am', data=[('Diff line',self.unidiff_parse_error)]) def test_commit_message_presence(self): for commit in TestMbox.commits: if not commit.commit_message.strip(): - self.fail('Mbox is missing a descriptive commit message. Please include a commit message on your patch explaining the change', commit=commit) + self.fail('Please include a commit message on your patch explaining the change', commit=commit) def test_cve_presence_in_commit_message(self): if self.unidiff_parse_error: @@ -161,7 +161,7 @@ class TestMbox(base.Base): if not self.patch_prog.search_string(commit.payload): self.skip("No CVE tag in added patch, so not needed in mbox") elif not self.prog.search_string(commit.payload): - self.fail('Missing or incorrectly formatted CVE tag in mbox. Correct or include the CVE tag in the mbox with format: "CVE: CVE-YYYY-XXXX"', + self.fail('A CVE tag should be provided in the commit message with format: "CVE: CVE-YYYY-XXXX"', commit=commit) def test_bugzilla_entry_format(self): diff --git a/meta/lib/patchtest/tests/test_patch.py b/meta/lib/patchtest/tests/test_patch.py index b6904b185f..65d0f930b0 100644 --- a/meta/lib/patchtest/tests/test_patch.py +++ b/meta/lib/patchtest/tests/test_patch.py @@ -50,7 +50,7 @@ class TestPatch(base.Base): for newpatch in TestPatch.newpatches: payload = newpatch.__str__() if not self.upstream_status_regex.search_string(payload): - self.fail('Added patch file is missing Upstream-Status in the header. Add Upstream-Status: to the header', + self.fail('Added patch file is missing Upstream-Status: in the commit message', data=[('Standard format', self.standard_format), ('Valid status', self.valid_status)]) for line in payload.splitlines(): if self.patchmetadata_regex.match(line): @@ -87,7 +87,7 @@ class TestPatch(base.Base): if TestPatch.prog.search_string(payload): break else: - self.fail('A patch file has been added, but does not have a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) + self.fail('A patch file has been added without a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) def test_cve_tag_format(self): for commit in TestPatch.commits: From patchwork Mon Nov 20 16:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B45EC5AE5E for ; Mon, 20 Nov 2023 16:39:53 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web10.626.1700498390796690810 for ; Mon, 20 Nov 2023 08:39:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Agv++3hY; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6cbb71c3020so252654b3a.1 for ; Mon, 20 Nov 2023 08:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498390; x=1701103190; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7rDtdfLZPgQRausMXu9ENTt6v+X79nssneRN09gSsxU=; b=Agv++3hY9O8rYN0CAu7CUKDNI/cHTf/eWNM+SEiixAwL/k8elHKGXHO5S/wGIcx4yq FmkQjldrfPU8192Zfdym41YIkdSmpVqNdgugVBEX/m/01LAU/qWnBtUi/T4qwVIgLx+r 2Ow2gxgTTL4jYSDJr+jDsZB06Bg3czQNv3m5LLXTLPOGkG+HfntauajXTHq5O5RLkcFH 2VNRMK8am9H7uKLq4AuW8bFNFtzTrDk8d8aGvbOuAvyN/2biFqwgSGXSeoLrq+oZlAb3 VVvofZD0XhUfybndpsbaM8mkCMgMz9kW+jlfJ/6T6QaWH7GRT+1A3B9QAsRSV4bNNWyB RUSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498390; x=1701103190; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7rDtdfLZPgQRausMXu9ENTt6v+X79nssneRN09gSsxU=; b=vqxdEgpHeP6w8ebVUqoQTw8Gh5pRCDZ6p41AOf2z+aO1sZA0Q2XIKxQO74BMOnJ2eB EqF19uEVN9tnP/B8OlFoUfGmKr4u/rdsQIOddk7BVrNe6mG2vDmDMNcuv3t5MdVN/kKw rUscsf1CsY59iDYA3WABEBobzlgvxb840/WeRhn5HR9nYKblvd6ff8UdOjXHAHXqzEG/ xt+YQZAUDn+ATp6vhCHA2Ogd//7lpYp6Fbid0LT73UDf4O3loHWhXfO6VLs88E7FImEI 4tMl1FrruiE+iV/K98D0ndGg6eubqCPMpuCB857S/J2q9IaHCNKNySTtQ2AFWf56Ky4s vOPg== X-Gm-Message-State: AOJu0Yy5HyL6/qKdc/tgINxD46YWt/HzY8O8MzFnszgzWWx6+cg28HVf epNDGMc8nxesv+EU2KmK03LE4Qn/spc/6mRk5zJ7sA== X-Google-Smtp-Source: AGHT+IEAasp1rCsf1JJAtNz6kKLcxW74huZRLfb3pH7HivoQ42rQP0YyRLezEln6HI6CUm74oLp84Q== X-Received: by 2002:a05:6a20:1607:b0:15e:9923:3e35 with SMTP id l7-20020a056a20160700b0015e99233e35mr20596581pzj.19.1700498389831; Mon, 20 Nov 2023 08:39:49 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:49 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 28/33] patchtest-send-results: send results to submitter Date: Mon, 20 Nov 2023 06:38:42 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190917 From: Trevor Gamblin Modify patchtest-send-results so that it extracts the submitter's email address and responds to them with the patch testresults. Also make a minor adjustment to the suggestions provided with each email and include a link to the Patchtest wiki page for additional clarification on specific failures. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 64ed88e32cf9e04772319ff6e66c602d1cff4fd7) Signed-off-by: Steve Sakoman --- scripts/patchtest-send-results | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 078651ec38..01b071159b 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -17,6 +17,7 @@ import boto3 import configparser import mailbox import os +import re import sys greeting = """Thank you for your submission. Patchtest identified one @@ -25,10 +26,12 @@ more information:\n\n---\n""" suggestions = """\n---\n\nPlease address the issues identified and submit a new revision of the patch, or alternatively, reply to this -email with an explanation of why the patch format should be accepted. If -you believe these results are due to an error in patchtest, please -submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' -category under 'Yocto Project Subprojects'). Thank you!""" +email with an explanation of why the patch should be accepted. If you +believe these results are due to an error in patchtest, please submit a +bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category +under 'Yocto Project Subprojects'). For more information on specific +failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank +you!""" parser = argparse.ArgumentParser(description="Send patchtest results to a submitter for a given patch") parser.add_argument("-p", "--patch", dest="patch", required=True, help="The patch file to summarize") @@ -54,6 +57,10 @@ mbox = mailbox.mbox(args.patch) mbox_subject = mbox[0]['subject'] subject_line = f"Patchtest results for {mbox_subject}" +# extract the submitter email address and use it as the reply address +# for the results +reply_address = re.findall("<(.*)>", mbox[0]['from']) + if "FAIL" in testresult: reply_contents = None if len(max(open(result_file, 'r'), key=len)) > 220: @@ -66,9 +73,9 @@ if "FAIL" in testresult: response = ses_client.send_email( Source='patchtest@automation.yoctoproject.org', Destination={ - 'ToAddresses': ['test-list@lists.yoctoproject.org'], + 'CcAddresses': ['openembedded-core@lists.openembedded.org'], }, - ReplyToAddresses=['test-list@lists.yoctoproject.org'], + ReplyToAddresses=reply_address, Message={ 'Subject': { 'Data': subject_line, From patchwork Mon Nov 20 16:38:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34888 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B3D3C5AE5B for ; Mon, 20 Nov 2023 16:39:53 +0000 (UTC) Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by mx.groups.io with SMTP id smtpd.web10.627.1700498393014286263 for ; Mon, 20 Nov 2023 08:39:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=SW3PcxPB; spf=softfail (domain: sakoman.com, ip: 209.85.166.169, mailfrom: steve@sakoman.com) Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-35749078a59so12408915ab.3 for ; Mon, 20 Nov 2023 08:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498392; x=1701103192; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iOAuzL4onpCQ3AJ+upQyFx0xMBqZO2TZ4XqgHb9R148=; b=SW3PcxPB1AQZ1wTg6dtR0vqDoEMiq/Kts8pzV//wvbFNtYa/LpTIdW45h+/4FFDxii 2g7lrufY+F6ugljUX69wZXXEsy8+ieVAPYNpqJwvpWQBigMDY0HTAc+XaLpFvoKA+zX6 DkWZU6oU3oiuf6tcY7Gvi+zFVxJyjtEjuvn/wsYl/Myu/OfOcbD8U6CxpQC+wxgyslEw NFTrZxjalOB7WL/8vJUBRZfqML94uwCD7LiBciaGTV5jfDBwGjXescGhTanmkZd5x8rk cYeJKxBMtHuXa2c2ElIYMhRE5U4WyRN570MLl/I37GJwY2fVRC+3sDkNytJzSArUXnXr tKEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498392; x=1701103192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iOAuzL4onpCQ3AJ+upQyFx0xMBqZO2TZ4XqgHb9R148=; b=W/RP6TjvZ2wFaGkolvsscpuWYUVPhqw0eTuP5T8LrMgfVxZFF1ce2EC4/3WkViW0Re lMEG5wq58nYWSjCpz78yYBbxOyrxy+VRxzWCa3YA56a8C4FWlxxNYsdDHxiP+qeDDM8N +XxtFArSJ9juAVytzH+sThQrZi46OtgugfGCB07vdhfUPLl7zMCIBeI6eCXtGfP3NhXU F3YTvnN46ztU+PzP7bf0JVkkt7u0bqAYarWIPpGs+PsqI7r2ahvHszcCdpW0EXnrHhly s+dl8m66TGR9pKGx3oi3OKUEEcuEWqzOQIX1yPoi10uDGlihUs1jVWjz94GA/CLogQhA Homg== X-Gm-Message-State: AOJu0YwgWp5+9TVpNPfHlYpDzPfeC0BVzXwi7T2zL1eNv2MsnP9BDJ9p Gvj68aGC1sUX/92J37glnHBJiObwwr1tyVuM9X1/QA== X-Google-Smtp-Source: AGHT+IFM0Lp72U2HDjQdQzuXM6c5MQrcEnPLt3FkYj/2ynSa0enQwXs9q6+TswvqtZgniUVSGUstaQ== X-Received: by 2002:a05:6e02:b4d:b0:357:704a:8699 with SMTP id f13-20020a056e020b4d00b00357704a8699mr11618147ilu.8.1700498391935; Mon, 20 Nov 2023 08:39:51 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:51 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 29/33] patchtest-send-results: add In-Reply-To Date: Mon, 20 Nov 2023 06:38:43 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:39:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190918 From: Trevor Gamblin Rework the script for sending results to use send_raw_email and specify the 'In-Reply-To' field so that patchtest replies to the emails, rather than sending them standalone to the submitter and mailing list. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 0c45c92e7f26aea4edf2cfa577b7ba51384e59d3) Signed-off-by: Steve Sakoman --- scripts/patchtest-send-results | 39 ++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 01b071159b..1df81f943a 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -59,7 +59,16 @@ subject_line = f"Patchtest results for {mbox_subject}" # extract the submitter email address and use it as the reply address # for the results -reply_address = re.findall("<(.*)>", mbox[0]['from']) +reply_address = re.findall("<(.*)>", mbox[0]['from'])[0] + +# extract the message ID and use that as the in-reply-to address +in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0] + +# the address the results email is sent from +from_address = "patchtest@automation.yoctoproject.org" + +# mailing list to CC +cc_address = "openembedded-core@lists.openembedded.org" if "FAIL" in testresult: reply_contents = None @@ -70,24 +79,18 @@ if "FAIL" in testresult: reply_contents = greeting + testresult + suggestions ses_client = boto3.client('ses', region_name='us-west-2') - response = ses_client.send_email( - Source='patchtest@automation.yoctoproject.org', - Destination={ - 'CcAddresses': ['openembedded-core@lists.openembedded.org'], + raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \ + '\nCC: ' + cc_address + '\nSubject:' + subject_line + \ + '\nIn-Reply-To:' + in_reply_to + \ + '\nMIME-Version: 1.0" + \ + "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \ + reply_contents + '\n\n--NextPart' + response = ses_client.send_raw_email( + Source="patchtest@automation.yoctoproject.org", + RawMessage={ + "Data": raw_data, }, - ReplyToAddresses=reply_address, - Message={ - 'Subject': { - 'Data': subject_line, - 'Charset': 'utf-8' - }, - 'Body': { - 'Text': { - 'Data': reply_contents, - 'Charset': 'utf-8' - } - } - } ) + else: print(f"No failures identified for {args.patch}.") From patchwork Mon Nov 20 16:38:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DCC0C197A0 for ; Mon, 20 Nov 2023 16:40:03 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web10.631.1700498395096991216 for ; Mon, 20 Nov 2023 08:39:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=UGvQyz4/; spf=softfail (domain: sakoman.com, ip: 209.85.210.181, mailfrom: steve@sakoman.com) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6bee11456baso3822825b3a.1 for ; Mon, 20 Nov 2023 08:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498394; x=1701103194; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fRaclDhFvofpi6AFgieetSGTXcEabygt22uRHgpzbH8=; b=UGvQyz4/DamVFsvFfyj1Vt9gbG3erpJ30AGP5D1v9fstyaIEdFmi51J2RZ90APKC6R nYaGrDsKMNnyqSoVfHneUlCOrips6qmxQGDAre0RubiD9wehoEj1Q9DGb5VZRnCMkHBk duUB/nYO6DyXjSEB3abo6AKgii15wFjY9WlivEBMLOr2ki/okeMgQA04CSqDEnQbT/pA iMMF6d8Ugk0145gTzKOK+WnZ17JqAvFOkWAyRNfH4brRNLyvz30mNgojvomPm2vRNjuD vK5cY61AVn3JKRrBsKEXE7UFDqRUeM2yx7yRYff24fzZHU3UiPxd0dyWZYHACeBQ3RVK azPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498394; x=1701103194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fRaclDhFvofpi6AFgieetSGTXcEabygt22uRHgpzbH8=; b=huf6r3OE5i6uZHxEu62dTokM15KbPrq45aBg+qrSFPkfHSuuOdGwOrrgJri9RdNf+M WhsmbD2PfZcjORFw+zFVW7L+X2oGQ/iOiKxx/CgP0SWIbuhyUY/RHd96S/yyX8froTaw QtgCV4P4YIPJYZSCg6m8sDTHk+V15op84/iZJplANQapTeeHJBtnRDGNZyglQoA+FGSb 2iXlkCVC2tkhDA9eCzLy4jNwwsIWXePTCuhChIYBJng9JqOqpkSK8t66x1wW8feAHTuF WC/aWwAPG8j0hemC9G5U3kL5IPZyuSV5gYxcDk1XAaFaYhyyoE/5gPUqKkVPlDew5vk4 MG0Q== X-Gm-Message-State: AOJu0Yx1ORjo4EASYaLYVytzfXjRKaBd66qnYqD4UwguqC01zM84e9Nl BnQWIwAf4I+4h9ODrr4CNQHwuFMzo+x7W/u4Ttos4g== X-Google-Smtp-Source: AGHT+IGjILgutSazezCycAKE9AOwoRgjA5/0R8TGCVLU6jBJiUet9aq3gSZIN2My+UPR2PeXc1hYwg== X-Received: by 2002:a05:6a00:80b:b0:6c3:3bf9:217e with SMTP id m11-20020a056a00080b00b006c33bf9217emr7345582pfk.19.1700498394170; Mon, 20 Nov 2023 08:39:54 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:53 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 30/33] patchtest: make pylint tests compatible with 3.x Date: Mon, 20 Nov 2023 06:38:44 -1000 Message-Id: <61365d562ee7b0c46a09565cadf38475a524c9ae.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:40:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190919 From: Trevor Gamblin pylint 3.x has removed epylint, which is now a separate module. To avoid adding another recipe or using outdated modules, modify the test_python_pylint tests so that they use the standard pylint API. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 72be3d6a116febf46130cccbe12afe5ad93779b5) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_python_pylint.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/meta/lib/patchtest/tests/test_python_pylint.py b/meta/lib/patchtest/tests/test_python_pylint.py index 304b2d5ee9..ef315e591c 100644 --- a/meta/lib/patchtest/tests/test_python_pylint.py +++ b/meta/lib/patchtest/tests/test_python_pylint.py @@ -5,8 +5,11 @@ # SPDX-License-Identifier: GPL-2.0-only import base +from io import StringIO from data import PatchTestInput -import pylint.epylint as lint +from pylint.reporters.text import TextReporter +import pylint.lint as lint + class PyLint(base.Base): pythonpatches = [] @@ -32,8 +35,10 @@ class PyLint(base.Base): def pretest_pylint(self): for pythonpatch in self.pythonpatches: if pythonpatch.is_modified_file: - (pylint_stdout, pylint_stderr) = lint.py_run(command_options = pythonpatch.path + self.pylint_options, return_std=True) - for line in pylint_stdout.readlines(): + pylint_output = StringIO() + reporter = TextReporter(pylint_output) + lint.Run([self.pylint_options, pythonpatch.path], reporter=reporter, exit=False) + for line in pylint_output.readlines(): if not '*' in line: if line.strip(): self.pylint_pretest[line.strip().split(' ',1)[0]] = line.strip().split(' ',1)[1] @@ -46,8 +51,10 @@ class PyLint(base.Base): path = pythonpatch.target_file[2:] else: path = pythonpatch.path - (pylint_stdout, pylint_stderr) = lint.py_run(command_options = path + self.pylint_options, return_std=True) - for line in pylint_stdout.readlines(): + pylint_output = StringIO() + reporter = TextReporter(pylint_output) + lint.Run([self.pylint_options, pythonpatch.path], reporter=reporter, exit=False) + for line in pylint_output.readlines(): if not '*' in line: if line.strip(): self.pylint_test[line.strip().split(' ',1)[0]] = line.strip().split(' ',1)[1] From patchwork Mon Nov 20 16:38:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64996C2BB3F for ; Mon, 20 Nov 2023 16:40:03 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web10.634.1700498397455143201 for ; Mon, 20 Nov 2023 08:39:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=NCd9yraF; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6c32a20d5dbso4003312b3a.1 for ; Mon, 20 Nov 2023 08:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498396; x=1701103196; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NZ7FYQNWlEugTMoBGbxhqFBXxrUA9G7g8p1T9oV4vCg=; b=NCd9yraFK/RdvCePn5dxlyis2WJgysBmytc3UWi78ho0KslJgZLZqWmiipqrXTQcUX Bgi3sfzXpxk2b9sIUcqKWv5v0AlJ0iqwCl/b8lAUypZ32zSiQg23KMXdcs040V9MYuvi UqfDPx7nqD2+0je4ozVLfhE1PRSWvrhBeIR8cqRqqflFU2Gw3zEAPfCg5Zn0FRZWX141 sg6rR7GEbOKtgjIQKjij9SUgHPwWYfQ7ZL1HJdp9+ZpfdyE5n+jW68Hut38POca2VYyF oe2FsmChQ6jSWAbypaetpCYDX24QS4G8Uc3lflaV+1pFHSYYFL/IFfl9nXGajH/wy6fa ptGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498396; x=1701103196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NZ7FYQNWlEugTMoBGbxhqFBXxrUA9G7g8p1T9oV4vCg=; b=w/pG5CNZc7AHEDKAAniBGfGkjBilD/xLxGBghLQQri/bwBi3mwVwB2ykNs4OT/N3eL ytsvaRp41FqTVDghR/bwICeKlMvbXAC+nDMvDLHbPPiN+PdtjyufjY+J+fR9Z8UHhLzp 79YB1xhpQyP8onEZCKEH5TOP54qzPnqu2S3MvBX/OODcMfo8+7o0I6IwHzzylFexXOmH ETGTC74PR9ImiR0GCSSnygx3wyQQEJWFDODyLSkUBkGkqLv0ezsSUu5QmVSJY8UCHHaj LOX3KAz6IexAFlAUzeO5uJGtz/1TCckl1614phD7039Bgl1RwBD9lvzYBKpnY81Pa+j6 e/gw== X-Gm-Message-State: AOJu0Yznya5k6y7EVIm480IbJxFG9vz1jYdkFZWVxjp0YAZyvBanpDRP QSV730Z9rOLqCQeOY0OQZqRlr49Ky/DW3eUkT3PDxg== X-Google-Smtp-Source: AGHT+IEaDsVJ8VhyULbZel9ebjRSLZSCo3ELtfhDqziRLsNFwjgolrMLkiRs4AqESJ23sBkKmSrf4Q== X-Received: by 2002:a05:6a00:398b:b0:666:e1f4:5153 with SMTP id fi11-20020a056a00398b00b00666e1f45153mr7010255pfb.0.1700498396123; Mon, 20 Nov 2023 08:39:56 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:55 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 31/33] patchtest: remove test for CVE tag in mbox Date: Mon, 20 Nov 2023 06:38:45 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:40:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190920 From: Trevor Gamblin After patchtest went live it was determined that testing for a CVE tag in the mbox commit message is unnecessary, since it will already be in the shortlog and in any carried patches. Remove the test and the associated selftest files so that its absence isn't flagged in future test results. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 54690f18f04a2ab993a85d551ce4f8d0fa56618a) Signed-off-by: Steve Sakoman --- ...x.test_cve_presence_in_commit_message.fail | 72 ------------------ ...x.test_cve_presence_in_commit_message.pass | 74 ------------------- meta/lib/patchtest/tests/test_mbox.py | 24 ------ 3 files changed, 170 deletions(-) delete mode 100644 meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail delete mode 100644 meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail deleted file mode 100644 index d40b8a936b..0000000000 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail +++ /dev/null @@ -1,72 +0,0 @@ -From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin -Date: Tue, 29 Aug 2023 14:12:27 -0400 -Subject: [PATCH] selftest-hello: fix CVE-1234-56789 - -This patch should fail the test for CVE presence in the mbox commit message. - -Signed-off-by: Trevor Gamblin ---- - .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ - .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- - 2 files changed, 31 insertions(+), 2 deletions(-) - create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch - -diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch -new file mode 100644 -index 0000000000..869cfb6fe5 ---- /dev/null -+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch -@@ -0,0 +1,27 @@ -+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 -+From: Trevor Gamblin -+Date: Tue, 29 Aug 2023 14:08:20 -0400 -+Subject: [PATCH] Fix CVE-NOT-REAL -+ -+CVE: CVE-1234-56789 -+Upstream-Status: Backport(http://example.com/example) -+ -+Signed-off-by: Trevor Gamblin -+--- -+ strlen.c | 1 + -+ 1 file changed, 1 insertion(+) -+ -+diff --git a/strlen.c b/strlen.c -+index 1788f38..83d7918 100644 -+--- a/strlen.c -++++ b/strlen.c -+@@ -8,6 +8,7 @@ int main() { -+ -+ printf("%d\n", str_len(string1)); -+ printf("%d\n", str_len(string2)); -++ printf("CVE FIXED!!!\n"); -+ -+ return 0; -+ } -+-- -+2.41.0 -diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -index 547587bef4..76975a6729 100644 ---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -@@ -3,7 +3,9 @@ SECTION = "examples" - LICENSE = "MIT" - LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - --SRC_URI = "file://helloworld.c" -+SRC_URI = "file://helloworld.c \ -+ file://CVE-1234-56789.patch \ -+ " - - S = "${WORKDIR}" - -@@ -16,4 +18,4 @@ do_install() { - install -m 0755 helloworld ${D}${bindir} - } - --BBCLASSEXTEND = "native nativesdk" -\ No newline at end of file -+BBCLASSEXTEND = "native nativesdk" --- -2.41.0 - diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass deleted file mode 100644 index 433c7a450a..0000000000 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass +++ /dev/null @@ -1,74 +0,0 @@ -From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin -Date: Tue, 29 Aug 2023 14:12:27 -0400 -Subject: [PATCH] selftest-hello: fix CVE-1234-56789 - -This test should pass the mbox cve tag test. - -CVE: CVE-1234-56789 - -Signed-off-by: Trevor Gamblin ---- - .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ - .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- - 2 files changed, 31 insertions(+), 2 deletions(-) - create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch - -diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch -new file mode 100644 -index 0000000000..869cfb6fe5 ---- /dev/null -+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch -@@ -0,0 +1,27 @@ -+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 -+From: Trevor Gamblin -+Date: Tue, 29 Aug 2023 14:08:20 -0400 -+Subject: [PATCH] Fix CVE-NOT-REAL -+ -+CVE: CVE-1234-56789 -+Upstream-Status: Backport(http://example.com/example) -+ -+Signed-off-by: Trevor Gamblin -+--- -+ strlen.c | 1 + -+ 1 file changed, 1 insertion(+) -+ -+diff --git a/strlen.c b/strlen.c -+index 1788f38..83d7918 100644 -+--- a/strlen.c -++++ b/strlen.c -+@@ -8,6 +8,7 @@ int main() { -+ -+ printf("%d\n", str_len(string1)); -+ printf("%d\n", str_len(string2)); -++ printf("CVE FIXED!!!\n"); -+ -+ return 0; -+ } -+-- -+2.41.0 -diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -index 547587bef4..76975a6729 100644 ---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb -@@ -3,7 +3,9 @@ SECTION = "examples" - LICENSE = "MIT" - LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - --SRC_URI = "file://helloworld.c" -+SRC_URI = "file://helloworld.c \ -+ file://CVE-1234-56789.patch \ -+ " - - S = "${WORKDIR}" - -@@ -16,4 +18,4 @@ do_install() { - install -m 0755 helloworld ${D}${bindir} - } - --BBCLASSEXTEND = "native nativesdk" -\ No newline at end of file -+BBCLASSEXTEND = "native nativesdk" --- -2.41.0 - diff --git a/meta/lib/patchtest/tests/test_mbox.py b/meta/lib/patchtest/tests/test_mbox.py index 2449564d0f..0b623b7d17 100644 --- a/meta/lib/patchtest/tests/test_mbox.py +++ b/meta/lib/patchtest/tests/test_mbox.py @@ -6,7 +6,6 @@ import base import collections -import parse_cve_tags import parse_shortlog import parse_signed_off_by import pyparsing @@ -33,8 +32,6 @@ class TestMbox(base.Base): rexp_detect = pyparsing.Regex('\[\s?YOCTO.*\]') rexp_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]') revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') - prog = parse_cve_tags.cve_tag - patch_prog = parse_cve_tags.patch_cve_tag signoff_prog = parse_signed_off_by.signed_off_by revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') maxlength = 90 @@ -143,27 +140,6 @@ class TestMbox(base.Base): if not commit.commit_message.strip(): self.fail('Please include a commit message on your patch explaining the change', commit=commit) - def test_cve_presence_in_commit_message(self): - if self.unidiff_parse_error: - self.skip('Parse error %s' % self.unidiff_parse_error) - - # we are just interested in series that introduce CVE patches, thus discard other - # possibilities: modification to current CVEs, patch directly introduced into the - # recipe, upgrades already including the CVE, etc. - new_patches = [p for p in self.patchset if p.path.endswith('.patch') and p.is_added_file] - if not new_patches: - self.skip('No new patches introduced') - - for commit in TestMbox.commits: - # skip those patches that revert older commits, these do not required the tag presence - if self.revert_shortlog_regex.search_string(commit.shortlog): - continue - if not self.patch_prog.search_string(commit.payload): - self.skip("No CVE tag in added patch, so not needed in mbox") - elif not self.prog.search_string(commit.payload): - self.fail('A CVE tag should be provided in the commit message with format: "CVE: CVE-YYYY-XXXX"', - commit=commit) - def test_bugzilla_entry_format(self): for commit in TestMbox.commits: if not self.rexp_detect.search_string(commit.commit_message): From patchwork Mon Nov 20 16:38:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D9CDC5AD4C for ; Mon, 20 Nov 2023 16:40:03 +0000 (UTC) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web10.639.1700498399037799219 for ; Mon, 20 Nov 2023 08:39:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=hIM5u9R+; spf=softfail (domain: sakoman.com, ip: 209.85.215.169, mailfrom: steve@sakoman.com) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5bcfc508d14so3615904a12.3 for ; Mon, 20 Nov 2023 08:39:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498398; x=1701103198; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OUf425jtR2AXjFbFh2+4IAgJY7SRsxlaBEhYOqUk/G0=; b=hIM5u9R+F+o2/RZq5bndmn8VyIsT0EX0CzSC5GGrcpMKgAV5uw9h6n/ObFr/GQZcM7 JrjHcuI59An8Isn/2T55y5Xp+WAU1RtdNzXQn0rGQXk3FgyKseLS3GxanhV3IzxZ1Qk9 fPGLh4t/NPrf9WSVSBu1pTp8nwNLnVAorgKFm+1jmgWfieHCUC6RRFPSIc6uwqoQtgbC 7h3NbtUEYCuchKI1JoD0BWaACijuz/sWiMa9rhgfNKmNGXEES62vZRngs3pONfHMQlbo ATof7JbY5Q6FFKJwZ8bzXcgavZAFULpfoJ4h4gKkYdwxHOspQQvX2qeXfq3DEBNAA9LL aCrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498398; x=1701103198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OUf425jtR2AXjFbFh2+4IAgJY7SRsxlaBEhYOqUk/G0=; b=t0J+NjgUebvh2cYgpEaajhKMzx9IFrpcyUfXMIPZy+SN363xlJYq3jv9I2MmFcM9BH +oaEDmms2cdTpYQk8lxKX/ol0J3nFG5zhJ4m9M0IUSZcuE4uMNmB3VZaHbYmWK/TeLMD XRM7k32Crjng5p3Pt3tzLa1KRSHVzMW2Cr9MC6zGV4rUmcXsWDf+5X5MP2BOdo0oKn7O cj6OdGDOpoLSN09xC7hAp0dEBKnnPqJ/m6JrJOF3VxgAttsHbiOOHBBPkgqZR9UCUt9q 81i92TewwlOi4qFLHAt8t8wXrvr9E5atszu4upE5XJYKZCTIzFiQKPB4slojOuU4r6GY Tzsw== X-Gm-Message-State: AOJu0YztU/g7y7OYo8RCOBI2zi+Q0bI77F6nc71OkQT3WtZxO+7CtQDL 4uHBqpvL4NvGa+A+g0H2Xv2Io4DiiVesUEwVSQddEQ== X-Google-Smtp-Source: AGHT+IFYX5IekCaAbAKRNNCkyeyE0hkT4Fb3Ic0BrlNv5VhJiyqJUY6m463QCBStyd12/LMCQUR3RA== X-Received: by 2002:a05:6a20:1453:b0:187:cd37:c463 with SMTP id a19-20020a056a20145300b00187cd37c463mr10659459pzi.7.1700498398192; Mon, 20 Nov 2023 08:39:58 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:57 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 32/33] patchtest-send-results: fix sender parsing Date: Mon, 20 Nov 2023 06:38:46 -1000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:40:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190921 From: Trevor Gamblin Not all mbox 'from' fields will contain angle brackets, so the re.findall invocation used for getting a reply_address may fail. Use a simpler reference to the field to get the sender's email address. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie (cherry picked from commit 86e9afe09a346586114133f5a7470304d2ed733f) Signed-off-by: Steve Sakoman --- scripts/patchtest-send-results | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 1df81f943a..71b73f0940 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -59,7 +59,7 @@ subject_line = f"Patchtest results for {mbox_subject}" # extract the submitter email address and use it as the reply address # for the results -reply_address = re.findall("<(.*)>", mbox[0]['from'])[0] +reply_address = mbox[0]['from'] # extract the message ID and use that as the in-reply-to address in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0] From patchwork Mon Nov 20 16:38:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 34894 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 703EDC5AE5C for ; Mon, 20 Nov 2023 16:40:03 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by mx.groups.io with SMTP id smtpd.web11.655.1700498401300426576 for ; Mon, 20 Nov 2023 08:40:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=EwmHOi5Z; spf=softfail (domain: sakoman.com, ip: 209.85.167.182, mailfrom: steve@sakoman.com) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3b82541da51so708446b6e.0 for ; Mon, 20 Nov 2023 08:40:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1700498400; x=1701103200; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FUEmMILZt9PyOnHwIAOaXDXPp38RlCW2vnxtdYA28tg=; b=EwmHOi5Z8AUiU4NEo7oDSZxjJduU41JLUIXAkQFNuhIpV64t/2bpj2KumJSp4qr8nu JTZGfIvW0x206pBMyuXyfVe/K3FC8l3wxoebKLQlASrgavM+xhvXU3ASUWvoUrcU+/Cp z5m7izaMvWICO48wmzenBpiE99Jq6/wO4YugD+BNqjpaVKguKITFIt8vQI4Xgr1EsA+g 3hLbxn2Q6bNY9yFKIoFdm9Qj60H/aLhwm19tZKe8Xk3F+XSibO2DEMP2Lk59U5v7FupV qSqHLzSj36GRAq6Z6IMgFVGoGIx0e7Ug6bSS808EnMlQ4NpvFgOFVe76EpfeII+53jB0 wW4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700498400; x=1701103200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FUEmMILZt9PyOnHwIAOaXDXPp38RlCW2vnxtdYA28tg=; b=oPOn4WzTqqauHW0sk3LhXNTGVoupFj8Uanb8QhQtIxBNs2hVbLbNYESShVyuStO/yC qoBL7Yj5GuSjnE22kUNxGZqOdw0mQy8QEPnEQ+OT5Ch+gBwuJN1/W6MNh27gksgUkqfa CRLbXauSKugKnAI/PSR+vLGdLJtdlT2VjcVCbBOvT8klxRlYqELy02pV+8RqFK5FDlRU gxc8vapsqOQSnttyYs/vdPTaHH3rR1n8MSirOyGC7sNBDFPVzo61adB02K6hDq4ysqL2 axP7P9VfbZCfHUTnkngAiTNao9pGCP7devhkV5/gK/zMciNxjwxekwcCxzM3Pg8WTcsR Y1JQ== X-Gm-Message-State: AOJu0YwJR9Z24B7mF6aT68EGGQlObdtyvLrBGxmWdJTmfEfqa4vGYFOX Wd9CNc4Z6Qh48l8bOWdagz2nvxuCE4OKObIp63JjRw== X-Google-Smtp-Source: AGHT+IHYewxdo3crk24N93PXUjHoC9cqG3iu9AXpBgXrtB5zHHin6ut6pWIPZZPZq3+tnGlqwxSWFA== X-Received: by 2002:a05:6808:22a0:b0:3b2:e07e:5062 with SMTP id bo32-20020a05680822a000b003b2e07e5062mr10976577oib.52.1700498400290; Mon, 20 Nov 2023 08:40:00 -0800 (PST) Received: from hexa.lan (dhcp-72-234-108-41.hawaiiantel.net. [72.234.108.41]) by smtp.gmail.com with ESMTPSA id o23-20020a634e57000000b005c215baacc1sm4899279pgl.70.2023.11.20.08.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:39:59 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][nanbield 33/33] patchtest: rework license checksum tests Date: Mon, 20 Nov 2023 06:38:47 -1000 Message-Id: <34153775ffdb80a869a69ec051367d33007d516e.1700496737.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 16:40:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190922 From: Trevor Gamblin Remove the pretest_lic_files_chksum_modified_not_mentioned test entirely and use pyparsing in test_lic_files_chksum_modified_not_mentioned to scan the patches for lines starting with either "+LIC_FILES_CHKSUM" or "-LIC_FILES_CHKSUM". If either is found but no "License-Update" tag is present in the commit, fail the test. Signed-off-by: Trevor Gamblin Signed-off-by: Alexandre Belloni (cherry picked from commit 8e1bda0eb225ada22fdf5990edfec512be1d6629) Signed-off-by: Steve Sakoman --- meta/lib/patchtest/tests/test_metadata.py | 40 +++++------------------ 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/meta/lib/patchtest/tests/test_metadata.py b/meta/lib/patchtest/tests/test_metadata.py index 3742760b45..b6f4456ad2 100644 --- a/meta/lib/patchtest/tests/test_metadata.py +++ b/meta/lib/patchtest/tests/test_metadata.py @@ -16,6 +16,8 @@ class TestMetadata(base.Metadata): license_var = 'LICENSE' closed = 'CLOSED' lictag_re = pyparsing.AtLineStart("License-Update:") + lic_chksum_added = pyparsing.AtLineStart("+" + metadata_chksum) + lic_chksum_removed = pyparsing.AtLineStart("-" + metadata_chksum) add_mark = pyparsing.Regex('\+ ') max_length = 200 metadata_src_uri = 'SRC_URI' @@ -76,48 +78,22 @@ class TestMetadata(base.Metadata): if not lic_files_chksum: self.fail('%s is missing in newly added recipe' % self.metadata_chksum) - def pretest_lic_files_chksum_modified_not_mentioned(self): - if not self.modified: - self.skip('No modified recipes, skipping pretest') - # get the proper metadata values - for pn in self.modified: - rd = self.tinfoil.parse_recipe(pn) - pathname = rd.getVar('FILE') - # we are not interested in images - if '/images/' in pathname: - continue - PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum) - def test_lic_files_chksum_modified_not_mentioned(self): if not self.modified: self.skip('No modified recipes, skipping test') - # get the proper metadata values - for pn in self.modified: - rd = self.tinfoil.parse_recipe(pn) - pathname = rd.getVar('FILE') - # we are not interested in images - if '/images/' in pathname: + for patch in self.patchset: + # for the moment, we are just interested in metadata + if patch.path.endswith('.patch'): continue - PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum) - # compare if there were changes between pre-merge and merge - for pn in self.modified: - pretest = PatchTestDataStore['pre%s-%s-%s' % (self.shortid(),self.metadata_chksum, pn)] - test = PatchTestDataStore['%s-%s-%s' % (self.shortid(),self.metadata_chksum, pn)] - - # TODO: this is workaround to avoid false-positives when pretest metadata is empty (not reason found yet) - # For more info, check bug 12284 - if not pretest: - return - - if pretest != test: + payload = str(patch) + if (self.lic_chksum_added.search_string(payload) or self.lic_chksum_removed.search_string(payload)): # if any patch on the series contain reference on the metadata, fail for commit in self.commits: if self.lictag_re.search_string(commit.commit_message): break else: - self.fail('LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message', - data=[('Current checksum', pretest), ('New checksum', test)]) + self.fail('LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message') def test_max_line_length(self): for patch in self.patchset: