~ubuntu-branches/ubuntu/trusty/util-linux/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/ts/libmount/context

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2011-11-03 15:38:23 UTC
  • mto: (4.5.5 sid) (1.6.4)
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: package-import@ubuntu.com-20111103153823-10sx16jprzxlhkqf
ImportĀ upstreamĀ versionĀ 2.20.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
sleep 3
31
31
 
32
32
DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}')
33
 
[ "x${DEVNAME}" == "x" ] && ts_die "Cannot found device"
 
33
[ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device"
34
34
 
35
35
DEVICE="/dev/${DEVNAME}"
36
36
 
63
63
$TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1
64
64
 
65
65
grep -q $DEVICE $LIBMOUNT_MTAB || \
66
 
        echo "(by device) cannot found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
 
66
        echo "(by device) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
67
67
ts_finalize_subtest
68
68
 
69
69
ts_init_subtest "umount-by-devname"
78
78
mkdir -p $MOUNTPOINT &>  /dev/null
79
79
$TESTPROG --mount LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>&1
80
80
grep -q $DEVICE $LIBMOUNT_MTAB || \
81
 
        echo "(by label) cannot found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
 
81
        echo "(by label) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
82
82
ts_finalize_subtest
83
83
 
84
84
 
93
93
mkdir -p $MOUNTPOINT &> /dev/null
94
94
$TESTPROG --mount UUID="$UUID" $MOUNTPOINT >> $TS_OUTPUT 2>&1
95
95
grep -q $DEVICE $LIBMOUNT_MTAB || \
96
 
        echo "(by uuid) cannot found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
 
96
        echo "(by uuid) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
97
97
$TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
98
98
grep -q $DEVICE $LIBMOUNT_MTAB &&
99
99
        echo "umount failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
105
105
$TESTPROG --mount -o ro,noexec,nosuid,strictatime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1
106
106
$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>&1
107
107
grep -q $DEVICE $LIBMOUNT_MTAB || \
108
 
        echo "cannot found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
 
108
        echo "cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
 
109
 
 
110
$TESTPROG --mount -o remount,rw $MOUNTPOINT >> $TS_OUTPUT 2>&1
 
111
$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>&1
 
112
 
109
113
$TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
110
114
grep -q $DEVICE $LIBMOUNT_MTAB &&
111
115
        echo "umount failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1