[oe-commits] [openembedded-core] 46/122: selftest/imagefeatures: add basic test for useradd-staticids

git at git.openembedded.org git at git.openembedded.org
Mon Dec 4 17:25:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch rocko
in repository openembedded-core.

commit cb20382d85f5758ac9fb7cd7df085d07005f1337
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Sep 29 17:10:16 2017 +0100

    selftest/imagefeatures: add basic test for useradd-staticids
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Armin Kuster <akuster at mvista.com>
---
 meta-selftest/files/static-group              | 14 ++++++++++++++
 meta-selftest/files/static-passwd             | 11 +++++++++++
 meta/lib/oeqa/selftest/cases/imagefeatures.py | 10 ++++++++++
 3 files changed, 35 insertions(+)

diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group
new file mode 100644
index 0000000..9213b8e
--- /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 0000000..412f85d
--- /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 1a85000..2ca66d0 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")

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list