mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: RESULTS_DIR needs to be an absolute path
Some tests 'cd <somedir>' and then direct output to $RESULT_DIR, which fails if the current working directory is not $here. Regardless, if an external results directory is to be used it needs to have a full path specified and the use of $here as the base of the results files is completely incorrect. Hence change all the $here/$seqres* references to simply be $seqres*, and instead encode the full path to the results in $RESULT_DIR. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Phil White <pwhite@sgi.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
0b1e8abd4a
commit
e5c7cd83c4
+6
-6
@@ -64,7 +64,7 @@ disallow_fail_make_request()
|
||||
start_fail_scratch_dev()
|
||||
{
|
||||
echo "Force SCRATCH_DEV device failure"
|
||||
echo " echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $here/$seqres.full
|
||||
echo " echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $seqres.full
|
||||
echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail
|
||||
|
||||
}
|
||||
@@ -72,7 +72,7 @@ start_fail_scratch_dev()
|
||||
stop_fail_scratch_dev()
|
||||
{
|
||||
echo "Make SCRATCH_DEV device operable again"
|
||||
echo " echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $here/$seqres.full
|
||||
echo " echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $seqres.full
|
||||
echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail
|
||||
|
||||
}
|
||||
@@ -141,12 +141,12 @@ _workout()
|
||||
echo ""
|
||||
echo "Start fsstress.."
|
||||
echo ""
|
||||
echo "fsstress $args" >> $here/$seqres.full
|
||||
echo "fsstress $args" >> $seqres.full
|
||||
$FSSTRESS_PROG $args > /dev/null 2>&1 &
|
||||
fs_pid=$!
|
||||
echo "Start fio.."
|
||||
cat $tmp-$seq.fio >> $seqres.full
|
||||
$FIO_PROG $tmp-$seq.fio >> $here/$seqres.full 2>&1 &
|
||||
$FIO_PROG $tmp-$seq.fio >> $seqres.full 2>&1 &
|
||||
fio_pid=$!
|
||||
|
||||
# Let's it work for awhile, and force device failure
|
||||
@@ -156,7 +156,7 @@ _workout()
|
||||
# that so buffered write(2) may succeed, but any integrity operations
|
||||
# such as (sync, fsync, fdatasync, direct-io) should fail.
|
||||
dd if=/dev/zero of=$SCRATCH_MNT/touch_failed_filesystem count=1 bs=4k conv=fsync \
|
||||
>> $here/$seqres.full 2>&1 && \
|
||||
>> $seqres.full 2>&1 && \
|
||||
_fail "failed: still able to perform integrity fsync on $SCRATCH_MNT"
|
||||
|
||||
kill $fs_pid
|
||||
@@ -178,7 +178,7 @@ _workout()
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
_scratch_mkfs >> $here/$seqres.full 2>&1 || _fail "mkfs failed"
|
||||
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
|
||||
_scratch_mount || _fail "mount failed"
|
||||
allow_fail_make_request
|
||||
_workout
|
||||
|
||||
Reference in New Issue
Block a user