]> err.no Git - util-linux/commitdiff
tests: cleanup ts/mount
authorKarel Zak <kzak@redhat.com>
Mon, 19 Jan 2009 23:50:01 +0000 (00:50 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:32:58 +0000 (23:32 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
19 files changed:
tests/ts/mount/devname
tests/ts/mount/fstab-devname
tests/ts/mount/fstab-devname2label
tests/ts/mount/fstab-devname2uuid
tests/ts/mount/fstab-label
tests/ts/mount/fstab-label2devname
tests/ts/mount/fstab-label2uuid
tests/ts/mount/fstab-symlink
tests/ts/mount/fstab-uuid
tests/ts/mount/fstab-uuid2devname
tests/ts/mount/fstab-uuid2label
tests/ts/mount/label
tests/ts/mount/move
tests/ts/mount/mtablock
tests/ts/mount/noncanonical
tests/ts/mount/paths
tests/ts/mount/remount
tests/ts/mount/special
tests/ts/mount/uuid

index f0661f32abbd96cc89a9c59c9f7ec85048b07c69..64b7903610091f6ffb236a007a97b23b1767ceaa 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
 
-TS_COMPONENT="mount"
-TS_DESC="devname"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by devname"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 87483afd2fd8e3b1e05c15fcf2b812dfb3596b76..1a2494de7356dda625e1e449a953a7c57790ce7b 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="devname"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by devname (fstab)"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 575acaa73ea0f6b0db2db7d3b610a4426c851744..053213f2ac9a7679011046be76af34fd236c4fe4 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="devname2label"
-
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by devname (fstab label)"
 LABEL="testMountD2L"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index d6bf72b994e1aec6838d28d22387396ba9599cd1..5cab621ee4ab30975034d949ebcf5ad148a11c21 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="devname2uuid"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by devname (fstab uuid)"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index d47fbb16ea9063aa05f5cc5728a4a063cc7618db..375a1ba72bd46ec9efd3316cefdf58d498de6fb1 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="label"
-
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by label (fstab)"
 LABEL="testFstabLabel"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index a6e1e7a976f2135133044295e1040aa9752db61e..f53de4fb225c7a75f78cb9ce79c14329ac6fcb33 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="label2devname"
-
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by label (fstab devname)"
 LABEL="testMountL2D"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 18960164d32c890c91605c27b0dd07e9d2e27627..1c90c2edafd17ee2ff9ec344117c46f96cc06563 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="label2uuid"
 
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by label (fstab uuid)"
 LABEL="testMountL2U"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index f567e8fdbe085c21877a9e734628d736356586b3..98797a7f476efb6af4553421837f76572f81dca6 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
 
-TS_COMPONENT="fstab"
-TS_DESC="symlink"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by devname (fstab symlink)"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
 set -o pipefail
 
-LINKNAME="$(pwd)/$TS_OUTDIR/${TS_NS}_lnk"
+LINKNAME="$TS_OUTDIR/${TS_TESTNAME}_lnk"
 
 DEVICE=$(ts_device_init)
 [ "$?" == 0 ] || ts_die "Cannot init device"
index bdd56d7725846593c5c8b493541897b9efedb54d..7f78e45e3af6950789fe6777596f7241a3cfd39f 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="uuid"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by uuid (fstab)"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 5feac01cb43d04958e91a6fbad0b8ac3adbba7c5..b1d2e7773c44ad919e0ffd7b25cc30992bae4674 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="uuid2devname"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by uuid (fstab devname)"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index fff28ef2fc5ae2458a2a7418e75a0549cd10262c..7b21dfa22356e12a2c15ec23d77d783397daf34c 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="fstab"
-TS_DESC="uuid2label"
-
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by uuid (fstab label)"
 LABEL="testMountU2L"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index a5b28fa904bf94e62ed56f88a1af403d30fb8cdf..05df26ac7f330d4df33a77c7961c37cf1a8f87ad 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
-TS_DESC="label"
 
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by label"
 LABEL="testMountLabel"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 7e57992150af3938380d0d0af9a9525a8d3f625c..660ef436e9a38c255a76140a69d61fea89c11752 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
-TS_DESC="move "
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="move"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
-PWD=$(pwd)
-
-DIR_SRC="$PWD/$TS_OUTDIR/mnt-move-src"
-DIR_A="$PWD/$TS_OUTDIR/mnt-move-A"
-DIR_B="$PWD/$TS_OUTDIR/mnt-move-B"
+DIR_SRC="$TS_OUTDIR/mnt-move-src"
+DIR_A="$TS_OUTDIR/mnt-move-A"
+DIR_B="$TS_OUTDIR/mnt-move-B"
 
 [ -d $DIR_SRC ] || mkdir $DIR_SRC
 [ -d $DIR_A ] || mkdir $DIR_A
index b2f989ed9b00612d9ed89991003f13ee56037e7b..137e1a2ab71fb557d2d8d5226fba5ae02b345ab0 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
-TS_DESC="mtablock"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="mtab lock"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index c732e1bb16561bd950ecebd5e6c1d04ccaae5a7c..d9be68bebc3192755fd8a9473e77652611e32da5 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
+TS_TOPDIR="$(dirname $0)/../.."
 TS_DESC="non canonical path"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 
-if [ ! -e "/etc" ]; then
-       ts_skip "/etc not such file of directory"
-fi
+[ ! -e "/etc" ] && ts_skip "/etc not such file of directory"
 
 # Don't canonicalize SPEC for cifs, nfs, smbfs, ...
 $TS_CMD_MOUNT -v -v -v -f -i -n -t cifs //etc /foo | grep "spec:" >> $TS_OUTPUT 2>&1
index d77e87b67bb4b89f00151a8daba561a3b015821e..93b44ae9712c7d4f97f5855e355a9dd84390a044 100755 (executable)
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-#
-. ./commands.sh
-. ./functions.sh
 
-TS_COMPONENT="mount"
+TS_TOPDIR="$(dirname $0)/../.."
 TS_DESC="basic paths"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 
 $TS_CMD_MOUNT -n -f -v -v -v /dev/dummy /mnt &> $TS_OUTPUT
index 96d9b9b49d377c5b03f65af4890b307f691d9430..57dd074ccf7e54ea9b1ad97aa71144bf0197069a 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
+TS_TOPDIR="$(dirname $0)/../.."
 TS_DESC="remount"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index 9ec78836c88149c2741aac80dabd66518f97920e..f31154ecd35bda67265f9a5bb373cb1719c95602 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
-TS_DESC="special program"
-
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="call mount.<type>"
 MOUNTER="/sbin/mount.mytest"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot
 
index ee186f079b17181bd46d96ccc51ff66ad1fd3931..e46110318553b02021a1ed9e759cd16c6ff3d43e 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-. ./commands.sh
-. ./functions.sh
-
-TS_COMPONENT="mount"
-TS_DESC="uuid"
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="by uuid"
 
+. $TS_TOPDIR/functions.sh
 ts_init "$*"
 ts_skip_nonroot