tests: Mount without updating mtab in mount.sh

The mount.sh script mixes calls to the regression test 'mount' binary
and /sbin/mount. This can result in stale mtab entries being left around
after a test run because /sbin/mount adds an mtab entry but the test
'mount' binary, which is also used for unmounting, does not remove mtab
entries.

To solve this problem, the -n option is passed to /sbin/mount so that it
doesn't add an mtab entry when mounting.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
Tyler Hicks 2014-04-24 14:24:54 -05:00
parent d3030f8627
commit c7d180c43b

View file

@ -33,8 +33,8 @@ loop_device="unset"
fstype="ext2"
setup_mnt() {
/bin/mount -t${fstype} ${loop_device} ${mount_point}
# /bin/mount -t${fstype} ${loop_device} ${mount_bad}
/bin/mount -n -t${fstype} ${loop_device} ${mount_point}
# /bin/mount -n -t${fstype} ${loop_device} ${mount_bad}
}
remove_mnt() {
mountpoint -q "${mount_point}"