summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-05-06 16:56:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-07 22:31:21 +0100
commitf28cca6abcae12ef4d4c4b5299f993b7acbcf4bd (patch)
tree1a80ac4bd0c48f8915ef4e9fe8d3b80f8b05f8fe /meta/lib/oeqa
parent1d1b19f2d14573264f9c361eaa3676c94bf80cd7 (diff)
downloadpoky-f28cca6abcae12ef4d4c4b5299f993b7acbcf4bd.tar.gz
oeqa/selftest: add test for git working correctly inside pseudo
The fix for CVE-2022-24765 in git[1] breaks any use of git inside pseudo. Add a simple test case to oe-selftest to verify that at least basic uses of git work fine under pseudo. [1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 (From OE-Core rev: 46822268040a23dbb81f71fe35aee8c2663a31f6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/git.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/git.py b/meta/lib/oeqa/selftest/cases/git.py
new file mode 100644
index 0000000000..f12874dc7d
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/git.py
@@ -0,0 +1,15 @@
1from oeqa.selftest.case import OESelftestTestCase
2from oeqa.utils.commands import bitbake
3
4class GitCheck(OESelftestTestCase):
5 def test_git_intercept(self):
6 """
7 Git binaries with CVE-2022-24765 fixed will refuse to operate on a
8 repository which is owned by a different user. This breaks our
9 do_install task as that runs inside pseudo, so the git repository is
10 owned by the build user but git is running as (fake)root.
11
12 We have an intercept which disables pseudo, so verify that it works.
13 """
14 bitbake("git-submodule-test -c test_git_as_user")
15 bitbake("git-submodule-test -c test_git_as_root")