summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-09-29 17:10:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-08 19:54:22 +0000
commit468079140c1f19096bbc628663462beebc194800 (patch)
tree0582cb8fde0ac5a937c413f9d6a6d615a39bf466
parentbca999644e28e1666357bcbeab685547c6f9dd65 (diff)
downloadopenembedded-core-468079140c1f19096bbc628663462beebc194800.tar.gz
openembedded-core-468079140c1f19096bbc628663462beebc194800.tar.bz2
openembedded-core-468079140c1f19096bbc628663462beebc194800.zip
selftest/imagefeatures: add basic test for useradd-staticids
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta-selftest/files/static-group14
-rw-r--r--meta-selftest/files/static-passwd11
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py10
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 @@
+messagebus:x:500:
+systemd-bus-proxy:x:501:
+systemd-network:x:502:
+systemd-resolve:x:503:
+systemd-timesync:x:504:
+polkitd:x:505:
+lock:x:506:
+systemd-journal:x:507:
+netdev:x:508:
+avahi:x:509:
+avahi-autoipd:x:510:
+rpc:x:511:
+rpcuser:x:513:
+
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 @@
+messagebus:x:500:500::/var/lib/dbus:/bin/false
+systemd-bus-proxy:x:501:501::/:/bin/nologin
+systemd-network:x:502:502::/:/bin/nologin
+systemd-resolve:x:503:503::/:/bin/nologin
+systemd-timesync:x:504:504::/:/bin/nologin
+polkitd:x:505:505::/:/bin/nologin
+avahi:x:509:509::/:/bin/nologin
+avahi-autoipd:x:510:510::/:/bin/nologin
+rpc:x:511:511::/:/bin/nologin
+distcc:x:512:nogroup::/:/bin/nologin
+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):
# check if result image is in deploy directory
self.assertTrue(os.path.exists(image_path),
"%s image %s doesn't exist" % (itype, image_path))
+
+ def test_useradd_static(self):
+ config = """
+USERADDEXTENSION = "useradd-staticids"
+USERADD_ERROR_DYNAMIC = "skip"
+USERADD_UID_TABLES += "files/static-passwd"
+USERADD_GID_TABLES += "files/static-group"
+"""
+ self.write_config(config)
+ bitbake("core-image-base")