diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2023-09-27 15:11:00 +0900 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-10-05 22:44:29 +0800 |
commit | ffa82237277e4dd842025451911b5f3eee4a16e1 (patch) | |
tree | cf9ba3d2b59b34ff9589e1dc14fcdf671b4f8160 | |
parent | ab81b565f360218e63d71d33d244edae608f9e7a (diff) | |
download | xfstests-dev-ffa82237277e4dd842025451911b5f3eee4a16e1.tar.gz |
common/rc: check error case and fail the test
If we place /var/lib/xfstests on a read-only filesystem, commands in
_link_out_file_named() fail to modify the files. However, they won't fail
the test. As a result, the test case fails mysteriously with only "no
qualified output" printed.
Fix it by checking the error case.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r-- | common/rc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3431,8 +3431,8 @@ _link_out_file_named() } print $result ' <$seqfull.cfg) - rm -f $1 - ln -fs $(basename $1).$suffix $1 + rm -f $1 || _fail "_link_out_file_named: failed to remove existing output file" + ln -fs $(basename $1).$suffix $1 || _fail "$(basename $1).$suffix: could not setup output file" } _link_out_file() |