QA tweaks - use a single os type source mainly (drop get_os, use HOST_OS)

This commit is contained in:
fsgqa
2004-06-16 06:08:04 +00:00
parent 4237cdb1c1
commit 562962e6b1
7 changed files with 5 additions and 78 deletions
+1 -8
View File
@@ -70,9 +70,6 @@ _filter_dbtest()
# link correct .out file # link correct .out file
_link_out_file $seq.out _link_out_file $seq.out
# put operating system in $os
_get_os
[ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform" [ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
# real QA test starts here # real QA test starts here
@@ -85,11 +82,7 @@ rm -f $seq.full
cd $testdir cd $testdir
if [ $os == 'irix' ]; then $here/src/dbtest -l 5 -n 3000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
$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
# success, all done # success, all done
exit exit
+1 -11
View File
@@ -65,9 +65,6 @@ _filesize()
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# put operating system in $os
_get_os
_do_test() _do_test()
{ {
_n="$1" _n="$1"
@@ -114,14 +111,7 @@ _setup_testdir
rm -f $here/$seq.full rm -f $here/$seq.full
echo "brevity is wit..." echo "brevity is wit..."
if [ $os == 'irix' ]; then count=2000
count=1024
elif [ $os == 'linux' ]; then
count=2000
else
echo Error test $seq does not run on the operating system: `uname`
exit
fi
procs=20 procs=20
_check_test_fs _check_test_fs
-3
View File
@@ -50,8 +50,6 @@ status=1 # failure is the default!
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
_get_os
_cleanup() _cleanup()
{ {
cd / cd /
@@ -135,7 +133,6 @@ _create_test_bed()
_supported_fs xfs udf nfs _supported_fs xfs udf nfs
_supported_os Linux _supported_os Linux
_require_scratch _require_scratch
rm -f $tmp.backup1 $tmp.backup2 $seq.full rm -f $tmp.backup1 $tmp.backup2 $seq.full
-16
View File
@@ -53,9 +53,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# put operating system in $os
_get_os
# real QA test starts here # real QA test starts here
_supported_fs xfs _supported_fs xfs
_supported_os IRIX Linux _supported_os IRIX Linux
@@ -74,19 +71,6 @@ _do_logprint()
rm -f $seq.full rm -f $seq.full
rm -f $tmp.log 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 _require_scratch
echo "mkfs" echo "mkfs"
-9
View File
@@ -157,9 +157,6 @@ timestamp=${TIMESTAMP:=false}
[ -f check.time ] || touch check.time [ -f check.time ] || touch check.time
_get_os
if [ $os == "linux" ]; then
FULL_FSTYP_DETAILS=`_full_fstyp_details` FULL_FSTYP_DETAILS=`_full_fstyp_details`
FULL_HOST_DETAILS=`_full_platform_details` FULL_HOST_DETAILS=`_full_platform_details`
FULL_MKFS_OPTIONS=`_scratch_mkfs_options` FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
@@ -172,12 +169,6 @@ MKFS_OPTIONS -- $FULL_MKFS_OPTIONS
MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
EOF EOF
fi
#Linux specific flag '-f'
if [ $os == "linux" ]; then
flag='-f'
fi
umount $SCRATCH_DEV 2>/dev/null umount $SCRATCH_DEV 2>/dev/null
# call the overridden mkfs.xfs - make sure the FS is built # call the overridden mkfs.xfs - make sure the FS is built
-5
View File
@@ -83,11 +83,6 @@ export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"} export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
export BENCH_PASSES=${BENCH_PASSES:=5} export BENCH_PASSES=${BENCH_PASSES:=5}
export XFS_MKFS_OPTIONS=${XFS_MKFS_OPTIONS:=-bsize=4096} 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 DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a} export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
+3 -26
View File
@@ -100,6 +100,7 @@ _scratch_options()
case $type in case $type in
mkfs) mkfs)
[ "$HOSTOS" != "IRIX" ] && SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f"
rt_opt="-r" rt_opt="-r"
log_opt="-l" log_opt="-l"
;; ;;
@@ -123,8 +124,7 @@ _test_options()
return return
fi fi
case $type case $type in
in
mkfs) mkfs)
rt_opt="-r" rt_opt="-r"
log_opt="-l" log_opt="-l"
@@ -164,10 +164,8 @@ _scratch_mkfs_options()
} }
_scratch_mkfs_xfs() _scratch_mkfs_xfs()
{ {
_scratch_options mkfs _scratch_options mkfs
[ "$HOSTOS" != "IRIX" ] && \
SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f"
$MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV $MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
mkfs_status=$? mkfs_status=$?
@@ -788,8 +786,6 @@ _check_test_fs()
_check_scratch_fs() _check_scratch_fs()
{ {
case $FSTYP in case $FSTYP in
xfs) xfs)
SCRATCH_LOG="" SCRATCH_LOG=""
@@ -833,8 +829,6 @@ _full_platform_details()
_check_testdir() _check_testdir()
{ {
case $FSTYP in case $FSTYP in
xfs) xfs)
_check_test_fs _check_test_fs
@@ -915,8 +909,6 @@ _setup_nfs_testdir()
_setup_testdir() _setup_testdir()
{ {
case $FSTYP in case $FSTYP in
xfs) xfs)
_setup_xfs_testdir _setup_xfs_testdir
@@ -935,8 +927,6 @@ _setup_testdir()
_cleanup_testdir() _cleanup_testdir()
{ {
case $FSTYP in case $FSTYP in
xfs) xfs)
# do nothing, testdir is $TEST_DIR # do nothing, testdir is $TEST_DIR
@@ -1009,18 +999,5 @@ _link_out_file()
fi 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 # make sure this script returns success
/bin/true /bin/true