diff options
Diffstat (limited to 'tests/ts/libmount/tabfiles-tags')
-rwxr-xr-x | tests/ts/libmount/tabfiles-tags | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/ts/libmount/tabfiles-tags b/tests/ts/libmount/tabfiles-tags index 318ccf05c..dbc9a57f5 100755 --- a/tests/ts/libmount/tabfiles-tags +++ b/tests/ts/libmount/tabfiles-tags @@ -11,17 +11,18 @@ TESTPROG="$TS_HELPER_LIBMOUNT_TAB" [ -x $TESTPROG ] || ts_skip "test not compiled" -DEVICE=$(ts_scsi_debug_init dev_size_mb=50 sector_size=512) +# set global variable TS_DEVICE +ts_scsi_debug_init dev_size_mb=50 sector_size=512 LABEL="testLibmount" UUID="de1bc6e9-34ab-4151-a1d7-900042eee8d9" # # Create filesystem # -mkfs.ext3 -F -L $LABEL $DEVICE -U $UUID &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE +mkfs.ext3 -F -L $LABEL $TS_DEVICE -U $UUID &> /dev/null || ts_die "Cannot make ext3 on $TS_DEVICE" $TS_DEVICE udevadm settle -ts_device_has_uuid $DEVICE || ts_die "Cannot find UUID on $DEVICE" $DEVICE +ts_device_has_uuid $TS_DEVICE || ts_die "Cannot find UUID on $TS_DEVICE" $TS_DEVICE FSTAB="$TS_OUTDIR/fstab" @@ -36,7 +37,7 @@ sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT ts_finalize_subtest ts_init_subtest "fstab-label2dev" -ts_valgrind $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +ts_valgrind $TESTPROG --find-forward $FSTAB source $TS_DEVICE &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT ts_finalize_subtest @@ -60,18 +61,18 @@ ts_finalize_subtest ts_init_subtest "fstab-dev2label" # has to return /mnt/mountpoint -ts_valgrind $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +ts_valgrind $TESTPROG --find-forward $FSTAB source $TS_DEVICE &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT ts_finalize_subtest # # Add devname # -echo "$DEVICE /mnt/mountpoint3 auto defaults" >> $FSTAB +echo "$TS_DEVICE /mnt/mountpoint3 auto defaults" >> $FSTAB ts_init_subtest "fstab-dev" # has to return /mnt/mountpoint3 -ts_valgrind $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +ts_valgrind $TESTPROG --find-forward $FSTAB source $TS_DEVICE &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT sed -i -e 's/source: .*//g' $TS_OUTPUT # devname is generated, remove it ts_finalize_subtest |