diff options
author | Ruediger Meier | 2015-03-19 17:12:15 +0100 |
---|---|---|
committer | Ruediger Meier | 2015-03-19 17:12:15 +0100 |
commit | bb3df8218b4f8f145e345ab59828a9b3d6d70c4b (patch) | |
tree | 5adbb5decb43b28ec1e36a960152f99235a211f5 /tests/ts/mount | |
parent | tests: more error handling in mount/move (refactor) (diff) | |
download | kernel-qcow2-util-linux-bb3df8218b4f8f145e345ab59828a9b3d6d70c4b.tar.gz kernel-qcow2-util-linux-bb3df8218b4f8f145e345ab59828a9b3d6d70c4b.tar.xz kernel-qcow2-util-linux-bb3df8218b4f8f145e345ab59828a9b3d6d70c4b.zip |
tests: some more mount error handling
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/mount')
-rwxr-xr-x | tests/ts/mount/fstab-broken | 4 | ||||
-rwxr-xr-x | tests/ts/mount/fstab-none | 1 | ||||
-rwxr-xr-x | tests/ts/mount/shared-subtree | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/ts/mount/fstab-broken b/tests/ts/mount/fstab-broken index 2f0f63cae..57d5d2d4f 100755 --- a/tests/ts/mount/fstab-broken +++ b/tests/ts/mount/fstab-broken @@ -39,6 +39,7 @@ ts_fstab_close ts_init_subtest "mount" $TS_CMD_MOUNT $MNT &> /dev/null +[ "$?" = "0" ] || ts_log "error: mount $MNT" $TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null if [ "$?" != "0" ]; then ts_log "Cannot find $MNT in /proc/self/mountinfo" @@ -46,11 +47,13 @@ else ts_log "OK" fi $TS_CMD_UMOUNT $MNT &> /dev/null +[ "$?" = "0" ] || ts_log "error: umount $MNT" ts_finalize_subtest ts_init_subtest "mount-all" $TS_CMD_MOUNT -a &> /dev/null +[ "$?" = "0" ] || ts_log "error: mount -a" $TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null if [ "$?" != "0" ]; then ts_log "Cannot find $MNT in /proc/self/mountinfo" @@ -58,6 +61,7 @@ else ts_log "OK" fi $TS_CMD_UMOUNT $MNT &> /dev/null +[ "$?" = "0" ] || ts_log "error: umount $MNT" ts_finalize_subtest ts_fstab_clean diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none index f4684b11c..082afe905 100755 --- a/tests/ts/mount/fstab-none +++ b/tests/ts/mount/fstab-none @@ -19,6 +19,7 @@ ts_fstab_add "none" "$TS_MOUNTPOINT" "tmpfs" "rw,nosuid,nodev,relatime" mkdir -p $TS_MOUNTPOINT $TS_CMD_MOUNT $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT +[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT" $TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null [ $? -eq 0 ] || ts_die "Not found target (mount failed?)" diff --git a/tests/ts/mount/shared-subtree b/tests/ts/mount/shared-subtree index 2f8f5b90a..efce11a10 100755 --- a/tests/ts/mount/shared-subtree +++ b/tests/ts/mount/shared-subtree @@ -18,6 +18,7 @@ ts_check_losetup # bind $TS_CMD_MOUNT --bind $TS_MOUNTPOINT $TS_MOUNTPOINT +[ "$?" = "0" ] || ts_die "error: mount --bind" # check the bind $TS_CMD_FINDMNT --kernel --mountpoint $TS_MOUNTPOINT &> /dev/null |