Whamcloud - gitweb
LU-13904 tests: don't assume echo_client is a module. 55/39655/2
authorMr NeilBrown <neilb@suse.de>
Fri, 7 Aug 2020 04:32:33 +0000 (14:32 +1000)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:45:29 +0000 (15:45 +0000)
The upstream lustre client can be compiled with all code
in the kernel - no modules.
So testing if the module is loaded gets incorrect results.
So add a test to see if the functionalty is already present,
and don't load a module if none is needed.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Id630107d57f473dfdc21687a4964e1ca4c83efe4
Reviewed-on: https://review.whamcloud.com/39655
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index c3ae827..521dc85 100755 (executable)
@@ -15778,7 +15778,8 @@ obdecho_test() {
 test_180a() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run"
 
-       if ! module_loaded obdecho; then
+       if ! [ -d /sys/fs/lustre/echo_client ] &&
+          ! module_loaded obdecho; then
                load_module obdecho/obdecho &&
                        stack_trap "rmmod obdecho" EXIT ||
                        error "unable to load obdecho on client"