Files
apfstests/tests/overlay/019
T
Darrick J. Wong a860a167d8 common: kill _supported_os
fstests only supports Linux, so get rid of this unnecessary predicate.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2020-09-21 01:16:50 +08:00

80 lines
1.8 KiB
Bash
Executable File

#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2016 Google, Inc. All Rights Reserved.
#
# FS QA Test 019
#
# Run fsstress on lower dir and top dir at the same time
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -f $tmp.*
}
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
# remove previous $seqres.full before test
rm -f $seqres.full
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# Remove all files from previous tests
_scratch_mkfs
lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
mkdir -p $lowerdir
_scratch_mount
echo "Silence is golden"
d_low=$lowerdir/fsstress
d_top=$SCRATCH_MNT/fsstress
mkdir -p $d_low $d_top
echo $FSSTRESS_PROG -s 42 -d $d_low -p 4 -n 1000 -l100 -v > $seqres.full.1
$FSSTRESS_PROG -s 42 -d $d_low -p 4 -n 1000 -l100 -v >> $seqres.full.1 2>&1 &
echo $FSSTRESS_PROG -s 42 -d $d_top -p 4 -n 1000 -l100 -v > $seqres.full.2
$FSSTRESS_PROG -s 42 -d $d_top -p 4 -n 1000 -l100 -v >> $seqres.full.2 2>&1 &
ret=0
if ! wait %1; then
echo "--------------------------------------" >>$seqres.full.1
echo "fsstress on lower directory returned $? - see $seqres.full.1"
echo "--------------------------------------" >>$seqres.full.1
ret=1
fi
if ! wait %2; then
echo "--------------------------------------" >>$seqres.full.2
echo "fsstress on overlay directory returned $? - see $seqres.full.2"
echo "--------------------------------------" >>$seqres.full.2
ret=1
fi
cat $seqres.full.1 $seqres.full.2 > $seqres.full
rm $seqres.full.1 $seqres.full.2
if [ "$ret" -eq 1 ]; then
status=1
else
status=0
fi
exit $status