From 2d40d96b4ec86327ec510be293f2ce4711f00826 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Mon, 30 Jan 2023 20:33:08 +0300 Subject: [PATCH] LU-15053 tests: reset quota if ENABLE_QUOTA=1 Quota limits set in setup_quota() with ENABLE_QUOTA=1 should be cleaned up in the end to avoid failures in the next sessions Test-Parameters: testlist=sanity-quota env=ENABLE_QUOTA=yes Test-Parameters: testgroup=review-dne-part-4 env=ENABLE_QUOTA=yes Signed-off-by: Sergey Cheremencev Change-Id: Ia6b034739cfe800c6661f199420d0a4dbe7110fc Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49823 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- lustre/tests/test-framework.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 7ce7fea..516045c 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2280,6 +2280,18 @@ ost_quota_type() { # restore old quota type settings restore_quota() { + for usr in $QUOTA_USERS; do + echo "Setting up quota on $HOSTNAME:$MOUNT for $usr..." + for type in u g; do + cmd="$LFS setquota -$type $usr -b 0" + cmd="$cmd -B 0 -i 0 -I 0 $MOUNT" + echo "+ $cmd" + eval $cmd || error "$cmd FAILED!" + done + # display the quota status + echo "Quota settings for $usr : " + $LFS quota -v -u $usr $MOUNT || true + done if [ "$old_MDT_QUOTA_TYPE" ]; then if [[ $PERM_CMD == *"set_param -P"* ]]; then do_facet mgs $PERM_CMD \ -- 1.8.3.1