From a4484c1e8191762d626edf9901b1dd24ec8c081a Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Fri, 14 Oct 2022 17:51:03 +0300 Subject: [PATCH] LU-16239 tests: do not cleanup clients dirs Patch adds the ability to not remove the clients directories. Let's just rename them if CLEANUP set to false. Test-Parameters: trivial Signed-off-by: Elena Gryaznova HPE-bug-id: LUS-11158 Reviewed-by: Vladimir Saveliev Reviewed-by: Alexander Boyko Change-Id: Ibc55d32ef4946a62b00dcbf745567c123650ced9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48870 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/ha.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lustre/tests/ha.sh b/lustre/tests/ha.sh index 352bdaa..0cfd595 100755 --- a/lustre/tests/ha.sh +++ b/lustre/tests/ha.sh @@ -527,9 +527,14 @@ ha_repeat_mpi_load() $check_attrs " && rccheck=1 [[ -n "$ha_postcmd" ]] && ha_info "$ha_postcmd" && ha_on $client "$ha_postcmd" >>"$log" 2>&1 - (( ((rc == 0)) && ((rccheck == 0)) && (( mustpass != 0 )) )) || - (( ((rc != 0)) && ((rccheck == 0)) && (( mustpass == 0 )) )) && - ha_on $client rm -rf "$dir"; + if (( ((rc == 0)) && ((rccheck == 0)) && \ + (( mustpass != 0 )) )) || + (( ((rc != 0)) && ((rccheck == 0)) && \ + (( mustpass == 0 )) )); then + local suf=$(date +%s) + $ha_cleanup && ha_on $client rm -rf "$dir" || + ha_on $client mv "$dir" "${dir}.${suf}" + fi; } >>"$log" 2>&1 ha_info $client: rc=$rc rccheck=$rccheck mustpass=$mustpass -- 1.8.3.1