From 03c75f99e6ca4b445cefbc446b033da952d758e4 Mon Sep 17 00:00:00 2001 From: Li Xi Date: Mon, 15 May 2023 12:11:58 +0800 Subject: [PATCH 1/1] LU-16828 sanity: wrong argument for find in test_133g > proc_regexp="/{proc,sys}/{fs,sys,kernel/debug}/{lustre,lnet}/" > proc_dirs=$(eval ls -d $proc_regexp) After running the upper commands, 'echo "$proc_dirs"' woud print multiple lines like what sanity test 401a would print: proc_dirs='/proc/fs/lustre/ /sys/fs/lustre/ /sys/kernel/debug/lnet/ /sys/kernel/debug/lustre/' This will cause wrong command exectuted remotely in test_133g without "-name" argument and badarea_io pipe after the command: ... | xargs -n 1 find /proc/fs/lustre/ /sys/fs/lustre/ /sys/kernel/debug/lnet/ /sys/kernel/debug/lustre/ -name | xargs -n 1 badarea_io This patch fixes the problem. Test-Parameters: trivial testlist=sanity env=ONLY=133g Signed-off-by: Li Xi Change-Id: I93d611c34eecfa6d14d3f83a60faa3e637514128 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50994 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 44f4123..c7b6c54 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -15292,6 +15292,7 @@ test_133g() { remote_ost_nodsh && skip "remote OST with nodsh" local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null) + local proc_dirs_str=$(eval echo $proc_dirs) local skipped_params="'force_lbug|changelog_mask|daemon_file'" local facet for facet in mds1 ost1; do @@ -15304,7 +15305,7 @@ test_133g() { if [ $facet_ver -ge $(version_code 2.5.54) ]; then do_facet $facet "$LCTL list_param -FR '*' | grep '=' | tr -d = | egrep -v $skipped_params | - xargs -n 1 find $proc_dirs -name | + xargs -n 1 find $proc_dirs_str -name | xargs -n 1 badarea_io" || error "$facet badarea_io failed" else -- 1.8.3.1