Test script updates to cater for the revised tree layout. Allows for separate user/kernel workareas now.

This commit is contained in:
fsgqa
2004-01-14 02:29:30 +00:00
parent 496086eaaf
commit 9d8399fbe1
5 changed files with 58 additions and 54 deletions
+3 -3
View File
@@ -59,7 +59,7 @@ then
_notrun "Can't run srcdiff without WORKAREA set" _notrun "Can't run srcdiff without WORKAREA set"
fi fi
if [ ! -f $WORKAREA/cmd/xfstests/tools/srcdiff ] if [ ! -f $WORKAREA/xfstests/tools/srcdiff ]
then then
_notrun "Can't find srcdiff tool under \"$WORKAREA\"" _notrun "Can't find srcdiff tool under \"$WORKAREA\""
fi fi
@@ -69,12 +69,12 @@ then
_notrun "Can't find XFS source under \"$WORKAREA\"" _notrun "Can't find XFS source under \"$WORKAREA\""
fi fi
if [ ! -d $WORKAREA/cmd/xfsprogs/include ] if [ ! -d $WORKAREA/xfsprogs/include ]
then then
_notrun "Can't find XFS command headers under \"$WORKAREA\"" _notrun "Can't find XFS command headers under \"$WORKAREA\""
fi fi
cd $WORKAREA/cmd/xfstests cd $WORKAREA/xfstests
echo Silence is golden. echo Silence is golden.
perl tools/srcdiff -q >$seq.full perl tools/srcdiff -q >$seq.full
if ! diff $seq.full $seq.good >/dev/null; then if ! diff $seq.full $seq.good >/dev/null; then
+1 -1
View File
@@ -45,7 +45,7 @@ Preparing system for tests:
Running tests: Running tests:
- cd cmd/xfs/stress - cd xfstests
- ./check 001 002 003 ... - ./check 001 002 003 ...
The check script tests the return value of each script, and The check script tests the return value of each script, and
+4 -4
View File
@@ -4,13 +4,13 @@ ______________________ ______________
- pick/create a user to run auto-qa and check they - pick/create a user to run auto-qa and check they
can use ptools to check out of the tree can use ptools to check out of the tree
- add your host to cmd/xfstests/common.config - add your host to xfstests/common.config
- add your host to cmd/xfstests/tools/auto-qa - add your host to xfstests/tools/auto-qa
check both these files in check both these files in
- make a directory "$HOME/qa" - make a directory "$HOME/qa"
- make a workarea "$HOME/qa/linux-xfs" for linux-xfs - make a workarea "$HOME/qa/linux-xfs" for linux-xfs
(easiest to copy one from elsewhere) (easiest to copy one from elsewhere)
- cd $HOME/qa ; ln -s linux-xfs/cmd/xfstests/tools/auto-qa . - cd $HOME/qa ; ln -s xfs-cmds/xfstests/tools/auto-qa .
(auto-qa must be a link into it's own source tree (auto-qa must be a link into it's own source tree
so it can update itself) so it can update itself)
- copy an appropriate .config file to - copy an appropriate .config file to
@@ -67,7 +67,7 @@ Notes:
- When run in "cron-init" or "init" states, the script - When run in "cron-init" or "init" states, the script
will p_tupdate itself and restart. If you start will p_tupdate itself and restart. If you start
with an empty source tree, you'll need to check with an empty source tree, you'll need to check
out the cmd/xfstests/tools/auto-qa script before it'll out the xfstests/tools/auto-qa script before it'll
work (duh). work (duh).
good luck. good luck.
+34 -32
View File
@@ -66,10 +66,10 @@ _fail()
_get_kernel_version() _get_kernel_version()
{ {
[ -x "$WORKAREA" ] \ [ -x "$KWORKAREA" ] \
|| _fail "can't access workarea $WORKAREA" || _fail "can't access kernel workarea $KWORKAREA"
[ -r "$WORKAREA/linux/Makefile" ] \ [ -r "$KWORKAREA/Makefile" ] \
|| _fail "can't read makefile $WORKAREA/linux/Makefile" || _fail "can't read kernel makefile $KWORKAREA/Makefile"
eval `awk ' eval `awk '
BEGIN { FS = "[ \t=]+" } BEGIN { FS = "[ \t=]+" }
@@ -80,7 +80,7 @@ _get_kernel_version()
END { END {
print "VERSION=" a "." b "." c d " ; SVERSION=" a "." b "." c print "VERSION=" a "." b "." c d " ; SVERSION=" a "." b "." c
} }
' < $WORKAREA/linux/Makefile` ' < $KWORKAREA/Makefile`
} }
# this should be constant # this should be constant
@@ -88,18 +88,18 @@ _get_kernel_version()
ROOT="$HOME/qa" ROOT="$HOME/qa"
HOST=`hostname -s` HOST=`hostname -s`
if [ ! -z "$CVSROOT" ]; then if [ ! -z "$CVSROOT" ]; then
export WORKAREA="$ROOT/linux-2.4-xfs" export WORKAREA="$ROOT/xfs-cmds"
else else
[ -z "$WORKAREA" ] && export WORKAREA="$ROOT/linux-xfs" [ -z "$WORKAREA" ] && export WORKAREA="$ROOT/xfs-cmds"
fi fi
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin/ptools:/usr/local/bin" export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin/ptools:/usr/local/bin"
STATE=$ROOT/qa.state STATE=$ROOT/qa.state
QADIR="$WORKAREA/cmd/xfstests" QADIR="$WORKAREA/xfstests"
SUDO="su -c" SUDO="su -c"
CONFIG="$ROOT/$HOST.config" CONFIG="$ROOT/$HOST.config"
COMMON_CONFIG="$WORKAREA/cmd/xfstests/common.config" COMMON_CONFIG="$WORKAREA/xfstests/common.config"
SH="/bin/sh" SH="/bin/sh"
LOG="$ROOT/qa.log" LOG="$ROOT/qa.log"
@@ -173,7 +173,7 @@ _restart()
_update_autoqa_file() _update_autoqa_file()
{ {
SELF="$ROOT/auto-qa" SELF="$ROOT/auto-qa"
SELF_UPDATE="cmd/xfstests/tools/auto-qa" SELF_UPDATE="xfstests/tools/auto-qa"
if [ -z "$CVSROOT" ]; then if [ -z "$CVSROOT" ]; then
cmd="p_tupdate $SELF_UPDATE" cmd="p_tupdate $SELF_UPDATE"
else else
@@ -186,22 +186,22 @@ _update_workarea()
{ {
if [ -z "$CVSROOT" ]; then if [ -z "$CVSROOT" ]; then
_log " *** p_tupdate" _log " *** p_tupdate"
cd $WORKAREA cd "$1"
p_tupdate 2>&1 \ WORKAREA="$1" p_tupdate 2>&1 \
|| _fail " !!! p_tupdate failed" || _fail " !!! p_tupdate failed"
_log " *** p_check/p_purge" _log " *** p_check/p_purge"
cd $WORKAREA cd "$1"
p_check -s | p_purge -yiu 2>&1 \ WORKAREA="$1" p_check -s | p_purge -yiu 2>&1 \
|| _fail " !!! p_check/p_purge failed" || _fail " !!! p_check/p_purge failed"
_log " *** non-trunk files" _log " *** non-trunk files"
cd $WORKAREA cd "$1"
p_list -c 2>&1 \ WORKAREA="$1" p_list -c 2>&1 \
|| _fail " !!! p_list failed" || _fail " !!! p_list failed"
else else
_log " *** cvs update" _log " *** cvs update"
cd $WORKAREA cd "$1"
cvs -z3 update -d cvs -z3 update -d
fi fi
} }
@@ -234,9 +234,9 @@ _test_mount()
_i386_install() _i386_install()
{ {
_sudo cp -f $WORKAREA/linux/arch/i386/boot/bzImage $IMAGE 2>&1 \ _sudo cp -f "$KWORKAREA/arch/i386/boot/bzImage" "$IMAGE" 2>&1 \
|| _fail " !!! install kernel failed" || _fail " !!! install kernel failed"
_sudo cp -f $WORKAREA/linux/System.map $SYSTEMMAP 2>&1 \ _sudo cp -f "$KWORKAREA/System.map" "$SYSTEMMAP" 2>&1 \
|| _fail " !!! install kernel failed" || _fail " !!! install kernel failed"
if [ -z "$KMODULES" -o "$KMODULES" = yes ]; then if [ -z "$KMODULES" -o "$KMODULES" = yes ]; then
_sudo make EXTRAVERSION=-$EXTRA modules_install 2>&1 \ _sudo make EXTRAVERSION=-$EXTRA modules_install 2>&1 \
@@ -269,7 +269,7 @@ _ia64_restart()
} }
_log "*** linux-xfs QA (`date`)" _log "*** XFS QA (`date`)"
_get_state _get_state
@@ -303,6 +303,7 @@ fi
[ "$UID" -eq 0 ] && _fail " !!! QA most be run as a normal user" [ "$UID" -eq 0 ] && _fail " !!! QA most be run as a normal user"
[ -d "$ROOT" ] || _fail " !!! QA root \"$ROOT\" not found" [ -d "$ROOT" ] || _fail " !!! QA root \"$ROOT\" not found"
[ -d "$KWORKAREA" ] || _fail " !!! QA kernel \"$KWORKAREA\" not found"
[ -d "$WORKAREA" ] || _fail " !!! QA workarea \"$WORKAREA\" not found" [ -d "$WORKAREA" ] || _fail " !!! QA workarea \"$WORKAREA\" not found"
[ -r "$CONFIG" ] || _fail " !!! Can't read config file $CONFIG" [ -r "$CONFIG" ] || _fail " !!! Can't read config file $CONFIG"
. "$COMMON_CONFIG" || _fail " !!! Couldn't source $COMMON_CONFIG" . "$COMMON_CONFIG" || _fail " !!! Couldn't source $COMMON_CONFIG"
@@ -347,7 +348,8 @@ do
;; ;;
*update) *update)
_update_workarea _update_workarea "$KWORKAREA"
_update_workarea "$WORKAREA"
new_state="cleantools" new_state="cleantools"
;; ;;
@@ -355,8 +357,8 @@ do
# we need to configure or else we might fail to clean # we need to configure or else we might fail to clean
for pkg in attr acl xfsprogs dmapi xfsdump xfstests for pkg in attr acl xfsprogs dmapi xfsdump xfstests
do do
[ -d $WORKAREA/cmd/$pkg ] || continue [ -d $WORKAREA/$pkg ] || continue
cd $WORKAREA/cmd/$pkg cd $WORKAREA/$pkg
_log " *** clean $pkg tools" _log " *** clean $pkg tools"
make realclean 2>&1 \ make realclean 2>&1 \
|| _fail " !!! clean $pkg failed" || _fail " !!! clean $pkg failed"
@@ -368,8 +370,8 @@ do
_log " *** build and install tools" _log " *** build and install tools"
for pkg in attr acl xfsprogs dmapi xfsdump xfstests for pkg in attr acl xfsprogs dmapi xfsdump xfstests
do do
[ -d $WORKAREA/cmd/$pkg ] || continue [ -d $WORKAREA/$pkg ] || continue
cd $WORKAREA/cmd/$pkg cd $WORKAREA/$pkg
# use e-fence - but this will only take effect on configure # use e-fence - but this will only take effect on configure
make configure 2>&1 \ make configure 2>&1 \
@@ -390,13 +392,13 @@ do
;; ;;
*cleankernel) *cleankernel)
_log " *** clean linux" _log " *** clean kernel"
cd $WORKAREA/linux cd "$KWORKAREA"
make mrproper 2>&1 \ make mrproper 2>&1 \
|| _fail " !!! clean linux failed" || _fail " !!! clean kernel failed"
_log " *** install configuration file" _log " *** install configuration file"
cp -f $CONFIG $WORKAREA/linux/.config 2>&1 \ cp -f $CONFIG "$KWORKAREA/.config" 2>&1 \
|| _fail " !!! failed to install config" || _fail " !!! failed to install config"
_log " *** remove version file" _log " *** remove version file"
@@ -413,7 +415,7 @@ do
# we better start from scratch if this fails # we better start from scratch if this fails
_change_state "cleankernel" _change_state "cleankernel"
cd $WORKAREA/linux cd "$KWORKAREA"
# we want to use default options for any new config options. # we want to use default options for any new config options.
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | \ echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | \
make EXTRAVERSION=-$EXTRA oldconfig 2>&1 \ make EXTRAVERSION=-$EXTRA oldconfig 2>&1 \
@@ -429,7 +431,7 @@ do
_change_state "clean" ; # we better start from scratch if this fails _change_state "clean" ; # we better start from scratch if this fails
cd $WORKAREA/linux cd "$KWORKAREA"
[ -z "$KTARGET" ] && KTARGET=bzImage [ -z "$KTARGET" ] && KTARGET=bzImage
[ -z "$KMODULES" -o "$KMODULES" = yes ] && \ [ -z "$KMODULES" -o "$KMODULES" = yes ] && \
KTARGET="$KTARGET modules" KTARGET="$KTARGET modules"
@@ -443,7 +445,7 @@ do
_sudo rm -rf $MODULES _sudo rm -rf $MODULES
_log " *** install kernel" _log " *** install kernel"
cd $WORKAREA/linux cd "$KWORKAREA"
case `uname -m` case `uname -m`
in in
i386|i686) _i386_install ;; i386|i686) _i386_install ;;
+16 -14
View File
@@ -13,7 +13,7 @@ use strict;
# #
# NB: to cross check that srcdiff is finding all the functions in the # NB: to cross check that srcdiff is finding all the functions in the
# user source file, providing you have "mkproto" installed, you # user source file, providing you have "mkproto" installed, you
# can "cd cmd/xfsprogs/libxfs" and cut&paste this in a bourne shell: # can "cd xfsprogs/libxfs" and cut&paste this in a bourne shell:
# $ for file in xfs_*.c; do # $ for file in xfs_*.c; do
# > mkproto -nps < $file | perl -ne ' # > mkproto -nps < $file | perl -ne '
# > END { print " $count\t- " } # > END { print " $count\t- " }
@@ -24,7 +24,9 @@ use strict;
# #
die "WORKAREA not set" unless defined $ENV{'WORKAREA'}; die "WORKAREA not set" unless defined $ENV{'WORKAREA'};
die "KWORKAREA not set" unless defined $ENV{'KWORKAREA'};
chdir $ENV{'WORKAREA'}; chdir $ENV{'WORKAREA'};
my $kworkarea = $ENV{'KWORKAREA'};
my $xdiff = $ENV{'XDIFF'}; my $xdiff = $ENV{'XDIFF'};
my $quiet=0; my $quiet=0;
my $usage=0; my $usage=0;
@@ -82,10 +84,10 @@ sub straightdiff {
sub m4macrodiff { sub m4macrodiff {
my ( $package ) = @_; my ( $package ) = @_;
foreach (`ls cmd/$package/m4/*.m4`) { foreach (`ls $package/m4/*.m4`) {
my $m4 = `basename $_`; my $m4 = `basename $_`;
chomp($m4); chomp($m4);
straightdiff $m4, "cmd/$package/m4", "cmd/xfstests/m4"; straightdiff $m4, "$package/m4", "xfstests/m4";
} }
} }
@@ -93,18 +95,18 @@ my $first = shift @pkglist;
foreach (@pkglist) { foreach (@pkglist) {
print "\n=== Checking $_ package ===\n"; print "\n=== Checking $_ package ===\n";
m4macrodiff $_; m4macrodiff $_;
straightdiff 'buildrules', "cmd/$first/include", "cmd/$_/include"; straightdiff 'buildrules', "$first/include", "$_/include";
straightdiff 'buildmacros', "cmd/$first/include", "cmd/$_/include"; straightdiff 'buildmacros', "$first/include", "$_/include";
straightdiff 'Makefile', "cmd/$first/build", "cmd/$_/build"; straightdiff 'Makefile', "$first/build", "$_/build";
straightdiff 'Makefile', "cmd/$first/build/rpm", "cmd/$_/build/rpm"; straightdiff 'Makefile', "$first/build/rpm", "$_/build/rpm";
straightdiff 'Makefile', "cmd/$first/build/tar", "cmd/$_/build/tar"; straightdiff 'Makefile', "$first/build/tar", "$_/build/tar";
} }
print "\n=== Checking headers ===\n"; print "\n=== Checking headers ===\n";
foreach (@difflist) { foreach (@difflist) {
straightdiff $_, 'cmd/xfsprogs/include', 'linux/fs/xfs'; straightdiff $_, 'xfsprogs/include', "$kworkarea/fs/xfs";
} }
straightdiff 'dmapi_kern.h', 'cmd/dmapi/include', 'linux/fs/xfs/dmapi'; straightdiff 'dmapi_kern.h', 'dmapi/include', "$kworkarea/fs/xfs/dmapi";
straightdiff 'dmapi.h', 'cmd/dmapi/include', 'linux/fs/xfs/dmapi'; straightdiff 'dmapi.h', 'dmapi/include', "$kworkarea/fs/xfs/dmapi";
# #
# setstate # setstate
@@ -271,7 +273,7 @@ sub functiondiff {
print "( Total: $count routine$plural checked in $file )\n" unless ($quiet); print "( Total: $count routine$plural checked in $file )\n" unless ($quiet);
} }
# cmd/xfsprogs/{libxfs,libxlog}/* fs/xfs/* # xfsprogs/{libxfs,libxlog}/* fs/xfs/*
my @funclist = qw( my @funclist = qw(
xfs_alloc.c xfs_alloc_btree.c xfs_attr_leaf.c xfs_alloc.c xfs_alloc_btree.c xfs_attr_leaf.c
xfs_bmap.c xfs_bmap_btree.c xfs_btree.c xfs_da_btree.c xfs_bmap.c xfs_bmap_btree.c xfs_btree.c xfs_da_btree.c
@@ -283,7 +285,7 @@ my @funclist = qw(
print "\n=== Checking libxfs code ===\n"; print "\n=== Checking libxfs code ===\n";
foreach (@funclist) { foreach (@funclist) {
functiondiff $_, 'cmd/xfsprogs/libxfs', 'linux/fs/xfs'; functiondiff $_, 'xfsprogs/libxfs', "$kworkarea/fs/xfs";
} }
print "\n=== Checking libxlog code ===\n"; print "\n=== Checking libxlog code ===\n";
functiondiff 'xfs_log_recover.c', 'cmd/xfsprogs/libxlog', 'linux/fs/xfs'; functiondiff 'xfs_log_recover.c', 'xfsprogs/libxlog', "$kworkarea/fs/xfs";