]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
The wait_for_recovery_toofull function was referencing an undefined
authorfxtack <fxtack@foxmail.com>
Thu, 25 Dec 2025 05:17:19 +0000 (13:17 +0800)
committerfxtack <fxtack@foxmail.com>
Thu, 25 Dec 2025 05:17:19 +0000 (13:17 +0800)
variable '$ret' instead of the correct '$?' to check the exit status
of the wait_for_state function call.

This fix ensures the function properly checks the return value and
handles recovery timeout scenarios correctly in the OSD recovery
space test.

Fixes: undefined variable reference in test script
Signed-off-by: fxtack <fxtack@foxmail.com>
qa/standalone/osd/osd-recovery-space.sh

index 67fe2e91dfa2a07e87a7b985fb4f2e577a856d01..a95847577922541468e8bfdf2df415291cd4868c 100755 (executable)
@@ -76,7 +76,7 @@ function wait_for_state() {
 function wait_for_recovery_toofull() {
     local timeout=$1
     wait_for_state recovery_toofull $timeout
-    if [ $ret -ne 0 ]; then
+    if [ $? -ne 0 ]; then
       echo "Error: Recovery toofull timeout"
       return 1
     fi