diff options
| author | Simone Weiß <simone.p.weiss@posteo.com> | 2024-02-10 13:52:59 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 11:39:08 +0000 |
| commit | 728b9ba88e65260c6a678befb1858fbf89348752 (patch) | |
| tree | c37451ced560e8b7a4c29676c52c3f11329f9d0f /meta/lib/patchtest | |
| parent | a4b5a2d5b7ffeb06ddc9594a89efa2fd232b1ad2 (diff) | |
| download | poky-728b9ba88e65260c6a678befb1858fbf89348752.tar.gz | |
patchtest: Add selftest for test cve_check_ignore
Add a selftest for the recently introduced check for CVE_CHECK_IGNORE.
(From OE-Core rev: dc6ebbbb94b162d8aa68e46d5a166606ace5e39c)
Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/patchtest')
| -rw-r--r-- | meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail | 30 | ||||
| -rw-r--r-- | meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass | 31 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail new file mode 100644 index 0000000000..3574463ade --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From c4ca86b9cca3643097db0328e2f34dccffbba309 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com> | ||
| 3 | Date: Sat, 10 Feb 2024 13:18:44 +0100 | ||
| 4 | Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This should fail the test_cve_tag_format selftest. | ||
| 10 | |||
| 11 | Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> | ||
| 12 | --- | ||
| 13 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | ||
| 14 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | 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 | ||
| 17 | index 547587bef4..3ef9b87c34 100644 | ||
| 18 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
| 19 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
| 20 | @@ -16,4 +16,5 @@ do_install() { | ||
| 21 | install -m 0755 helloworld ${D}${bindir} | ||
| 22 | } | ||
| 23 | |||
| 24 | -BBCLASSEXTEND = "native nativesdk" | ||
| 25 | \ No newline at end of file | ||
| 26 | +CVE_CHECK_IGNORE = "CVE-2024-12345" | ||
| 27 | +BBCLASSEXTEND = "native nativesdk" | ||
| 28 | -- | ||
| 29 | 2.39.2 | ||
| 30 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass new file mode 100644 index 0000000000..10f942a6eb --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 7d4d3fee0c7111830ee9b2b049ae3ce265b26030 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com> | ||
| 3 | Date: Sat, 10 Feb 2024 13:23:56 +0100 | ||
| 4 | Subject: [PATCH] selftest-hello: add CVE_STATUS | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This should pass the test_cve_tag_format selftest. | ||
| 10 | |||
| 11 | Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> | ||
| 12 | --- | ||
| 13 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +++- | ||
| 14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | 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 | ||
| 17 | index 547587bef4..9908b3b417 100644 | ||
| 18 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
| 19 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
| 20 | @@ -16,4 +16,6 @@ do_install() { | ||
| 21 | install -m 0755 helloworld ${D}${bindir} | ||
| 22 | } | ||
| 23 | |||
| 24 | -BBCLASSEXTEND = "native nativesdk" | ||
| 25 | \ No newline at end of file | ||
| 26 | +CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows" | ||
| 27 | + | ||
| 28 | +BBCLASSEXTEND = "native nativesdk" | ||
| 29 | -- | ||
| 30 | 2.39.2 | ||
| 31 | |||
