Whamcloud - gitweb
LU-11607 tests: remove duplicate code lnet-selftest 65/36965/3
authorJames Nunez <jnunez@whamcloud.com>
Mon, 9 Dec 2019 18:37:14 +0000 (11:37 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Dec 2019 03:27:29 +0000 (03:27 +0000)
lnet-selftest.sh and test-framework.sh both have a function
called is_mounted() that check if the file system is
mounted.  Since both functions do and return the same
thing, let's remove the is_mounted() function from
lnet-selftest.

Test-Parameters: trivial
Test-Parameters: fstype=zfs testlist=lnet-selftest,lnet-selftest
Test-Parameters: fstype=ldiskfs testlist=lnet-selftest,lnet-selftest
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I05ce84002cfa8ac96ac4f1e8169fb2233b66f378
Reviewed-on: https://review.whamcloud.com/36965
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/lnet-selftest.sh
lustre/tests/test-framework.sh

index ed8104d..93432e0 100755 (executable)
@@ -61,12 +61,6 @@ _restore_mount () {
        fi
 }
 
-is_mounted () {
-    local mntpt=$1
-    local mounted=$(mounted_lustre_filesystems)
-    echo $mounted' ' | grep -w -q $mntpt' '
-}
-
 if local_mode; then
    lst_SERVERS=`hostname`
    lst_CLIENTS=`hostname`
index 1566801..27a2251 100755 (executable)
@@ -5267,11 +5267,11 @@ check_timeout () {
 }
 
 is_mounted () {
-    local mntpt=$1
-    [ -z $mntpt ] && return 1
-    local mounted=$(mounted_lustre_filesystems)
+       local mntpt=$1
+       [ -z $mntpt ] && return 1
+       local mounted=$(mounted_lustre_filesystems)
 
-    echo $mounted' ' | grep -w -q $mntpt' '
+       echo $mounted' ' | grep -w -q $mntpt' '
 }
 
 is_empty_dir() {