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

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanityn
Change-Id: I7daa38f27c878e5195181ed82717cd28ca345dbc

lustre/tests/test-framework.sh

index b25fcb4..1ca18f0 100755 (executable)
@@ -2318,7 +2318,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