Whamcloud - gitweb
LU-11665 tests: check number of pages correctly 72/33772/5
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 4 Dec 2018 01:30:23 +0000 (18:30 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 Jan 2019 02:40:31 +0000 (02:40 +0000)
On ARM or other 64KB PAGE_SIZE systems, check the read cache size
against the actual PAGE_SIZE instead of just checking the number
of pages being read.

Test-Parameters: trivial clientarch=aarch64 testlist=sanity
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8fb90325a18b343c5f5af01df603a25fe33ebbe5
Reviewed-on: https://review.whamcloud.com/33772
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index ec6ae03..8e23777 100755 (executable)
@@ -23,8 +23,8 @@ fi
 if [[ $(uname -m) = aarch64 ]]; then
        # bug number:    LU-11596 (all below)
        ALWAYS_EXCEPT+=" 42d 42e 63a 63b 64a 64b 64c"
-       # bug number:    LU-11671 LU-11665 LU-11594 LU-11667 LU-11729
-       ALWAYS_EXCEPT+=" 45       101c     103a     317      810"
+       # bug number:    LU-11671 LU-11594 LU-11667 LU-11729
+       ALWAYS_EXCEPT+=" 45       103a      317      810"
 fi
 
 # Check Grants after these tests
@@ -7679,13 +7679,14 @@ test_101c() {
        local STRIPE_SIZE=1048576
        local FILE_LENGTH=$((STRIPE_SIZE*100))
        local nreads=10000
+       local rsize=65536
        local osc_rpc_stats
 
        setup_test101bc $STRIPE_SIZE $FILE_LENGTH
 
        cancel_lru_locks osc
        $LCTL set_param osc.*.rpc_stats 0
-       $READS -f $DIR/$tfile -s$FILE_LENGTH -b65536 -n$nreads -t 180
+       $READS -f $DIR/$tfile -s$FILE_LENGTH -b$rsize -n$nreads -t 180
        for osc_rpc_stats in $($LCTL get_param -N osc.*.rpc_stats); do
                local stats=$($LCTL get_param -n $osc_rpc_stats)
                local lines=$(echo "$stats" | awk 'END {print NR;}')
@@ -7697,8 +7698,8 @@ test_101c() {
                for size in 1 2 4 8; do
                        local rpc=$(echo "$stats" |
                                    awk '($1 == "'$size':") {print $2; exit; }')
-                       [ $rpc != 0 ] &&
-                               error "Small $((size*4))k read IO $rpc !"
+                       [ $rpc != 0 ] && ((size * PAGE_SIZE < rsize)) &&
+                               error "Small $((size*PAGE_SIZE)) read IO $rpc!"
                done
                echo "$osc_rpc_stats check passed!"
        done