diff options
author | Dan Streetman <ddstreet@canonical.com> | 2019-07-12 17:47:26 +0200 |
---|---|---|
committer | Dan Streetman <ddstreet@canonical.com> | 2019-07-17 00:05:15 +0200 |
commit | ec4cab49c95d03d23cad9741685f3837a8ccaab4 (patch) | |
tree | 315c884c2c3e9e09af252b54297e2dca2d1a26cd /test/TEST-06-SELINUX | |
parent | Merge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-... (diff) | |
download | systemd-ec4cab49c95d03d23cad9741685f3837a8ccaab4.tar.xz systemd-ec4cab49c95d03d23cad9741685f3837a8ccaab4.zip |
test: add create_empty_image_rootdir() to simplify testcase setup
Almost all tests were manually mounting/unmounting $TESTDIR/root
from the loopback image; this moves all that into test-functions
so the test setup functions are simplier.
Also add test_setup_cleanup() function, to cleanup what is mounted
by create_empty_image_rootdir()
Diffstat (limited to 'test/TEST-06-SELINUX')
-rwxr-xr-x | test/TEST-06-SELINUX/test.sh | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh index 5d26cb0f0a..4a6cf126ab 100755 --- a/test/TEST-06-SELINUX/test.sh +++ b/test/TEST-06-SELINUX/test.sh @@ -16,9 +16,7 @@ SETUP_SELINUX=yes KERNEL_APPEND="$KERNEL_APPEND selinux=1 security=selinux" test_setup() { - create_empty_image - mkdir -p $TESTDIR/root - mount ${LOOPDEV}p1 $TESTDIR/root + create_empty_image_rootdir # Create what will eventually be our root filesystem onto an overlay ( @@ -100,9 +98,6 @@ EOF ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service - - ddebug "umount $TESTDIR/root" - umount $TESTDIR/root } do_test "$@" |