diff options
author | Jin Wen <wen.jin@intel.com> | 2019-09-17 17:53:54 +0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2019-09-17 09:59:57 -0700 |
commit | 7643baf6c3919b3d727e6ba6c2e545dc6a653307 (patch) | |
tree | 3eea1511ae0680f110711f88875416cc7f8e6373 | |
parent | 3760e34c5e68b5b42437b3adf444d595eb2feb1e (diff) | |
download | mce-test-7643baf6c3919b3d727e6ba6c2e545dc6a653307.tar.gz |
k_tree_diff: Remove dependency on output order from find(1) command
The output of "find | md5sum" command under one dir is often different from under its
duplicated dir on Red hat OS, which will cause STRESS-HWPOISON-SOFT test fail, but
it isn't found on Ubuntu. Change "find | md5sum" command to "find | sort | md5sum"
command in k_tree_diff() can get expected result in both OS.
Signed-off-by: Jin Wen <wen.jin@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rwxr-xr-x | cases/stress/hwpoison/tools/fs-metadata/k-thread.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cases/stress/hwpoison/tools/fs-metadata/k-thread.sh b/cases/stress/hwpoison/tools/fs-metadata/k-thread.sh index aea7f87..c9a8e53 100755 --- a/cases/stress/hwpoison/tools/fs-metadata/k-thread.sh +++ b/cases/stress/hwpoison/tools/fs-metadata/k-thread.sh @@ -59,8 +59,8 @@ function k_tree_diff() local ta=$1 # tree a local tb=$2 # tree b - local md5a=$(run_quiet cd $ta; find | md5sum | awk '{ print $1}') - local md5b=$(run_quiet cd $tb; find | md5sum | awk '{ print $1}') + local md5a=$(run_quiet cd $ta; find | sort | md5sum | awk '{ print $1}') + local md5b=$(run_quiet cd $tb; find | sort | md5sum | awk '{ print $1}') if [ $md5a = $md5b ];then return 0 |