Whamcloud - gitweb
LU-11152 test: work around find bug in sanity 133[fg] 34/32934/5
authorJohn L. Hammond <jhammond@whamcloud.com>
Fri, 3 Aug 2018 16:40:28 +0000 (11:40 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 15 Aug 2018 17:16:59 +0000 (17:16 +0000)
Some versions of find do not handle the -ignore_readdir_race option
correctly. Work around this by calling error_ignore() rather than
error() in these cases.

Test-Parameters: trivial

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I0ad9cef3743f1748908dbab9087b0b54e6466d0a
Reviewed-on: https://review.whamcloud.com/32934
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/sanity.sh

index 1b5e165..9a98a85 100755 (executable)
@@ -10964,6 +10964,18 @@ run_test 133e "Verifying OST {read,write}_bytes nid stats ================="
 
 proc_regexp="/{proc,sys}/{fs,sys,kernel/debug}/{lustre,lnet}/"
 
+# Some versions of find (4.5.11, 4.5.14) included in CentOS 7.3-7.5 do
+# not honor the -ignore_readdir_race option correctly. So we call
+# error_ignore() rather than error() in these cases. See LU-11152.
+error_133() {
+       if (find --version; do_facet mds1 find --version) |
+               grep -q '\b4\.5\.1[1-4]\b'; then
+               error_ignore LU-11152 "$@"
+       else
+               error "$@"
+       fi
+}
+
 test_133f() {
        # First without trusting modes.
        local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
@@ -10981,7 +10993,7 @@ test_133f() {
                -not -name force_lbug \
                -not -name changelog_mask \
                -exec badarea_io '{}' \; ||
-                       error "find $proc_dirs failed"
+                       error_133 "find $proc_dirs failed"
 }
 run_test 133f "Check reads/writes of client lustre proc files with bad area io"
 
@@ -11015,7 +11027,7 @@ test_133g() {
                        -not -name force_lbug \
                        -not -name changelog_mask \
                        -exec badarea_io '{}' \\\; ||
-                               error "$facet find $facet_proc_dirs failed"
+                               error_133 "$facet find $facet_proc_dirs failed"
        done
 
        # remount the FS in case writes/reads /proc break the FS