]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/libmount/update
ba93e0bbe7c26dfa311baa1df0b489181a08c52a
3 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
5 TS_TOPDIR
="${0%/*}/../.."
8 .
"$TS_TOPDIR"/functions.sh
12 TESTPROG
="$TS_HELPER_LIBMOUNT_UPDATE"
14 [ -x $TESTPROG ] || ts_skip
"test not compiled"
18 # - the $TS_OUTPUT variable is between ts_init_subtest and ts_finalize_subtest
19 # redefined to subtest specific namespace -- it means that $TS_OUTPUT is a
20 # different file within a subtest.
22 # - all this test uses global $TS_OUTPUT.mountinfo
27 export LIBMOUNT_UTAB
=$TS_OUTPUT.utab
31 ts_init_subtest
"utab-mount"
32 ts_run
$TESTPROG --add /dev
/sda1
/mnt
/foo ext3
"rw,bbb,ccc,fff=FFF,ddd,noexec"
33 ts_run
$TESTPROG --add /dev
/sdb1
/mnt
/bar ext3
"ro,user"
34 ts_run
$TESTPROG --add /dev
/sda2
/mnt
/xyz ext3
"rw,loop=/dev/loop0,uhelper=hal"
35 ts_run
$TESTPROG --add none
/proc proc
"rw,user"
36 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
37 ts_finalize_subtest
# checks the utab
39 ts_init_subtest
"utab-move"
40 ts_run
$TESTPROG --move /mnt
/bar
/mnt
/newbar
41 ts_run
$TESTPROG --move /mnt
/xyz
/mnt
/newxyz
42 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
43 ts_finalize_subtest
# checks the utab
45 ts_init_subtest
"utab-remount"
46 ts_run
$TESTPROG --remount /mnt
/newbar
"ro,noatime"
47 ts_run
$TESTPROG --remount /mnt
/newxyz
"rw,user"
48 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
49 ts_finalize_subtest
# checks the utab
51 ts_init_subtest
"utab-umount"
52 ts_run
$TESTPROG --remove /mnt
/newbar
53 ts_run
$TESTPROG --remove /proc
54 cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
55 ts_finalize_subtest
# checks the utab
60 export LIBMOUNT_FSTAB
=$TS_OUTPUT.fstab
62 cp "$TS_SELF/files/fstab.comment" $LIBMOUNT_FSTAB
64 ts_init_subtest
"fstab-replace"
65 ts_run
$TESTPROG --replace "LABEL=foo" "/mnt/foo"
66 cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside
67 ts_finalize_subtest
#checks the fstab