diff options
author | Karel Zak <kzak@redhat.com> | 2010-11-08 12:22:01 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2011-01-03 12:28:46 +0100 |
commit | 0e7abd33c71d590a3823d6e8ce6d79beee2abefe (patch) | |
tree | 840c5b8f683839a93e2f686eceb4bdecd320f667 /tests | |
parent | 7c118af7a1e898a258f6237e3a12faffe5844c0c (diff) | |
download | util-linux-old-0e7abd33c71d590a3823d6e8ce6d79beee2abefe.tar.gz |
tests: add utab update tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expected/libmount/update-utab-mount | 2 | ||||
-rw-r--r-- | tests/expected/libmount/update-utab-move | 2 | ||||
-rw-r--r-- | tests/expected/libmount/update-utab-remount | 2 | ||||
-rw-r--r-- | tests/expected/libmount/update-utab-umount | 1 | ||||
-rwxr-xr-x | tests/ts/libmount/update | 36 |
5 files changed, 41 insertions, 2 deletions
diff --git a/tests/expected/libmount/update-utab-mount b/tests/expected/libmount/update-utab-mount new file mode 100644 index 00000000..0464c749 --- /dev/null +++ b/tests/expected/libmount/update-utab-mount @@ -0,0 +1,2 @@ +0 0 0:0 / /mnt/bar user - ext3 /dev/sdb1 none +0 0 0:0 / /mnt/xyz loop=/dev/loop0,uhelper=hal - ext3 /dev/sda2 none diff --git a/tests/expected/libmount/update-utab-move b/tests/expected/libmount/update-utab-move new file mode 100644 index 00000000..bdcf9cb3 --- /dev/null +++ b/tests/expected/libmount/update-utab-move @@ -0,0 +1,2 @@ +0 0 0:0 / /mnt/newbar user - ext3 /dev/sdb1 none +0 0 0:0 / /mnt/newxyz loop=/dev/loop0,uhelper=hal - ext3 /dev/sda2 none diff --git a/tests/expected/libmount/update-utab-remount b/tests/expected/libmount/update-utab-remount new file mode 100644 index 00000000..853d9fbe --- /dev/null +++ b/tests/expected/libmount/update-utab-remount @@ -0,0 +1,2 @@ +0 0 0:0 / /mnt/newbar user - ext3 /dev/sdb1 none +0 0 0:0 / /mnt/newxyz user - ext3 /dev/sda2 none diff --git a/tests/expected/libmount/update-utab-umount b/tests/expected/libmount/update-utab-umount new file mode 100644 index 00000000..b8c096bf --- /dev/null +++ b/tests/expected/libmount/update-utab-umount @@ -0,0 +1 @@ +0 0 0:0 / /mnt/newxyz user - ext3 /dev/sda2 none diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update index 7de94251..92c92b08 100755 --- a/tests/ts/libmount/update +++ b/tests/ts/libmount/update @@ -23,10 +23,9 @@ TESTPROG="$TS_HELPER_LIBMOUNT_UPDATE" # Traditional /etc/mtab # export LIBMOUNT_MTAB=$TS_OUTPUT.mtab -export LIBMOUNT_FSTAB=$TS_OUTPUT.fstab +rm $LIBMOUNT_MTAB > $LIBMOUNT_MTAB -> $LIBMOUNT_FSTAB ts_init_subtest "mtab-mount" $TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec" @@ -54,4 +53,37 @@ $TESTPROG --remove /mnt/gogo cp $LIBMOUNT_MTAB $TS_OUTPUT # save the mtab aside ts_finalize_subtest # checks the mtab +# +# utab +# +rm $LIBMOUNT_MTAB +ln -s /proc/mounts $LIBMOUNT_MTAB + +export LIBMOUNT_UTAB=$TS_OUTPUT.utab +> $LIBMOUNT_UTAB + +ts_init_subtest "utab-mount" +$TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec" +$TESTPROG --add /dev/sdb1 /mnt/bar ext3 "ro,user" +$TESTPROG --add /dev/sda2 /mnt/xyz ext3 "rw,loop=/dev/loop0,uhelper=hal" +cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside +ts_finalize_subtest # checks the mtab + +ts_init_subtest "utab-move" +$TESTPROG --move /mnt/bar /mnt/newbar +$TESTPROG --move /mnt/xyz /mnt/newxyz +cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside +ts_finalize_subtest # checks the mtab + +ts_init_subtest "utab-remount" +$TESTPROG --remount /mnt/newbar "ro,noatime" +$TESTPROG --remount /mnt/newxyz "rw,user" +cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside +ts_finalize_subtest # checks the mtab + +ts_init_subtest "utab-umount" +$TESTPROG --remove /mnt/newbar +cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside +ts_finalize_subtest # checks the mtab + ts_finalize |