initialize extra_mount_options as blank string in _check_xfs_filesystem to prevent...
[xfstests-dev.git] / common.rc
index 67c2488d8cc665da6035d4d119cedbeba0eebaf2..6be40f6d547f35405ad08fcf2a602a919c86aa95 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -623,6 +623,15 @@ _require_nonexternal()
        _notrun "External device testing in progress, skipped this test"
 }
 
+# check for the fsgqa user on the machine
+#
+_require_user()
+{
+    qa_user=fsgqa
+    cat /etc/passwd | grep -q $qa_user
+    [ "$?" == "0" ] || _notrun "$qa_user user not defined."
+}
+
 # check that a FS is mounted as XFS. if so, return mount point
 #
 _xfs_mounted()
@@ -635,7 +644,7 @@ _xfs_mounted()
 
     device=$1
 
-    if _mount | grep $device | $AWK_PROG '
+    if _mount | grep "$device " | $AWK_PROG '
         /type xfs/  { print $3 ; exit 0 }
         END         { exit 1 }
     '
@@ -681,6 +690,7 @@ _check_xfs_filesystem()
        exit 1
     fi
 
+    extra_mount_options=""
     device=$1
     if [ "$2" != "none" ]; then
                extra_log_options="-l$2"