summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
449d046)
Tests sanity 133f and 133g were doing nothing after change 38567.
Because the argument given to badarea_io was not a path, 0 was always
returned. This patch finds the complete path of the parameters
returned by "lctl get_param" and gives them to badarea_io.
Fixes:
1c54733894f8 ("LU-10401 tests: add -F so list_param prints entry type")
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I7a8914e2950d5a8b2a93948c4fbe889520a3198c
Reviewed-on: https://review.whamcloud.com/44184
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
ALWAYS_EXCEPT+=" 130a 130b 130c 130d 130e 130f 130g"
fi
ALWAYS_EXCEPT+=" 130a 130b 130c 130d 130e 130f 130g"
fi
+proc_regexp="/{proc,sys}/{fs,sys,kernel/debug}/{lustre,lnet}/"
+
# Get the SLES distro version
#
# Returns a version string that should only be used in comparing
# Get the SLES distro version
#
# Returns a version string that should only be used in comparing
$LCTL get_param -R '*' &> /dev/null
# Verifing writability with badarea_io.
$LCTL get_param -R '*' &> /dev/null
# Verifing writability with badarea_io.
+ local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
+ local skipped_params='force_lbug|changelog_mask|daemon_file'
$LCTL list_param -FR '*' | grep '=' | tr -d = |
$LCTL list_param -FR '*' | grep '=' | tr -d = |
- egrep -v 'force_lbug|changelog_mask' | xargs badarea_io ||
+ egrep -v "$skipped_params" |
+ xargs -n 1 find $proc_dirs -name |
+ xargs -n 1 badarea_io ||
error "client badarea_io failed"
# remount the FS in case writes/reads /proc break the FS
error "client badarea_io failed"
# remount the FS in case writes/reads /proc break the FS
remote_mds_nodsh && skip "remote MDS with nodsh"
remote_ost_nodsh && skip "remote OST with nodsh"
remote_mds_nodsh && skip "remote MDS with nodsh"
remote_ost_nodsh && skip "remote OST with nodsh"
+ local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
+ local skipped_params="'force_lbug|changelog_mask|daemon_file'"
local facet
for facet in mds1 ost1; do
local facet_ver=$(lustre_version_code $facet)
local facet
for facet in mds1 ost1; do
local facet_ver=$(lustre_version_code $facet)
fi
if [ $facet_ver -ge $(version_code 2.5.54) ]; then
do_facet $facet "$LCTL list_param -FR '*' | grep '=' |
fi
if [ $facet_ver -ge $(version_code 2.5.54) ]; then
do_facet $facet "$LCTL list_param -FR '*' | grep '=' |
- tr -d = | egrep -v 'force_lbug|changelog_mask' |
- xargs badarea_io" ||
+ tr -d = | egrep -v $skipped_params |
+ xargs -n 1 find $proc_dirs -name |
+ xargs -n 1 badarea_io" ||
error "$facet badarea_io failed"
else
skip_noexit "$facet: too old lustre for get_param -R"
error "$facet badarea_io failed"
else
skip_noexit "$facet: too old lustre for get_param -R"
#count the number of parameters by "list_param -R"
local params=$($LCTL list_param -R '*' 2>/dev/null | wc -l)
#count the number of parameters by listing proc files
#count the number of parameters by "list_param -R"
local params=$($LCTL list_param -R '*' 2>/dev/null | wc -l)
#count the number of parameters by listing proc files
- local proc_regexp="/{proc,sys}/{fs,sys,kernel/debug}/{lustre,lnet}/"
local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
echo "proc_dirs='$proc_dirs'"
[ -n "$proc_dirs" ] || error "no proc_dirs on $HOSTNAME"
local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
echo "proc_dirs='$proc_dirs'"
[ -n "$proc_dirs" ] || error "no proc_dirs on $HOSTNAME"