diff options
| author | Ross Burton <ross.burton@intel.com> | 2017-09-29 17:10:16 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-04 17:23:56 +0000 |
| commit | dd03b7399b3418302921bcbc557834e832d6cf5e (patch) | |
| tree | 737c697f2b90cd662f98e7788973d9b9355ad2cb | |
| parent | 55d21c7fb6ba383057d08c20f6aea66a462ae574 (diff) | |
| download | poky-dd03b7399b3418302921bcbc557834e832d6cf5e.tar.gz | |
selftest/imagefeatures: add basic test for useradd-staticids
(From OE-Core rev: cb20382d85f5758ac9fb7cd7df085d07005f1337)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta-selftest/files/static-group | 14 | ||||
| -rw-r--r-- | meta-selftest/files/static-passwd | 11 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 10 |
3 files changed, 35 insertions, 0 deletions
diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group new file mode 100644 index 0000000000..9213b8e9bc --- /dev/null +++ b/meta-selftest/files/static-group | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | messagebus:x:500: | ||
| 2 | systemd-bus-proxy:x:501: | ||
| 3 | systemd-network:x:502: | ||
| 4 | systemd-resolve:x:503: | ||
| 5 | systemd-timesync:x:504: | ||
| 6 | polkitd:x:505: | ||
| 7 | lock:x:506: | ||
| 8 | systemd-journal:x:507: | ||
| 9 | netdev:x:508: | ||
| 10 | avahi:x:509: | ||
| 11 | avahi-autoipd:x:510: | ||
| 12 | rpc:x:511: | ||
| 13 | rpcuser:x:513: | ||
| 14 | |||
diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd new file mode 100644 index 0000000000..412f85d469 --- /dev/null +++ b/meta-selftest/files/static-passwd | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | messagebus:x:500:500::/var/lib/dbus:/bin/false | ||
| 2 | systemd-bus-proxy:x:501:501::/:/bin/nologin | ||
| 3 | systemd-network:x:502:502::/:/bin/nologin | ||
| 4 | systemd-resolve:x:503:503::/:/bin/nologin | ||
| 5 | systemd-timesync:x:504:504::/:/bin/nologin | ||
| 6 | polkitd:x:505:505::/:/bin/nologin | ||
| 7 | avahi:x:509:509::/:/bin/nologin | ||
| 8 | avahi-autoipd:x:510:510::/:/bin/nologin | ||
| 9 | rpc:x:511:511::/:/bin/nologin | ||
| 10 | distcc:x:512:nogroup::/:/bin/nologin | ||
| 11 | rpcuser:x:513:513::/var/lib/nfs:/bin/nologin | ||
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index 1a850008ef..2ca66d0cf3 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
| @@ -226,3 +226,13 @@ class ImageFeatures(OESelftestTestCase): | |||
| 226 | # check if result image is in deploy directory | 226 | # check if result image is in deploy directory |
| 227 | self.assertTrue(os.path.exists(image_path), | 227 | self.assertTrue(os.path.exists(image_path), |
| 228 | "%s image %s doesn't exist" % (itype, image_path)) | 228 | "%s image %s doesn't exist" % (itype, image_path)) |
| 229 | |||
| 230 | def test_useradd_static(self): | ||
| 231 | config = """ | ||
| 232 | USERADDEXTENSION = "useradd-staticids" | ||
| 233 | USERADD_ERROR_DYNAMIC = "skip" | ||
| 234 | USERADD_UID_TABLES += "files/static-passwd" | ||
| 235 | USERADD_GID_TABLES += "files/static-group" | ||
| 236 | """ | ||
| 237 | self.write_config(config) | ||
| 238 | bitbake("core-image-base") | ||
