diff options
Diffstat (limited to 'meta/lib/patchtest/selftest')
35 files changed, 1717 insertions, 0 deletions
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail new file mode 100644 index 0000000000..0c40cdc1b6 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail | |||
@@ -0,0 +1,32 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <first.last@example.com> | ||
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add a summary | ||
5 | |||
6 | This patch should fail the selftests because the author address is from the | ||
7 | invalid "example.com". | ||
8 | |||
9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
10 | --- | ||
11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | |||
14 | 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 | ||
15 | index 547587bef4..491f0a3df7 100644 | ||
16 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | @@ -1,3 +1,4 @@ | ||
19 | +SUMMARY = "A cool sample" | ||
20 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
21 | SECTION = "examples" | ||
22 | LICENSE = "MIT" | ||
23 | @@ -16,4 +17,4 @@ do_install() { | ||
24 | install -m 0755 helloworld ${D}${bindir} | ||
25 | } | ||
26 | |||
27 | -BBCLASSEXTEND = "native nativesdk" | ||
28 | \ No newline at end of file | ||
29 | +BBCLASSEXTEND = "native nativesdk" | ||
30 | -- | ||
31 | 2.41.0 | ||
32 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass new file mode 100644 index 0000000000..cbb8ef2cef --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass | |||
@@ -0,0 +1,31 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <first.last@address.com> | ||
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add a summary | ||
5 | |||
6 | This patch should pass the selftests because the author address is in a valid format. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | 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 | ||
14 | index 547587bef4..491f0a3df7 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -1,3 +1,4 @@ | ||
18 | +SUMMARY = "A cool sample" | ||
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
20 | SECTION = "examples" | ||
21 | LICENSE = "MIT" | ||
22 | @@ -16,4 +17,4 @@ do_install() { | ||
23 | install -m 0755 helloworld ${D}${bindir} | ||
24 | } | ||
25 | |||
26 | -BBCLASSEXTEND = "native nativesdk" | ||
27 | \ No newline at end of file | ||
28 | +BBCLASSEXTEND = "native nativesdk" | ||
29 | -- | ||
30 | 2.41.0 | ||
31 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail new file mode 100644 index 0000000000..3e2b81bca1 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail | |||
@@ -0,0 +1,31 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Upgrade Helper <auh@auh.yoctoproject.org> | ||
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add a summary | ||
5 | |||
6 | This patch should fail the selftests because AUH is an invalid sender. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | 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 | ||
14 | index 547587bef4..491f0a3df7 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -1,3 +1,4 @@ | ||
18 | +SUMMARY = "A cool sample" | ||
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
20 | SECTION = "examples" | ||
21 | LICENSE = "MIT" | ||
22 | @@ -16,4 +17,4 @@ do_install() { | ||
23 | install -m 0755 helloworld ${D}${bindir} | ||
24 | } | ||
25 | |||
26 | -BBCLASSEXTEND = "native nativesdk" | ||
27 | \ No newline at end of file | ||
28 | +BBCLASSEXTEND = "native nativesdk" | ||
29 | -- | ||
30 | 2.41.0 | ||
31 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass new file mode 100644 index 0000000000..f84e1265a7 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass | |||
@@ -0,0 +1,31 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <averylongemailaddressthatishardtoread.from@address.com> | ||
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add a summary | ||
5 | |||
6 | This patch should pass the selftests because the author address is in a valid format. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | 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 | ||
14 | index 547587bef4..491f0a3df7 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -1,3 +1,4 @@ | ||
18 | +SUMMARY = "A cool sample" | ||
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
20 | SECTION = "examples" | ||
21 | LICENSE = "MIT" | ||
22 | @@ -16,4 +17,4 @@ do_install() { | ||
23 | install -m 0755 helloworld ${D}${bindir} | ||
24 | } | ||
25 | |||
26 | -BBCLASSEXTEND = "native nativesdk" | ||
27 | \ No newline at end of file | ||
28 | +BBCLASSEXTEND = "native nativesdk" | ||
29 | -- | ||
30 | 2.41.0 | ||
31 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail new file mode 100644 index 0000000000..854d7eb8c7 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail | |||
@@ -0,0 +1,26 @@ | |||
1 | From f06e14633723c1e78bc7a4b0fd0d3b79d09f0c68 Mon Sep 17 00:00:00 2001 | ||
2 | From: name@somedomain.com <email@address.com> | ||
3 | Date: Thu, 2 May 2024 10:21:45 -0400 | ||
4 | Subject: [PATCH] README.OE-Core.md: Add foo to header | ||
5 | |||
6 | This test patch adds 'foo' to the header of README.OE-Core.md | ||
7 | |||
8 | [YOCTO 1234] | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | README.OE-Core.md | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/README.OE-Core.md b/README.OE-Core.md | ||
16 | index 687c58e410c..9d863891134 100644 | ||
17 | --- a/README.OE-Core.md | ||
18 | +++ b/README.OE-Core.md | ||
19 | @@ -1,3 +1,4 @@ | ||
20 | +**** FOO **** | ||
21 | OpenEmbedded-Core | ||
22 | ================= | ||
23 | |||
24 | -- | ||
25 | 2.44.0 | ||
26 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass new file mode 100644 index 0000000000..2648b03364 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass | |||
@@ -0,0 +1,25 @@ | |||
1 | From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001 | ||
2 | From: name@somedomain.com <email@address.com> | ||
3 | Date: Fri, 17 Feb 2017 16:29:21 -0600 | ||
4 | Subject: [PATCH] README: adds 'foo' to the header | ||
5 | |||
6 | This test patch adds 'foo' to the header | ||
7 | |||
8 | [YOCTO #1234] | ||
9 | |||
10 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
11 | --- | ||
12 | README | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/README b/README | ||
16 | index 521916cd4f..cdf29dcea3 100644 | ||
17 | --- a/README | ||
18 | +++ b/README | ||
19 | @@ -1,3 +1,4 @@ | ||
20 | +**** FOO **** | ||
21 | OpenEmbedded-Core | ||
22 | ================= | ||
23 | |||
24 | -- | ||
25 | 2.11.0 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail new file mode 100644 index 0000000000..93ca0f9119 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail | |||
@@ -0,0 +1,22 @@ | |||
1 | From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 1 Sep 2023 08:56:14 -0400 | ||
4 | Subject: [PATCH] README.OE-Core.md: add foo | ||
5 | |||
6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
7 | --- | ||
8 | README.OE-Core.md | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | diff --git a/README.OE-Core.md b/README.OE-Core.md | ||
12 | index 2f2127fb03..48464252c8 100644 | ||
13 | --- a/README.OE-Core.md | ||
14 | +++ b/README.OE-Core.md | ||
15 | @@ -1,3 +1,4 @@ | ||
16 | +** FOO ** | ||
17 | OpenEmbedded-Core | ||
18 | ================= | ||
19 | |||
20 | -- | ||
21 | 2.41.0 | ||
22 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass new file mode 100644 index 0000000000..5e3dcbd58b --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass | |||
@@ -0,0 +1,24 @@ | |||
1 | From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 1 Sep 2023 08:56:14 -0400 | ||
4 | Subject: [PATCH] README.OE-Core.md: add foo | ||
5 | |||
6 | This is a commit message | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | README.OE-Core.md | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/README.OE-Core.md b/README.OE-Core.md | ||
14 | index 2f2127fb03..48464252c8 100644 | ||
15 | --- a/README.OE-Core.md | ||
16 | +++ b/README.OE-Core.md | ||
17 | @@ -1,3 +1,4 @@ | ||
18 | +** FOO ** | ||
19 | OpenEmbedded-Core | ||
20 | ================= | ||
21 | |||
22 | -- | ||
23 | 2.41.0 | ||
24 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail new file mode 100644 index 0000000000..9cc4aab38a --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail | |||
@@ -0,0 +1,36 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This test should fail the mbox formatting test and the merge on head | ||
7 | test. | ||
8 | |||
9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
10 | --- | ||
11 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
16 | similarity index 88% | ||
17 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
19 | index 547587bef4..acc388ec2c 100644 | ||
20 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
22 | @@ -1,3 +1,4 @@ | ||
23 | %+SUMMARY = "Hello!" | ||
24 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
25 | SECTION = "examples" | ||
26 | LICENSE = "MIT" | ||
27 | @@ -16,4 +17,4 @@ do_install() { | ||
28 | install -m 0755 helloworld ${D}${bindir} | ||
29 | } | ||
30 | |||
31 | -BBCLASSEXTEND = "native nativesdk" | ||
32 | \ No newline at end of file | ||
33 | +BBCLASSEXTEND = "native nativesdk" | ||
34 | -- | ||
35 | 2.41.0 | ||
36 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail new file mode 100644 index 0000000000..eca1c60085 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail | |||
@@ -0,0 +1,35 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This test should fail the merge-on-head and mbox formatting tests. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
13 | |||
14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
15 | similarity index 88% | ||
16 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
18 | index 547587bef4..acc388ec2c 100644 | ||
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | %+SUMMARY = "Hello!" | ||
23 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
24 | SECTION = "examples" | ||
25 | LICENSE = "MIT" | ||
26 | @@ -16,4 +17,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | ||
34 | 2.41.0 | ||
35 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass new file mode 100644 index 0000000000..33940adffc --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass | |||
@@ -0,0 +1,33 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
7 | --- | ||
8 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
9 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
10 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
11 | |||
12 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
13 | similarity index 88% | ||
14 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
15 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
16 | index 547587bef4..acc388ec2c 100644 | ||
17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
19 | @@ -1,3 +1,4 @@ | ||
20 | +SUMMARY = "Hello!" | ||
21 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | SECTION = "examples" | ||
23 | LICENSE = "MIT" | ||
24 | @@ -16,4 +17,4 @@ do_install() { | ||
25 | install -m 0755 helloworld ${D}${bindir} | ||
26 | } | ||
27 | |||
28 | -BBCLASSEXTEND = "native nativesdk" | ||
29 | \ No newline at end of file | ||
30 | +BBCLASSEXTEND = "native nativesdk" | ||
31 | -- | ||
32 | 2.41.0 | ||
33 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip new file mode 100644 index 0000000000..2a72457878 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip | |||
@@ -0,0 +1,35 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This file should pass the test_series_merge_on_head test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
13 | |||
14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
15 | similarity index 88% | ||
16 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
18 | index 547587bef4..acc388ec2c 100644 | ||
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | +SUMMARY = "Hello!" | ||
23 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
24 | SECTION = "examples" | ||
25 | LICENSE = "MIT" | ||
26 | @@ -16,4 +17,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | ||
34 | 2.41.0 | ||
35 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip new file mode 100644 index 0000000000..49bd1f8ede --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip | |||
@@ -0,0 +1,41 @@ | |||
1 | From 55208224f492af0ad929555ffc9b95ff1d301c5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Thu, 17 Aug 2023 15:02:38 -0400 | ||
4 | Subject: [PATCH] python3-dtc: upgrade 1.6.1 -> 1.7.0 | ||
5 | |||
6 | Changelog: https://kernel.googlesource.com/pub/scm/utils/dtc/dtc/+log/039a99414e778332d8f9c04cbd3072e1dcc62798 | ||
7 | |||
8 | Remove custom PV from the recipe since the relevant functionality is in | ||
9 | 1.7.0: | ||
10 | |||
11 | [tgamblin@megalith dtc]$ git tag --contains c001fc01a43e7a06447c06ea3d50bd60641322b8 | ||
12 | v1.7.0 | ||
13 | |||
14 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
15 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
16 | --- | ||
17 | .../python/{python3-dtc_1.6.1.bb => python3-dtc_1.7.0.bb} | 3 +-- | ||
18 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
19 | rename meta/recipes-devtools/python/{python3-dtc_1.6.1.bb => python3-dtc_1.7.0.bb} (92%) | ||
20 | |||
21 | diff --git a/meta/recipes-devtools/python/python3-dtc_1.6.1.bb b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
22 | similarity index 92% | ||
23 | rename from meta/recipes-devtools/python/python3-dtc_1.6.1.bb | ||
24 | rename to meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
25 | index 95ab0be474..85e48d4694 100644 | ||
26 | --- a/meta/recipes-devtools/python/python3-dtc_1.6.1.bb | ||
27 | +++ b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
28 | @@ -14,9 +14,8 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | ||
29 | |||
30 | LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90" | ||
31 | |||
32 | -SRCREV = "c001fc01a43e7a06447c06ea3d50bd60641322b8" | ||
33 | +SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798" | ||
34 | |||
35 | -PV = "1.6.1+git" | ||
36 | S = "${WORKDIR}/git" | ||
37 | |||
38 | PYPA_WHEEL = "${S}/dist/libfdt-1.6.2*.whl" | ||
39 | -- | ||
40 | 2.41.0 | ||
41 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail new file mode 100644 index 0000000000..cdbbc61b61 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello% fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass new file mode 100644 index 0000000000..ef6017037c --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail new file mode 100644 index 0000000000..629e78540b --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: this is a very long commit shortlog with way too many words included in it to pass the test | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass new file mode 100644 index 0000000000..ef6017037c --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail new file mode 100644 index 0000000000..35d92aeed7 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail | |||
@@ -0,0 +1,71 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | --- | ||
9 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
10 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
11 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 0000000000..869cfb6fe5 | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
19 | @@ -0,0 +1,27 @@ | ||
20 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
21 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
22 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
23 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
24 | + | ||
25 | +CVE: CVE-1234-56789 | ||
26 | +Upstream-Status: Backport(http://example.com/example) | ||
27 | + | ||
28 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
29 | +--- | ||
30 | + strlen.c | 1 + | ||
31 | + 1 file changed, 1 insertion(+) | ||
32 | + | ||
33 | +diff --git a/strlen.c b/strlen.c | ||
34 | +index 1788f38..83d7918 100644 | ||
35 | +--- a/strlen.c | ||
36 | ++++ b/strlen.c | ||
37 | +@@ -8,6 +8,7 @@ int main() { | ||
38 | + | ||
39 | + printf("%d\n", str_len(string1)); | ||
40 | + printf("%d\n", str_len(string2)); | ||
41 | ++ printf("CVE FIXED!!!\n"); | ||
42 | + | ||
43 | + return 0; | ||
44 | + } | ||
45 | +-- | ||
46 | +2.41.0 | ||
47 | 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 | ||
48 | index 547587bef4..76975a6729 100644 | ||
49 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
50 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
52 | LICENSE = "MIT" | ||
53 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
54 | |||
55 | -SRC_URI = "file://helloworld.c" | ||
56 | +SRC_URI = "file://helloworld.c \ | ||
57 | + file://CVE-1234-56789.patch \ | ||
58 | + " | ||
59 | |||
60 | S = "${WORKDIR}" | ||
61 | |||
62 | @@ -16,4 +18,4 @@ do_install() { | ||
63 | install -m 0755 helloworld ${D}${bindir} | ||
64 | } | ||
65 | |||
66 | -BBCLASSEXTEND = "native nativesdk" | ||
67 | \ No newline at end of file | ||
68 | +BBCLASSEXTEND = "native nativesdk" | ||
69 | -- | ||
70 | 2.41.0 | ||
71 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail new file mode 100644 index 0000000000..68f38dee06 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail | |||
@@ -0,0 +1,72 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Approved: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
14 | |||
15 | 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 | ||
16 | new file mode 100644 | ||
17 | index 0000000000..869cfb6fe5 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | 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 | ||
49 | index 547587bef4..76975a6729 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | |||
67 | -BBCLASSEXTEND = "native nativesdk" | ||
68 | \ No newline at end of file | ||
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | ||
71 | 2.41.0 | ||
72 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass new file mode 100644 index 0000000000..ea34c76f0d --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass | |||
@@ -0,0 +1,72 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
14 | |||
15 | 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 | ||
16 | new file mode 100644 | ||
17 | index 0000000000..869cfb6fe5 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | 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 | ||
49 | index 547587bef4..76975a6729 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | |||
67 | -BBCLASSEXTEND = "native nativesdk" | ||
68 | \ No newline at end of file | ||
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | ||
71 | 2.41.0 | ||
72 | |||
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 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail new file mode 100644 index 0000000000..ab6c52c374 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail | |||
@@ -0,0 +1,37 @@ | |||
1 | From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 6 Sep 2023 09:09:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | ||
5 | |||
6 | This test should fail the | ||
7 | test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned | ||
8 | test. | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | 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 | ||
16 | index 547587bef4..65dda40aba 100644 | ||
17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
19 | @@ -1,7 +1,7 @@ | ||
20 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
21 | SECTION = "examples" | ||
22 | LICENSE = "MIT" | ||
23 | -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f303" | ||
25 | |||
26 | SRC_URI = "file://helloworld.c" | ||
27 | |||
28 | @@ -16,4 +16,4 @@ do_install() { | ||
29 | install -m 0755 helloworld ${D}${bindir} | ||
30 | } | ||
31 | |||
32 | -BBCLASSEXTEND = "native nativesdk" | ||
33 | \ No newline at end of file | ||
34 | +BBCLASSEXTEND = "native nativesdk" | ||
35 | -- | ||
36 | 2.41.0 | ||
37 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass new file mode 100644 index 0000000000..99d9f144da --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass | |||
@@ -0,0 +1,39 @@ | |||
1 | From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 6 Sep 2023 09:09:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | ||
5 | |||
6 | License-Update: Fix checksum | ||
7 | |||
8 | This test should pass the | ||
9 | test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned | ||
10 | test. | ||
11 | |||
12 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
13 | --- | ||
14 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | 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 | ||
18 | index 547587bef4..65dda40aba 100644 | ||
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
21 | @@ -1,7 +1,7 @@ | ||
22 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
23 | SECTION = "examples" | ||
24 | LICENSE = "MIT" | ||
25 | -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
26 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f303" | ||
27 | |||
28 | SRC_URI = "file://helloworld.c" | ||
29 | |||
30 | @@ -16,4 +16,4 @@ do_install() { | ||
31 | install -m 0755 helloworld ${D}${bindir} | ||
32 | } | ||
33 | |||
34 | -BBCLASSEXTEND = "native nativesdk" | ||
35 | \ No newline at end of file | ||
36 | +BBCLASSEXTEND = "native nativesdk" | ||
37 | -- | ||
38 | 2.41.0 | ||
39 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail new file mode 100644 index 0000000000..e14d644bb2 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail | |||
@@ -0,0 +1,53 @@ | |||
1 | From 66430e7c6fbd5187b66560909a510e136fed91c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | ||
4 | Subject: [PATCH] meta: adding hello-yocto recipe | ||
5 | |||
6 | This is a sample recipe | ||
7 | |||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
9 | --- | ||
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | ||
11 | .../hello-world/hello-world_1.0.bb | 18 ++++++++++++++++++ | ||
12 | 2 files changed, 23 insertions(+) | ||
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | |||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
17 | new file mode 100644 | ||
18 | index 0000000000..0d59f57d4c | ||
19 | --- /dev/null | ||
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
21 | @@ -0,0 +1,5 @@ | ||
22 | +#include <stdio.h> | ||
23 | + | ||
24 | +int main(){ | ||
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..3c990c108a | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,18 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "MIT" | ||
37 | + | ||
38 | +SRC_URI += "file://hello_world.c" | ||
39 | + | ||
40 | +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | ||
41 | +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | ||
42 | + | ||
43 | +do_compile(){ | ||
44 | + ${CC} -o hello_world ../hello_world.c | ||
45 | +} | ||
46 | + | ||
47 | +do_install(){ | ||
48 | + install -d ${D}${bindir} | ||
49 | + install -m +x hello_world ${D}${bindir}/hello_world | ||
50 | +} | ||
51 | -- | ||
52 | 2.41.0 | ||
53 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass new file mode 100644 index 0000000000..b8da16dfe5 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass | |||
@@ -0,0 +1,54 @@ | |||
1 | From 5144d2ba1aa763312c047dd5f8901368cff79da6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | ||
4 | Subject: [PATCH] meta: adding hello-yocto recipe | ||
5 | |||
6 | This is a sample recipe | ||
7 | |||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
9 | --- | ||
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | ||
11 | .../hello-world/hello-world_1.0.bb | 19 +++++++++++++++++++ | ||
12 | 2 files changed, 24 insertions(+) | ||
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | |||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
17 | new file mode 100644 | ||
18 | index 0000000000..0d59f57d4c | ||
19 | --- /dev/null | ||
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
21 | @@ -0,0 +1,5 @@ | ||
22 | +#include <stdio.h> | ||
23 | + | ||
24 | +int main(){ | ||
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..44d888c82a | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,19 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "MIT" | ||
37 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
38 | + | ||
39 | +SRC_URI += "file://hello_world.c" | ||
40 | + | ||
41 | +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | ||
42 | +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | ||
43 | + | ||
44 | +do_compile(){ | ||
45 | + ${CC} -o hello_world ../hello_world.c | ||
46 | +} | ||
47 | + | ||
48 | +do_install(){ | ||
49 | + install -d ${D}${bindir} | ||
50 | + install -m +x hello_world ${D}${bindir}/hello_world | ||
51 | +} | ||
52 | -- | ||
53 | 2.41.0 | ||
54 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail new file mode 100644 index 0000000000..983b6e0c2b --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4ab06b5f81455249cd5e89d2cce9863803b5ecb5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 8 Sep 2023 14:41:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | ||
5 | |||
6 | This should fail the test_src_uri_left_files selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +--- | ||
11 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
12 | |||
13 | 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 | ||
14 | index 547587bef4..f6817f05bc 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -3,8 +3,6 @@ SECTION = "examples" | ||
18 | LICENSE = "MIT" | ||
19 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
20 | |||
21 | -SRC_URI = "file://helloworld.c" | ||
22 | - | ||
23 | S = "${WORKDIR}" | ||
24 | |||
25 | do_compile() { | ||
26 | @@ -16,4 +14,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | ||
34 | 2.41.0 | ||
35 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass new file mode 100644 index 0000000000..1f1a77e581 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass | |||
@@ -0,0 +1,51 @@ | |||
1 | From 6c7ac367a873bf827c19b81085c943eace917a99 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 8 Sep 2023 14:41:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | ||
5 | |||
6 | This should pass the test_src_uri_left_files selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/files/helloworld.c | 8 -------- | ||
11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +--- | ||
12 | 2 files changed, 1 insertion(+), 11 deletions(-) | ||
13 | delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
16 | deleted file mode 100644 | ||
17 | index fc7169b7b8..0000000000 | ||
18 | --- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
19 | +++ /dev/null | ||
20 | @@ -1,8 +0,0 @@ | ||
21 | -#include <stdio.h> | ||
22 | - | ||
23 | -int main(void) | ||
24 | -{ | ||
25 | - printf("Hello world!\n"); | ||
26 | - | ||
27 | - return 0; | ||
28 | -} | ||
29 | 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 | ||
30 | index 547587bef4..f6817f05bc 100644 | ||
31 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
32 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
33 | @@ -3,8 +3,6 @@ SECTION = "examples" | ||
34 | LICENSE = "MIT" | ||
35 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
36 | |||
37 | -SRC_URI = "file://helloworld.c" | ||
38 | - | ||
39 | S = "${WORKDIR}" | ||
40 | |||
41 | do_compile() { | ||
42 | @@ -16,4 +14,4 @@ do_install() { | ||
43 | install -m 0755 helloworld ${D}${bindir} | ||
44 | } | ||
45 | |||
46 | -BBCLASSEXTEND = "native nativesdk" | ||
47 | \ No newline at end of file | ||
48 | +BBCLASSEXTEND = "native nativesdk" | ||
49 | -- | ||
50 | 2.41.0 | ||
51 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail new file mode 100644 index 0000000000..2d2b4e683d --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail | |||
@@ -0,0 +1,46 @@ | |||
1 | From e29da5faa74409be394caa09d9f3b7b60f8592b9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | ||
4 | Subject: [PATCH] meta: adding hello-yocto recipe | ||
5 | |||
6 | This is a sample recipe | ||
7 | |||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
9 | --- | ||
10 | meta/recipes-devtools/hello-world/hello-world/hello_world.c | 5 +++++ | ||
11 | meta/recipes-devtools/hello-world/hello-world_1.0.bb | 12 ++++++++++++ | ||
12 | 2 files changed, 17 insertions(+) | ||
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | |||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
17 | new file mode 100644 | ||
18 | index 0000000000..0d59f57d4c | ||
19 | --- /dev/null | ||
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
21 | @@ -0,0 +1,5 @@ | ||
22 | +#include <stdio.h> | ||
23 | + | ||
24 | +int main(){ | ||
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..c4e1359217 | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,12 @@ | ||
33 | +LICENSE = "CLOSED" | ||
34 | + | ||
35 | +SRC_URI += "file://hello_world.c" | ||
36 | + | ||
37 | +do_compile(){ | ||
38 | + ${CC} -o hello_world ../hello_world.c | ||
39 | +} | ||
40 | + | ||
41 | +do_install(){ | ||
42 | + install -d ${D}${bindir} | ||
43 | + install -m +x hello_world ${D}${bindir}/hello_world | ||
44 | +} | ||
45 | -- | ||
46 | 2.11.0 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass new file mode 100644 index 0000000000..55f0309b3f --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass | |||
@@ -0,0 +1,49 @@ | |||
1 | From 0cd2fed12ce4b7b071edde12aec4481ad7a6f107 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | ||
4 | Subject: [PATCH] meta: adding hello-yocto recipe | ||
5 | |||
6 | This is a sample recipe | ||
7 | |||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | ||
9 | --- | ||
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | ||
11 | meta/recipes-devtools/hello-world/hello-world_1.0.bb | 15 +++++++++++++++ | ||
12 | 2 files changed, 20 insertions(+) | ||
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | |||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
17 | new file mode 100644 | ||
18 | index 0000000000..0d59f57d4c | ||
19 | --- /dev/null | ||
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
21 | @@ -0,0 +1,5 @@ | ||
22 | +#include <stdio.h> | ||
23 | + | ||
24 | +int main(){ | ||
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..c54283eece | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,15 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "CLOSED" | ||
37 | + | ||
38 | +SRC_URI += "file://hello_world.c" | ||
39 | + | ||
40 | +do_compile(){ | ||
41 | + ${CC} -o hello_world ../hello_world.c | ||
42 | +} | ||
43 | + | ||
44 | +do_install(){ | ||
45 | + install -d ${D}${bindir} | ||
46 | + install -m +x hello_world ${D}${bindir}/hello_world | ||
47 | +} | ||
48 | -- | ||
49 | 2.11.0 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail new file mode 100644 index 0000000000..c763a7506e --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-BAD-FORMAT | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-BAD-FORMAT | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass new file mode 100644 index 0000000000..ef6017037c --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass | |||
@@ -0,0 +1,73 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | new file mode 100644 | ||
17 | index 0000000000..9219b8db62 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | ||
49 | 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 | ||
50 | index 547587bef4..76975a6729 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | |||
68 | -BBCLASSEXTEND = "native nativesdk" | ||
69 | \ No newline at end of file | ||
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | ||
72 | 2.41.0 | ||
73 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail new file mode 100644 index 0000000000..ce8bf7b7d1 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail | |||
@@ -0,0 +1,71 @@ | |||
1 | From 5a2d0ac780a0f4c046fb1a3c3463d3e726f191cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello/files/CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 30 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
14 | |||
15 | 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 | ||
16 | new file mode 100644 | ||
17 | index 0000000000..92a5b65a53 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,26 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +--- | ||
30 | + strlen.c | 1 + | ||
31 | + 1 file changed, 1 insertion(+) | ||
32 | + | ||
33 | +diff --git a/strlen.c b/strlen.c | ||
34 | +index 1788f38..83d7918 100644 | ||
35 | +--- a/strlen.c | ||
36 | ++++ b/strlen.c | ||
37 | +@@ -8,6 +8,7 @@ int main() { | ||
38 | + | ||
39 | + printf("%d\n", str_len(string1)); | ||
40 | + printf("%d\n", str_len(string2)); | ||
41 | ++ printf("CVE FIXED!!!\n"); | ||
42 | + | ||
43 | + return 0; | ||
44 | + } | ||
45 | +-- | ||
46 | +2.41.0 | ||
47 | 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 | ||
48 | index 547587bef4..76975a6729 100644 | ||
49 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
50 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
52 | LICENSE = "MIT" | ||
53 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
54 | |||
55 | -SRC_URI = "file://helloworld.c" | ||
56 | +SRC_URI = "file://helloworld.c \ | ||
57 | + file://CVE-1234-56789.patch \ | ||
58 | + " | ||
59 | |||
60 | S = "${WORKDIR}" | ||
61 | |||
62 | @@ -16,4 +18,4 @@ do_install() { | ||
63 | install -m 0755 helloworld ${D}${bindir} | ||
64 | } | ||
65 | |||
66 | -BBCLASSEXTEND = "native nativesdk" | ||
67 | \ No newline at end of file | ||
68 | +BBCLASSEXTEND = "native nativesdk" | ||
69 | -- | ||
70 | 2.41.0 | ||
71 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass new file mode 100644 index 0000000000..ea34c76f0d --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass | |||
@@ -0,0 +1,72 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | CVE: CVE-1234-56789 | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | ||
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | ||
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
14 | |||
15 | 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 | ||
16 | new file mode 100644 | ||
17 | index 0000000000..869cfb6fe5 | ||
18 | --- /dev/null | ||
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | ||
20 | @@ -0,0 +1,27 @@ | ||
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
25 | + | ||
26 | +CVE: CVE-1234-56789 | ||
27 | +Upstream-Status: Backport(http://example.com/example) | ||
28 | + | ||
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
30 | +--- | ||
31 | + strlen.c | 1 + | ||
32 | + 1 file changed, 1 insertion(+) | ||
33 | + | ||
34 | +diff --git a/strlen.c b/strlen.c | ||
35 | +index 1788f38..83d7918 100644 | ||
36 | +--- a/strlen.c | ||
37 | ++++ b/strlen.c | ||
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | 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 | ||
49 | index 547587bef4..76975a6729 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | |||
67 | -BBCLASSEXTEND = "native nativesdk" | ||
68 | \ No newline at end of file | ||
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | ||
71 | 2.41.0 | ||
72 | |||
diff --git a/meta/lib/patchtest/selftest/selftest b/meta/lib/patchtest/selftest/selftest new file mode 100755 index 0000000000..6fad50ce61 --- /dev/null +++ b/meta/lib/patchtest/selftest/selftest | |||
@@ -0,0 +1,94 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | |||
3 | # Test every patch from files folder and output error on failure | ||
4 | # | ||
5 | # Copyright (C) 2016 Intel Corporation | ||
6 | # | ||
7 | # SPDX-License-Identifier: GPL-2.0-only | ||
8 | |||
9 | import os | ||
10 | import subprocess | ||
11 | import sys | ||
12 | |||
13 | currentdir = os.path.dirname(os.path.abspath(__file__)) | ||
14 | patchesdir = os.path.join(currentdir, 'files') | ||
15 | topdir = os.path.dirname(currentdir) | ||
16 | parentdir = os.path.dirname(topdir) | ||
17 | |||
18 | # path to the repo root | ||
19 | repodir = os.path.dirname(os.path.dirname(parentdir)) | ||
20 | |||
21 | def print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount): | ||
22 | total = passcount + skipcount + failcount + xpasscount + xfailcount + xskipcount + errorcount | ||
23 | print("============================================================================") | ||
24 | print("Testsuite summary for %s" % os.path.basename(topdir)) | ||
25 | print("============================================================================") | ||
26 | print("# TOTAL: %s" % str(total)) | ||
27 | print("# XPASS: %s" % str(xpasscount)) | ||
28 | print("# XFAIL: %s" % str(xfailcount)) | ||
29 | print("# XSKIP: %s" % str(xskipcount)) | ||
30 | print("# PASS: %s" % str(passcount)) | ||
31 | print("# FAIL: %s" % str(failcount)) | ||
32 | print("# SKIP: %s" % str(skipcount)) | ||
33 | print("# ERROR: %s" % str(errorcount)) | ||
34 | print("============================================================================") | ||
35 | |||
36 | # Once the tests are in oe-core, we can remove the testdir param and use os.path.dirname to get relative paths | ||
37 | def test(root, patch): | ||
38 | res = True | ||
39 | patchpath = os.path.abspath(os.path.join(root, patch)) | ||
40 | |||
41 | cmd = 'patchtest --repodir %s --testdir %s/tests --patch %s' % (repodir, topdir, patchpath) | ||
42 | results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, universal_newlines=True, shell=True) | ||
43 | |||
44 | return results | ||
45 | |||
46 | if __name__ == '__main__': | ||
47 | passcount = 0 | ||
48 | failcount = 0 | ||
49 | skipcount = 0 | ||
50 | xpasscount = 0 | ||
51 | xfailcount = 0 | ||
52 | xskipcount = 0 | ||
53 | errorcount = 0 | ||
54 | |||
55 | results = None | ||
56 | |||
57 | for root, dirs, patches in os.walk(patchesdir): | ||
58 | for patch in patches: | ||
59 | results = test(root, patch) | ||
60 | |||
61 | a = patch.split('.') | ||
62 | klass, testname = a[0], a[1] | ||
63 | expected_result = a[-1] | ||
64 | testid = ".%s.%s" % (klass,testname) | ||
65 | |||
66 | for resultline in results.splitlines(): | ||
67 | if testid in resultline: | ||
68 | result, _ = resultline.split(':', 1) | ||
69 | |||
70 | if expected_result.upper() == "FAIL" and result.upper() == "FAIL": | ||
71 | xfailcount = xfailcount + 1 | ||
72 | print("XFAIL: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) | ||
73 | elif expected_result.upper() == "PASS" and result.upper() == "PASS": | ||
74 | xpasscount = xpasscount + 1 | ||
75 | print("XPASS: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) | ||
76 | elif expected_result.upper() == "SKIP" and result.upper() == "SKIP": | ||
77 | xskipcount = xskipcount + 1 | ||
78 | print("XSKIP: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) | ||
79 | else: | ||
80 | print("%s: %s (%s)" % (result.upper(), testid.strip("."), os.path.basename(patch))) | ||
81 | if result.upper() == "PASS": | ||
82 | passcount = passcount + 1 | ||
83 | elif result.upper() == "FAIL": | ||
84 | failcount = failcount + 1 | ||
85 | elif result.upper() == "SKIP": | ||
86 | skipcount = skipcount + 1 | ||
87 | else: | ||
88 | print("Bad result on test %s against %s" % (testid.strip("."), os.path.basename(patch))) | ||
89 | errorcount = errorcount + 1 | ||
90 | break | ||
91 | else: | ||
92 | print ("No test for=%s" % patch) | ||
93 | |||
94 | print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount) | ||