mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
QA tweaks - use a single os type source mainly (drop get_os, use HOST_OS)
This commit is contained in:
@@ -70,9 +70,6 @@ _filter_dbtest()
|
||||
# link correct .out file
|
||||
_link_out_file $seq.out
|
||||
|
||||
# put operating system in $os
|
||||
_get_os
|
||||
|
||||
[ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
|
||||
|
||||
# real QA test starts here
|
||||
@@ -85,11 +82,7 @@ rm -f $seq.full
|
||||
|
||||
cd $testdir
|
||||
|
||||
if [ $os == 'irix' ]; then
|
||||
$here/src/dbtest -l 5 -n 500 2>&1 | tee -a $here/$seq.full | _filter_dbtest
|
||||
elif [ $os == 'linux' ]; then
|
||||
$here/src/dbtest -l 5 -n 3000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
|
||||
fi
|
||||
$here/src/dbtest -l 5 -n 3000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
|
||||
|
||||
# success, all done
|
||||
exit
|
||||
|
||||
@@ -65,9 +65,6 @@ _filesize()
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# put operating system in $os
|
||||
_get_os
|
||||
|
||||
_do_test()
|
||||
{
|
||||
_n="$1"
|
||||
@@ -114,14 +111,7 @@ _setup_testdir
|
||||
rm -f $here/$seq.full
|
||||
echo "brevity is wit..."
|
||||
|
||||
if [ $os == 'irix' ]; then
|
||||
count=1024
|
||||
elif [ $os == 'linux' ]; then
|
||||
count=2000
|
||||
else
|
||||
echo Error test $seq does not run on the operating system: `uname`
|
||||
exit
|
||||
fi
|
||||
count=2000
|
||||
procs=20
|
||||
|
||||
_check_test_fs
|
||||
|
||||
@@ -50,8 +50,6 @@ status=1 # failure is the default!
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
_get_os
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
@@ -135,7 +133,6 @@ _create_test_bed()
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os Linux
|
||||
|
||||
|
||||
_require_scratch
|
||||
rm -f $tmp.backup1 $tmp.backup2 $seq.full
|
||||
|
||||
|
||||
@@ -53,9 +53,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# put operating system in $os
|
||||
_get_os
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
@@ -74,19 +71,6 @@ _do_logprint()
|
||||
rm -f $seq.full
|
||||
rm -f $tmp.log
|
||||
|
||||
|
||||
if [ $os == 'irix' ]; then
|
||||
tail -f /var/adm/SYSLOG >$tmp.log &
|
||||
elif [ $os == 'linux' ]; then
|
||||
tail -f /var/log/messages >$tmp.log &
|
||||
else
|
||||
echo Error test $seq does not run on the operating system: `uname`
|
||||
exit
|
||||
fi
|
||||
|
||||
pid=$!
|
||||
cp $tmp.log $tmp.log.orig # note the original log
|
||||
|
||||
_require_scratch
|
||||
|
||||
echo "mkfs"
|
||||
|
||||
@@ -157,9 +157,6 @@ timestamp=${TIMESTAMP:=false}
|
||||
|
||||
[ -f check.time ] || touch check.time
|
||||
|
||||
_get_os
|
||||
if [ $os == "linux" ]; then
|
||||
|
||||
FULL_FSTYP_DETAILS=`_full_fstyp_details`
|
||||
FULL_HOST_DETAILS=`_full_platform_details`
|
||||
FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
|
||||
@@ -172,12 +169,6 @@ MKFS_OPTIONS -- $FULL_MKFS_OPTIONS
|
||||
MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
#Linux specific flag '-f'
|
||||
if [ $os == "linux" ]; then
|
||||
flag='-f'
|
||||
fi
|
||||
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
# call the overridden mkfs.xfs - make sure the FS is built
|
||||
|
||||
@@ -83,11 +83,6 @@ export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
|
||||
export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
|
||||
export BENCH_PASSES=${BENCH_PASSES:=5}
|
||||
export XFS_MKFS_OPTIONS=${XFS_MKFS_OPTIONS:=-bsize=4096}
|
||||
[ "$HOSTOS" == "Linux" ] && export XFS_MOUNT_OPTIONS=${XFS_MOUNT_OPTIONS:=-ologbufs=2}
|
||||
export UDF_MKFS_OPTIONS=${UDF_MKFS_OPTIONS}
|
||||
export UDF_MOUNT_OPTIONS=${UDF_MOUNT_OPTIONS}
|
||||
export NFS_MKFS_OPTIONS=${NFS_MKFS_OPTIONS}
|
||||
export NFS_MOUNT_OPTIONS=${NFS_MOUNT_OPTIONS}
|
||||
|
||||
#export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
|
||||
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
|
||||
|
||||
@@ -100,6 +100,7 @@ _scratch_options()
|
||||
|
||||
case $type in
|
||||
mkfs)
|
||||
[ "$HOSTOS" != "IRIX" ] && SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f"
|
||||
rt_opt="-r"
|
||||
log_opt="-l"
|
||||
;;
|
||||
@@ -123,8 +124,7 @@ _test_options()
|
||||
return
|
||||
fi
|
||||
|
||||
case $type
|
||||
in
|
||||
case $type in
|
||||
mkfs)
|
||||
rt_opt="-r"
|
||||
log_opt="-l"
|
||||
@@ -164,10 +164,8 @@ _scratch_mkfs_options()
|
||||
}
|
||||
|
||||
_scratch_mkfs_xfs()
|
||||
{
|
||||
{
|
||||
_scratch_options mkfs
|
||||
[ "$HOSTOS" != "IRIX" ] && \
|
||||
SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f"
|
||||
|
||||
$MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
|
||||
mkfs_status=$?
|
||||
@@ -788,8 +786,6 @@ _check_test_fs()
|
||||
|
||||
_check_scratch_fs()
|
||||
{
|
||||
|
||||
|
||||
case $FSTYP in
|
||||
xfs)
|
||||
SCRATCH_LOG=""
|
||||
@@ -833,8 +829,6 @@ _full_platform_details()
|
||||
|
||||
_check_testdir()
|
||||
{
|
||||
|
||||
|
||||
case $FSTYP in
|
||||
xfs)
|
||||
_check_test_fs
|
||||
@@ -915,8 +909,6 @@ _setup_nfs_testdir()
|
||||
|
||||
_setup_testdir()
|
||||
{
|
||||
|
||||
|
||||
case $FSTYP in
|
||||
xfs)
|
||||
_setup_xfs_testdir
|
||||
@@ -935,8 +927,6 @@ _setup_testdir()
|
||||
|
||||
_cleanup_testdir()
|
||||
{
|
||||
|
||||
|
||||
case $FSTYP in
|
||||
xfs)
|
||||
# do nothing, testdir is $TEST_DIR
|
||||
@@ -1009,18 +999,5 @@ _link_out_file()
|
||||
fi
|
||||
}
|
||||
|
||||
_get_os()
|
||||
{
|
||||
|
||||
if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
|
||||
os=irix
|
||||
elif [ "`uname`" == "Linux" ]; then
|
||||
os=linux
|
||||
else
|
||||
echo Error test does not run on the operating system: `uname`
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
# make sure this script returns success
|
||||
/bin/true
|
||||
|
||||
Reference in New Issue
Block a user