diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 16 |
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 d4c0db8bda..0435aa29c9 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
| @@ -516,6 +516,9 @@ part /part2 --source rootfs --ondisk mmcblk0 --fstype=ext4 --include-path %s""" | |||
| 516 | def test_permissions(self): | 516 | def test_permissions(self): |
| 517 | """Test permissions are respected""" | 517 | """Test permissions are respected""" |
| 518 | 518 | ||
| 519 | # prepare wicenv and rootfs | ||
| 520 | bitbake('core-image-minimal core-image-minimal-mtdutils -c do_rootfs_wicenv') | ||
| 521 | |||
| 519 | oldpath = os.environ['PATH'] | 522 | oldpath = os.environ['PATH'] |
| 520 | os.environ['PATH'] = get_bb_var("PATH", "wic-tools") | 523 | os.environ['PATH'] = get_bb_var("PATH", "wic-tools") |
| 521 | 524 | ||
| @@ -549,6 +552,19 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc | |||
| 549 | res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part)) | 552 | res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part)) |
| 550 | self.assertEqual(True, files_own_by_root(res.output)) | 553 | self.assertEqual(True, files_own_by_root(res.output)) |
| 551 | 554 | ||
| 555 | config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "%s"\n' % wks_file | ||
| 556 | self.append_config(config) | ||
| 557 | bitbake('core-image-minimal') | ||
| 558 | tmpdir = os.path.join(get_bb_var('WORKDIR', 'core-image-minimal'),'build-wic') | ||
| 559 | |||
| 560 | # check each partition for permission | ||
| 561 | for part in glob(os.path.join(tmpdir, 'temp-*.direct.p*')): | ||
| 562 | res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % (part)) | ||
| 563 | self.assertTrue(files_own_by_root(res.output) | ||
| 564 | ,msg='Files permission incorrect using wks set "%s"' % test) | ||
| 565 | |||
| 566 | # clean config and result directory for next cases | ||
| 567 | self.remove_config(config) | ||
| 552 | rmtree(self.resultdir, ignore_errors=True) | 568 | rmtree(self.resultdir, ignore_errors=True) |
| 553 | 569 | ||
| 554 | finally: | 570 | finally: |
