diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
index c4c4d95926c1a234059558b87a31212bc0613391..f3e77a8c22b454ac2c3d49e8cf33ca2633ec3b4b 100644
--- a/lustre/tests/sanity.sh
+++ b/lustre/tests/sanity.sh
@@ -5728,8 +5728,8 @@ test_140() { #bug-17379
                 }
         done
         i=`expr $i - 1`
-        [ $i -eq 5 -o $i -eq 8 ] || error "Invalid symlink depth"
         echo "The symlink depth = $i"
+        [ $i -eq 5 -o $i -eq 8 ] || error "Invalid symlink depth"
 }
 run_test 140 "Check reasonable stack depth (shouldn't LBUG) ===="