summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 091f0ab47c..03a3ac565c 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -588,6 +588,9 @@ part / --source rootfs --fstype=ext4 --include-path %s --include-path core-imag
588 def test_permissions(self): 588 def test_permissions(self):
589 """Test permissions are respected""" 589 """Test permissions are respected"""
590 590
591 # prepare wicenv and rootfs
592 bitbake('core-image-minimal core-image-minimal-mtdutils -c do_rootfs_wicenv')
593
591 oldpath = os.environ['PATH'] 594 oldpath = os.environ['PATH']
592 os.environ['PATH'] = get_bb_var("PATH", "wic-tools") 595 os.environ['PATH'] = get_bb_var("PATH", "wic-tools")
593 596
@@ -621,6 +624,19 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
621 res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part)) 624 res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part))
622 self.assertEqual(True, files_own_by_root(res.output)) 625 self.assertEqual(True, files_own_by_root(res.output))
623 626
627 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "%s"\n' % wks_file
628 self.append_config(config)
629 bitbake('core-image-minimal')
630 tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'),'build-wic')
631
632 # check each partition for permission
633 for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')):
634 res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part))
635 self.assertTrue(files_own_by_root(res.output)
636 ,msg='Files permission incorrect using wks set "%s"' % test)
637
638 # clean config and result directory for next cases
639 self.remove_config(config)
624 rmtree(self.resultdir, ignore_errors=True) 640 rmtree(self.resultdir, ignore_errors=True)
625 641
626 finally: 642 finally: