Whamcloud - gitweb
LU-17091 tests: check correct return value in lfs_df
authorLei Feng <flei@whamcloud.com>
Wed, 6 Sep 2023 02:39:49 +0000 (10:39 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 7 Sep 2023 00:36:54 +0000 (00:36 +0000)
$? is the return value of last command in a pipe.
We should check the return value of first command 'lfs df'
in this case.

Lustre-change: https://review.whamcloud.com/52285
Lustre-commit: TBD (from 8d0b87768034a766a301f945b7a51bf3a3cf0c40)

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanityn
Change-Id: I7daa38f27c878e5195181ed82717cd28ca345dbc
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/test-framework.sh

index 4ec12f8..047581c 100755 (executable)
@@ -2283,7 +2283,7 @@ restore_quota() {
 # This will allow fixing the "lfs df" summary line in the future.
 lfs_df() {
        $LFS df $* | sed -e 's/filesystem /filesystem_/'
-       check_lfs_df_ret_val $?
+       check_lfs_df_ret_val ${PIPESTATUS[0]}
 }
 
 # Get free inodes on the MDT specified by mdt index, free indoes on