From: Nathan Scott Date: Tue, 21 May 2002 04:28:30 +0000 (+0000) Subject: changes to fold xfs_support code back into XFS (the other sgi projects X-Git-Tag: v1.1.0~1100 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ec76242f153dd144b11a6b6c9cf4a4b15e88990d;p=users%2Fhch%2Fxfstests-dev.git changes to fold xfs_support code back into XFS (the other sgi projects using this will be / have been fixed). reduces our footprint on the base kernel. NB: xfs_support.o as a distinct module no longer exists. --- diff --git a/tools/README.auto-qa b/tools/README.auto-qa index 730d168ea..7b62f6b1a 100644 --- a/tools/README.auto-qa +++ b/tools/README.auto-qa @@ -49,9 +49,9 @@ To get it going automagically: 30 4 * * * $HOME/qa/auto-qa cron-restarted Notes: - - if MODULAR=1 in auto-qa XFS and xfs_support are expected to - be modules. if MODULAR=0 they should be built into - the kernel + - if MODULAR=1 in auto-qa the XFS filesystem is expected to + be a module; if MODULAR=0 it should be built into + the kernel. - the test device is cleaned at the start of the QA run (to stop nightly QA being stuffed up if someone leaves the device inconsistant etc) diff --git a/tools/auto-qa b/tools/auto-qa index b51b58145..fa3de27e4 100755 --- a/tools/auto-qa +++ b/tools/auto-qa @@ -53,8 +53,8 @@ _fail() { if [ "$started" = "1" ] then - echo "auto-qa stopped" | wall - started=0 + echo "auto-qa stopped" | wall + started=0 fi _log "$*" @@ -62,9 +62,9 @@ _fail() # send special email if a cron'd qa run fails case $state in - cron*) - mail -s "XFS QA status report" $ADMINEMAIL \ - < $LOG 2>&1 + cron*) + mail -s "XFS QA status report" $ADMINEMAIL \ + < $LOG 2>&1 ;; esac @@ -75,19 +75,19 @@ _fail() _get_kernel_version() { [ -x "$WORKAREA" ] \ - || _fail "can't access workarea $WORKAREA" + || _fail "can't access workarea $WORKAREA" [ -r "$WORKAREA/linux/Makefile" ] \ - || _fail "can't read makefile $WORKAREA/linux/Makefile" + || _fail "can't read makefile $WORKAREA/linux/Makefile" eval `awk ' - BEGIN { FS = "[ \t=]+" } - /^VERSION =/ { a=$2 } - /^PATCHLEVEL =/ { b=$2 } - /^SUBLEVEL =/ { c=$2 } - /^EXTRAVERSION =/ { d=$2 } + BEGIN { FS = "[ \t=]+" } + /^VERSION =/ { a=$2 } + /^PATCHLEVEL =/ { b=$2 } + /^SUBLEVEL =/ { c=$2 } + /^EXTRAVERSION =/ { d=$2 } END { print "VERSION=" a "." b "." c d " ; SVERSION=" a "." b "." c - } + } ' < $WORKAREA/linux/Makefile` } @@ -117,15 +117,15 @@ LOG="$ROOT/qa.log" case $HOST in bruce) - EMAIL="nathans@larry" - ADMINEMAIL="nathans@larry" - MODULAR=0 - ;; + EMAIL="nathans@larry" + ADMINEMAIL="nathans@larry" + MODULAR=0 + ;; sagan) - EMAIL="tes@larry" - ADMINEMAIL="tes@larry" - MODULAR=1 - ;; + EMAIL="tes@larry" + ADMINEMAIL="tes@larry" + MODULAR=1 + ;; troppo) EMAIL="kaos@larry" ADMINEMAIL="kaos@larry" @@ -137,8 +137,8 @@ in MODULAR=0 ;; *) - _fail "auto-qa: no configuration information for host '$HOST'" - ;; + _fail "auto-qa: no configuration information for host '$HOST'" + ;; esac # do some cleanup on exit @@ -149,8 +149,8 @@ _cleanup() umount $TEST_DEV &> /dev/null if [ "$started" = 1 ] then - echo "auto-qa stopped" | wall - started=0 + echo "auto-qa stopped" | wall + started=0 fi } status=1 @@ -181,20 +181,20 @@ _change_state() case $state in - *-*) - case $new - in - *-*) - _set_state $new - ;; - *) - _set_state `echo $state | sed "s/-.*$/-$new/"` - ;; - esac - ;; - *) - _set_state $new - ;; + *-*) + case $new + in + *-*) + _set_state $new + ;; + *) + _set_state `echo $state | sed "s/-.*$/-$new/"` + ;; + esac + ;; + *) + _set_state $new + ;; esac } @@ -223,27 +223,27 @@ _update_autoqa_file() _update_workarea() { if [ -z "$CVSROOT" ]; then - _log " *** p_tupdate" + _log " *** p_tupdate" cd $WORKAREA p_tupdate 2>&1 \ - || _fail " !!! p_tupdate failed" + || _fail " !!! p_tupdate failed" - _log " *** p_check/p_purge" + _log " *** p_check/p_purge" cd $WORKAREA 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 p_list -c 2>&1 \ - || _fail " !!! p_list failed" + || _fail " !!! p_list failed" else - _log " *** cvs update" + _log " *** cvs update" cd $WORKAREA cvs -z3 update -d fi } - + _log "*** linux-xfs QA (`date`)" @@ -253,23 +253,23 @@ _get_state case $1 in cron-init) - case $state - in - *done) - ;; - *) - _fail " !!! cron-init while not in \"*done\" state" - ;; - esac - ;; + case $state + in + *done) + ;; + *) + _fail " !!! cron-init while not in \"*done\" state" + ;; + esac + ;; cron-restarted) - # we don't auto restart after reboot, but cron the restart - # to happen a bit later - it's much easier and safer that way - if [ "$state" != "cron-restarted" ] - then - _fail " !!! cron-restarted while not in \"cron-restarted\" state" - fi - ;; + # we don't auto restart after reboot, but cron the restart + # to happen a bit later - it's much easier and safer that way + if [ "$state" != "cron-restarted" ] + then + _fail " !!! cron-restarted while not in \"cron-restarted\" state" + fi + ;; esac if [ "$1" != "" ] @@ -298,257 +298,256 @@ do _get_state _log " *** state $state start (`date`)" - _log " (user=$USER, host=$HOST)" + _log " (user=$USER, host=$HOST)" new_state="" case $state in - *init) - echo "" > $ROOT/qa.log - echo "" > $ROOT/qa.full - _log "******************************************************" - _log "QA init $VERSION (`date`)" - _log "******************************************************" + *init) + echo "" > $ROOT/qa.log + echo "" > $ROOT/qa.full + _log "******************************************************" + _log "QA init $VERSION (`date`)" + _log "******************************************************" _log "--- kernel ($IMAGE)" _log "--- modules ($MODULES)" - _change_state "inited" - _update_autoqa_file - ;; - - *inited) - _log " *** QA initialized" - new_state="update" - ;; - - *update) - _update_workarea - new_state="clean" - ;; - - *clean) - # we need to configure or else we might fail to clean - for pkg in attr acl xfsprogs dmapi xfsdump xfstests + _change_state "inited" + _update_autoqa_file + ;; + + *inited) + _log " *** QA initialized" + new_state="update" + ;; + + *update) + _update_workarea + new_state="clean" + ;; + + *clean) + # we need to configure or else we might fail to clean + for pkg in attr acl xfsprogs dmapi xfsdump xfstests + do + cd $WORKAREA/cmd/$pkg + _log " *** clean $pkg tools" + make realclean 2>&1 \ + || _fail " !!! clean $pkg failed" + done + + _log " *** clean linux" + cd $WORKAREA/linux + make mrproper 2>&1 \ + || _fail " !!! clean linux failed" + + _log " *** install configuration file" + cp -f $CONFIG $WORKAREA/linux/.config 2>&1 \ + || _fail " !!! failed to install config" + + _log " *** remove version file" + rm -f include/linux/version.h 2>&1 \ + || _fail " !!! failed to clean version" + + new_state="reconfig" + ;; + + *reconfig) + + _log " *** reconfig kernel" + + _change_state "clean" ; # we better start from scratch if this fails + + cd $WORKAREA/linux + # 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" | \ + make EXTRAVERSION=$EXTRA oldconfig 2>&1 \ + || _fail " !!! reconfig oldconfig failed" + make EXTRAVERSION=$EXTRA dep 2>&1 \ + || _fail " !!! reconfig dep failed" + + new_state="buildtools" + ;; + + *buildtools) + _log " *** build and install tools" + for pkg in attr acl xfsprogs dmapi xfsdump xfstests do - cd $WORKAREA/cmd/$pkg - _log " *** clean $pkg tools" - make realclean 2>&1 \ - || _fail " !!! clean $pkg failed" - done - - _log " *** clean linux" - cd $WORKAREA/linux - make mrproper 2>&1 \ - || _fail " !!! clean linux failed" - - _log " *** install configuration file" - cp -f $CONFIG $WORKAREA/linux/.config 2>&1 \ - || _fail " !!! failed to install config" - - _log " *** remove version file" - rm -f include/linux/version.h 2>&1 \ - || _fail " !!! failed to clean version" - - new_state="reconfig" - ;; - - *reconfig) - - _log " *** reconfig kernel" - - _change_state "clean" ; # we better start from scratch if this fails - - cd $WORKAREA/linux - # 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" | \ - make EXTRAVERSION=$EXTRA oldconfig 2>&1 \ - || _fail " !!! reconfig oldconfig failed" - make EXTRAVERSION=$EXTRA dep 2>&1 \ - || _fail " !!! reconfig dep failed" - - new_state="buildtools" - ;; - - *buildtools) - _log " *** build and install tools" - for pkg in attr acl xfsprogs dmapi xfsdump xfstests - do - cd $WORKAREA/cmd/$pkg - - # use e-fence - but this will only take effect on configure - export MALLOCLIB=/usr/lib/libefence.a - make configure 2>&1 \ - || _fail " !!! configure $pkg failed" - make default 2>&1 \ - || _fail " !!! build $pkg failed" - - _sudo make install install-dev 2>&1 \ - || _fail " !!! install $pkg failed" + cd $WORKAREA/cmd/$pkg + + # use e-fence - but this will only take effect on configure + export MALLOCLIB=/usr/lib/libefence.a + make configure 2>&1 \ + || _fail " !!! configure $pkg failed" + make default 2>&1 \ + || _fail " !!! build $pkg failed" + + _sudo make install install-dev 2>&1 \ + || _fail " !!! install $pkg failed" # attr and acl now have install-lib targets as well [ "$pkg" == "attr" -o "$pkg" == "acl" ] || continue _sudo make install-lib 2>&1 \ - || _fail " !!! install $pkg failed" - done - - new_state="buildkernel" - ;; - - *buildkernel) - _log " *** build kernel" - - _change_state "clean" ; # we better start from scratch if this fails - - cd $WORKAREA/linux - make -j4 EXTRAVERSION=$EXTRA bzImage modules 2>&1 \ - || _fail " !!! build bzImage/modules failed" - new_state="install" - ;; - - *install) - _log " *** blat old modules" - - _sudo rm -rf $MODULES - - _log " *** install kernel" - cd $WORKAREA/linux - _sudo cp -f $WORKAREA/linux/arch/i386/boot/bzImage $IMAGE 2>&1 \ - || _fail " !!! install kernel failed" - _sudo cp -f $WORKAREA/linux/System.map $SYSTEMMAP 2>&1 \ - || _fail " !!! install kernel failed" - _sudo make EXTRAVERSION=$EXTRA modules_install 2>&1 \ - || _fail " !!! install modules failed" - - _log " *** reinit lilo" - _sudo /sbin/lilo 2>&1 \ - || _fail " !!! reinit lilo failed" - new_state="restart" - ;; - - *restart) - _log " *** select qa kernel" - _sudo /sbin/lilo -R linux-xfs-qa 2>&1 \ - || _fail " !!! lilo failed" - - _log " *** prepare to restart" - _change_state "restarted" - - _log " *** restarting" + || _fail " !!! install $pkg failed" + done + + new_state="buildkernel" + ;; + + *buildkernel) + _log " *** build kernel" + + _change_state "clean" ; # we better start from scratch if this fails + + cd $WORKAREA/linux + make -j4 EXTRAVERSION=$EXTRA bzImage modules 2>&1 \ + || _fail " !!! build bzImage/modules failed" + new_state="install" + ;; + + *install) + _log " *** blat old modules" + + _sudo rm -rf $MODULES + + _log " *** install kernel" + cd $WORKAREA/linux + _sudo cp -f $WORKAREA/linux/arch/i386/boot/bzImage $IMAGE 2>&1 \ + || _fail " !!! install kernel failed" + _sudo cp -f $WORKAREA/linux/System.map $SYSTEMMAP 2>&1 \ + || _fail " !!! install kernel failed" + _sudo make EXTRAVERSION=$EXTRA modules_install 2>&1 \ + || _fail " !!! install modules failed" + + _log " *** reinit lilo" + _sudo /sbin/lilo 2>&1 \ + || _fail " !!! reinit lilo failed" + new_state="restart" + ;; + + *restart) + _log " *** select qa kernel" + _sudo /sbin/lilo -R linux-xfs-qa 2>&1 \ + || _fail " !!! lilo failed" + + _log " *** prepare to restart" + _change_state "restarted" + + _log " *** restarting" _restart # doesn't return - ;; - - *restarted) - _log " *** QA reentered after restart" - - new_state="check" - ;; - - *check) - uname=`uname -ar` - _log " *** uname $uname" - _log " *** user tools" - ls -l /sbin/*xfs* /usr/sbin/*xfs* 2>&1 - _log " *** kernel" - ls -l /boot/*$EXTRA* 2>&1 - _log " *** kernel modules" - ls -l /lib/modules/$SVERSION$EXTRA/kernel/fs/xfs/* \ - /lib/modules/$SVERSION$EXTRA/kernel/fs/xfs_support/* - - if [ "$MODULAR" -eq 0 ] - then - new_state="reset" - else - new_state="probe" - fi - ;; - - *probe) - _log " *** modules dependencies" - - _sudo depmod -a 2>&1 \ - || _fail " !!! failed to depmod -a" - - _log " *** unmounting XFS mounts" - - _sudo umount -a -t xfs 2>&1 - - _log " *** removing modules" - - for m in xfsidbg xfs kdbm_pg kdbm_vm - do - _sudo rmmod $m 2> /dev/null - done - - _log " *** installing modules" + ;; + + *restarted) + _log " *** QA reentered after restart" + + new_state="check" + ;; + + *check) + uname=`uname -ar` + _log " *** uname $uname" + _log " *** user tools" + ls -l /sbin/*xfs* /usr/sbin/*xfs* 2>&1 + _log " *** kernel" + ls -l /boot/*$EXTRA* 2>&1 + _log " *** kernel modules" + ls -l /lib/modules/$SVERSION$EXTRA/kernel/fs/xfs/* + + if [ "$MODULAR" -eq 0 ] + then + new_state="reset" + else + new_state="probe" + fi + ;; + + *probe) + _log " *** modules dependencies" + + _sudo depmod -a 2>&1 \ + || _fail " !!! failed to depmod -a" + + _log " *** unmounting XFS mounts" + + _sudo umount -a -t xfs 2>&1 + + _log " *** removing modules" + + for m in xfsidbg xfs kdbm_pg kdbm_vm + do + _sudo rmmod $m 2> /dev/null + done + + _log " *** installing modules" _sudo modprobe xfs 2>&1 \ - || _fail " !!! failed to modprobe xfs" - - new_state="reset" - ;; - - *reset) - - _log " *** unmounting TEST_DEV" - - _sudo umount $TEST_DEV 2>&1 - - _log " *** unmounting SCRATCH_DEV" - - _sudo umount $SCRATCH_DEV 2>&1 - - _log " *** clean TEST_DEV" - - _sudo mkfs -t xfs -f $MKFS_OPTIONS $TEST_DEV 2>&1 \ - || _fail " !!! failed to mkfs TEST_DEV" - - _log " *** mounting TEST_DEV" - - _sudo mount -t xfs $TEST_DEV $TEST_DIR 2>&1 \ - || _fail " !!! failed to mount" - - new_state="run" - ;; - - - soak-run) - cd $QADIR - - _log " *** run soak test" - _sudo ./soak $SOAK_PASSES $SOAK_STRESS $SOAK_PROC\ - || _fail " !!! failed to run soak test" - - new_state="done" - ;; - - *run) - cd $QADIR - - _log " *** run tests" - _sudo ./check -l -g auto 2>&1 | tee $ROOT/qa.out - - _log "" - _log " *** send status mail" - mail -s "XFS QA status report" $EMAIL < $ROOT/qa.out 2>&1 - - new_state="done" - ;; - - *done) - _log "*** QA run complete" - - _success - ;; - - *nothing) - new_state="done" - _log " *** do nothing" - ;; - - *) - _fail " !!! unknown state $state" - ;; + || _fail " !!! failed to modprobe xfs" + + new_state="reset" + ;; + + *reset) + + _log " *** unmounting TEST_DEV" + + _sudo umount $TEST_DEV 2>&1 + + _log " *** unmounting SCRATCH_DEV" + + _sudo umount $SCRATCH_DEV 2>&1 + + _log " *** clean TEST_DEV" + + _sudo mkfs -t xfs -f $MKFS_OPTIONS $TEST_DEV 2>&1 \ + || _fail " !!! failed to mkfs TEST_DEV" + + _log " *** mounting TEST_DEV" + + _sudo mount -t xfs $TEST_DEV $TEST_DIR 2>&1 \ + || _fail " !!! failed to mount" + + new_state="run" + ;; + + + soak-run) + cd $QADIR + + _log " *** run soak test" + _sudo ./soak $SOAK_PASSES $SOAK_STRESS $SOAK_PROC\ + || _fail " !!! failed to run soak test" + + new_state="done" + ;; + + *run) + cd $QADIR + + _log " *** run tests" + _sudo ./check -l -g auto 2>&1 | tee $ROOT/qa.out + + _log "" + _log " *** send status mail" + mail -s "XFS QA status report" $EMAIL < $ROOT/qa.out 2>&1 + + new_state="done" + ;; + + *done) + _log "*** QA run complete" + + _success + ;; + + *nothing) + new_state="done" + _log " *** do nothing" + ;; + + *) + _fail " !!! unknown state $state" + ;; esac _log " *** state $state done (`date`)" diff --git a/tools/srcdiff b/tools/srcdiff index 31d421fbb..c22dfb5e5 100755 --- a/tools/srcdiff +++ b/tools/srcdiff @@ -87,7 +87,7 @@ straightdiff 'xfs_cred.h', 'cmd/xfsprogs/include', 'linux/fs/xfs/linux'; straightdiff 'xfs_fs.h', 'cmd/xfsprogs/include', 'linux/include/linux'; straightdiff 'dmapi_kern.h', 'cmd/dmapi/include', 'linux/include/linux'; straightdiff 'dmapi.h', 'cmd/dmapi/include', 'linux/include/linux'; -straightdiff 'arch.h', 'cmd/xfsprogs/include', 'linux/include/linux/xfs_support'; +straightdiff 'arch.h', 'cmd/xfsprogs/include', 'linux/include/linux/xfs/support'; straightdiff 'xqm.h', 'cmd/xfsprogs/include', 'linux/include/linux'; #