From: Simone Weiß Date: Sat, 10 Feb 2024 13:52:59 +0000 (+0000) Subject: patchtest: Add selftest for test cve_check_ignore X-Git-Tag: uninative-4.4~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc6ebbbb94b162d8aa68e46d5a166606ace5e39c;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git patchtest: Add selftest for test cve_check_ignore Add a selftest for the recently introduced check for CVE_CHECK_IGNORE. Signed-off-by: Simone Weiß Signed-off-by: Richard Purdie --- 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 00000000000..3574463ade0 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail @@ -0,0 +1,30 @@ +From c4ca86b9cca3643097db0328e2f34dccffbba309 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Simone=20Wei=C3=9F?= +Date: Sat, 10 Feb 2024 13:18:44 +0100 +Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This should fail the test_cve_tag_format selftest. + +Signed-off-by: Simone Weiß +--- + .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +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..3ef9b87c34 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 +@@ -16,4 +16,5 @@ do_install() { + install -m 0755 helloworld ${D}${bindir} + } + +-BBCLASSEXTEND = "native nativesdk" +\ No newline at end of file ++CVE_CHECK_IGNORE = "CVE-2024-12345" ++BBCLASSEXTEND = "native nativesdk" +-- +2.39.2 + 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 00000000000..10f942a6ebf --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass @@ -0,0 +1,31 @@ +From 7d4d3fee0c7111830ee9b2b049ae3ce265b26030 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Simone=20Wei=C3=9F?= +Date: Sat, 10 Feb 2024 13:23:56 +0100 +Subject: [PATCH] selftest-hello: add CVE_STATUS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This should pass the test_cve_tag_format selftest. + +Signed-off-by: Simone Weiß +--- + .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +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..9908b3b417 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 +@@ -16,4 +16,6 @@ do_install() { + install -m 0755 helloworld ${D}${bindir} + } + +-BBCLASSEXTEND = "native nativesdk" +\ No newline at end of file ++CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows" ++ ++BBCLASSEXTEND = "native nativesdk" +-- +2.39.2 +