Whamcloud - gitweb
LU-14701 tests: wrong get[set]_osd_param() call 74/43774/2
authorElena Gryaznova <elena.gryaznova@hpe.com>
Mon, 24 May 2021 15:14:26 +0000 (18:14 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 2 Jun 2021 17:49:40 +0000 (17:49 +0000)
sanity-dom:sanityn:test_19 is always skipped because of
get_osd_param() is called incorrectly for DOM=yes.
For osd-* MDT device is to be used instead of default
  device=${2:-$FSNAME-OST*}

Fixes: a7625cd2f37a ("LU-3285 test: add Data-on-MDT tests and fixes")
Test-Parameters: trivial testlist=sanity-dom env=ONLY=sanityn
Test-Parameters: trivial testlist=sanityn env=ONLY=19
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-9965
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I2bb9fc7fbaac966ea2254071e7ea82b963a93ad3
Reviewed-on: https://review.whamcloud.com/43774
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanityn.sh

index 860a4a9..ca804b6 100755 (executable)
@@ -568,15 +568,18 @@ run_test 18 "mmap sanity check ================================="
 
 test_19() { # bug3811
        local node=$(facet_active_host ost1)
+       local device="$FSNAME-OST*"
 
-       [ "x$DOM" = "xyes" ] && node=$(facet_active_host $SINGLEMDS)
+       [ "x$DOM" = "xyes" ] && node=$(facet_active_host $SINGLEMDS) &&
+               device="$FSNAME-MDT*"
 
        # check whether obdfilter is cache capable at all
-       get_osd_param $node '' read_cache_enable >/dev/null ||
+       get_osd_param $node $device read_cache_enable >/dev/null ||
                skip "not cache-capable obdfilter"
 
-       local MAX=$(get_osd_param $node '' readcache_max_filesize | head -n 1)
-       set_osd_param $node '' readcache_max_filesize 4096
+       local max=$(get_osd_param $node $device readcache_max_filesize |\
+               head -n 1)
+       set_osd_param $node $device readcache_max_filesize 4096
        dd if=/dev/urandom of=$TMP/$tfile bs=512k count=32
        local SUM=$(cksum $TMP/$tfile | cut -d" " -f 1,2)
        cp $TMP/$tfile $DIR1/$tfile
@@ -591,7 +594,7 @@ test_19() { # bug3811
                [ "$(cat $TMP/sum2)" = "$SUM" ] || \
                        error "$DIR2/$tfile $(cat $TMP/sum2) != $SUM"
        done
-       set_osd_param $node '' readcache_max_filesize $MAX
+       set_osd_param $node $device readcache_max_filesize $max
        rm $DIR1/$tfile
 }
 run_test 19 "test concurrent uncached read races ==============="