tests: search mount point in canonicalized form in /proc/mounts
* tests/functions.sh (ts_is_mounted): Enhance to resolve symlinks in given mount point before grep'ing in /proc/mount. If the test directory is on a symlink, then e.g. tests/ts/cramfs/doubles failed because the kernel keeps the mount entry in a canonicalized form in /proc/mounts while this function searched for it with the original path name. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
This commit is contained in:
parent
454996c495
commit
ee9c04f48c
|
@ -377,7 +377,10 @@ function ts_device_has_uuid {
|
|||
}
|
||||
|
||||
function ts_is_mounted {
|
||||
local DEV=$1
|
||||
local DEV=$( readlink -f $1 )
|
||||
if [ ".$DEV" = '.' ]; then
|
||||
DEV=$1
|
||||
fi
|
||||
|
||||
grep -q $DEV /proc/mounts && return 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue