Skip to contentSkip to conversation

fstests: remove old SGI QE scripts

PATCH In review Dave Chinner 3 participants 8 messages Mar 6, 2025 – Mar 7, 2025

lore
Share & tools
lore
#0 lore raw

cover fstests: remove old SGI QE scripts

Hi folks,

The scripts this patchset removes are historical relics. They haven't been maintained, in many cases they don't work, and in a couple fo cases they are reliant on test machines that SGI decomissioned almost two decades ago.

There is no point in trying to maintain these scripts, but they still create dependencies on common fstests code that is now getting in the way of making changes to fstests infrastructure.

Hence we should simply remove them and get rid of all the technical debt they contain with them.

-Dave.

#1 lore raw

PATCH 1/5 fstests: remove setup script

From: Dave Chinner <[email protected]>

THere is a script that will echo the current setup of the fstests directory. This is largely the same output as running 'check -n' to do a dry-run outputs. Hence this script is redundant, not likely to be widely used and is easily replaced with check itself. Remove it.

---
 setup | 81 -----------------------------------------------------------
 1 file changed, 81 deletions(-)
 delete mode 100755 setup
setup deleted +0 -81
deleted file mode 100755
index 375a54c98..000000000
@@ -1,81 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2003-2004 Silicon Graphics, Inc.  All Rights Reserved.
-#
-usage()
-{
-
-	echo "Usage: $0 [options]"'
-
-	-s section	run only specified section(s) from config file
-	-S section	exclude the specified section from the config file
-'
-	exit 0
-}
-
-while [ $# -gt 0 ]; do
-	case "$1" in
-	-\? | -h | --help) usage ;;
-	-s)	RUN_SECTION="$RUN_SECTION $2"; shift ;;
-	-S)	EXCLUDE_SECTION="$EXCLUDE_SECTION $2"; shift ;;
-	*)	usage ;;
-	esac
-	shift
-done
-
-if ! . ./common/config
-then
-    echo "check: failed to source common/config"
-    exit 1
-fi
-
-for section in $HOST_OPTIONS_SECTIONS; do
-	OLD_FSTYP=$FSTYP
-	OLD_MOUNT_OPTIONS=$MOUNT_OPTIONS
-	get_next_config $section
-
-	# Do we need to run only some sections ?
-	if [ ! -z "$RUN_SECTION" ]; then
-		skip=true
-		for s in $RUN_SECTION; do
-			if [ $section == $s ]; then
-				skip=false
-				break;
-			fi
-		done
-		if $skip; then
-			continue
-		fi
-	fi
-
-	# Did this section get excluded?
-	if [ ! -z "$EXCLUDE_SECTION" ]; then
-		skip=false
-		for s in $EXCLUDE_SECTION; do
-			if [ $section == $s ]; then
-				skip=true
-				break;
-			fi
-		done
-		if $skip; then
-			continue
-		fi
-	fi
-
-	[ "$USE_EXTERNAL"    = yes ] || USE_EXTERNAL=no
-	[ "$USE_LBD_PATCH"   = yes ] || USE_LBD_PATCH=no
-	[ "$LARGE_SCRATCH_DEV"  = yes ] || LARGE_SCRATCH_DEV=no
-	[ "$USE_ATTR_SECURE" = yes ] || USE_ATTR_SECURE=no
-	[ -z "$FSTYP" ] && FSTYP="xfs"
-
-	cat <<EOF
-SECTION       -- $section
-
-TEST: DIR=$TEST_DIR DEV=$TEST_DEV rt=[$TEST_RTDEV] log=[$TEST_LOGDEV]
-TAPE: dev=[$TAPE_DEV] rmt=[$RMT_TAPE_DEV] rmtirix=[$RMT_TAPE_USER@$RMT_IRIXTAPE_DEV]
-SCRATCH: MNT=$SCRATCH_MNT DEV=$SCRATCH_DEV rt=[$SCRATCH_RTDEV] log=[$SCRATCH_LOGDEV]
-VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP
-	   large_scratch_dev=$LARGE_SCRATCH_DEV attrsecure=$USE_ATTR_SECURE
---------
-EOF
-done
Signature · 1 line
2.45.2
#2 lore raw

PATCH 2/5 fstests: remove old soak script

In reply to Dave Chinner

From: Dave Chinner <[email protected]>

There is an old script for soak testing using check in the source tree called "soak". All it does is run fsstress in a loop on the scratch device, but to do that it needs to include the entire fstests config/setup scripts.

These days we have much better soak testing capabilities (e.g. the soak and stress groups, with controllable iterations, durations, load, etc) so there's no point in keeping old scripts like this around that add weird dependencies to the core infrastructure.

Remove it.

---
 soak | 121 -----------------------------------------------------------
 1 file changed, 121 deletions(-)
 delete mode 100755 soak
soak deleted +0 -121
deleted file mode 100755
index d5c4229ad..000000000
@@ -1,121 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
-#
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-tmp=/tmp/$$
-seq=soak
-status=1	# failure is the default!
-
-_cleanup()
-{
-    echo "        *** umount"
-    _scratch_unmount >/dev/null 2>&1
-}
-
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-ROOT="."
-LOG="$ROOT/soak.log"
-FULL="$ROOT/soak.full"
-
-_log()
-{
-    echo "$*" 1>&2
-    echo "$*" >>$LOG
-    echo "$*" >>$FULL
-}
-
-_logp()
-{
-    tee -a $FULL
-}
-
-_fail()
-{
-    _log "$*"
-    status=1
-    exit 1
-}
-
-_require_scratch
-
-passes=-1
-stress=100000
-proc=1
-
-if [ $# -gt 0 ]
-then
-    passes=$1
-    if [ $# -gt 1 ]
-    then
-        stress=$2
-        if [ $# -gt 2 ]
-        then
-            proc=$3
-        fi
-    fi
-fi
-
-echo "" >$FULL
-echo "" >$LOG
-_log "*** soak test started (passes=$passes, stress=$stress, proc=$proc)"
-_log "***     (`date`)"
-
-
-_log "    *** init"
-_log "        *** unmounting scratch device"
-
-_scratch_unmount 2>&1 >>$FULL
-
-_log "        *** clean scratch device"
-
-mkfs_xfs -f $SCRATCH_DEV 2>&1 >>$FULL \
-                        || _fail "            !!! failed to mkfs SCRATCH_DEV"
-
-pass=1
-
-while [ $pass -le $passes -o $passes -lt 0 ]
-do
-    _log "    *** pass $pass (`date`)"
-    
-    _log "        *** check"
-    _check_scratch_fs
-    
-    _log "        *** mounting scratch device"
-
-    if ! _scratch_mount 2>&1 | _logp
-    then
-        _fail "            !!! failed to mount"
-    fi
-                        
-    if [ $pass != 1 ]
-    then
-        _log "        *** cleanup"
-        rm -rf $SCRATCH_MNT/soak_test \
-                        || _fail "            !!! couldn't delete old dir"
-
-        _log "        *** check"
-        _check_scratch_fs
-    fi
-
-    _log "        *** mkdir"
-    mkdir $SCRATCH_MNT/soak_test \
-                        || _fail "            !!! couldn't delete old dir"
-    
-    _log "        *** stress"
-    ltp/fsstress -d $SCRATCH_MNT/soak_test -p $proc -n $stress $FSSTRESS_AVOID 2>&1 | \
-        >>$FULL
-
-    _log "        *** unmounting scratch device"
-
-    _scratch_unmount 2>&1 | _logp \
-                            || _fail "            !!! failed to umount"
-    
-    let "pass = pass + 1"
-done
-
Signature · 1 line
2.45.2
#3 lore raw

PATCH 3/5 fstests: remove crash script

In reply to Dave Chinner

From: Dave Chinner <[email protected]>

This is an old, early 2000s SGI era script for crash and recovery testing XFS filesystems. We have much better ways of doing this today with tools like dm-error, dm-flakey, etc. Nobody has been using this script for years, so remove it.

---
 crash/README     | 151 --------------
 crash/rc.sysinit |  46 -----
 crash/xfscrash   | 506 -----------------------------------------------
 3 files changed, 703 deletions(-)
 delete mode 100644 crash/README
 delete mode 100644 crash/rc.sysinit
 delete mode 100755 crash/xfscrash
crash/README deleted +0 -151
deleted file mode 100644
index 36f2ec65e..000000000
@@ -1,151 +0,0 @@
-############
-# xfscrash #  crash testing setup for XFS
-############
-
-*** disclaimers ***
-
-    work-in-progress, buyer-beware, your-mileage-may-vary, this-is-a-hack
-
-*** what xfscrash does ***
-
-    xfscrash allows realistic testing of XFS log recovery and XFS check/repair
-    by generating log activity on an XFS partition, then rebooting the machine
-    at a random point. When the machine comes back up, xfscrash is restarted
-    and then tests either the log recovery or xfs_repair on the dirtied
-    filesystem. All going well the process continues.
-
-*** getting ready for crash testing ***
-
-    Most filesystems (ext2 included) can't withstand having the machine
-    they're running on rebooted while they're active. So the crash test
-    machine needs to have all filesystems other than the test FS mounted
-    read-only so they won't get trashed when the machine reboots.
-
-*** mouting FSes read-only ***
-
-    Following is a recipe for making a redhat linux (6.2) machine with a single
-    ext2 FS mounted on root able to be booted read-only. Your Mileage May
-    Vary - don't try this on an important machine.
-
-    The idea is to move anything that needs to be r/w into the /initrd_init
-    directory, replacing the moved directories with links to the moved ones.
-    That way the /initrd_init directory may be copied to a ramdisk, and
-    mounted over /initrd on the root FS which never gets remounted r/w.
-
-        # go to single user
-        init 1
-
-        # make a mount point for the ramdisk
-        mkdir /initrd
-
-        # link across to the /initrd_init directory for when 
-        # the ramdisk isn't mounted
-        ln -s /initrd_init/dev .
-        ln -s /initrd_init/etc .
-        ln -s /initrd_init/proc .
-        ln -s /initrd_init/sbin .
-        ln -s /initrd_init/tmp .
-        ln -s /initrd_init/var .
-
-        # make the /initrd_init directory
-        mkdir /initrd_init
-        cd /initrd_init
-
-
-        # move /dev
-        mv /dev .
-        ln -s /dev /initrd/dev
-
-        # move /etc
-        mv /etc .
-        ln -s /etc /initrd/etc
-
-        # make proc mount
-        mkdir proc 
-
-        # move /tmp
-        mkdir tmp
-        rm -rf /tmp
-        ln -s /tmp /initrd/tmp
-
-        # link /sbin 
-        ln -s /sbin .
-
-        # setup a tree for parts of /var
-        mkdir var var/cache var/lock var/lock/console var/lock/subsys
-        mkdir var/log var/preserve var/run 
-
-        touch /var/run/utmp /var/log/utmp /var/log/wtmp 
-
-        # move parts of /var
-        rm -rf /var/cache /var/lock /var/log /var/preserve /var/run
-        ln -s /initrd/var/cache /var/cache
-        ln -s /initrd/var/lock /var/lock
-        ln -s /initrd/var/log /var/log
-        ln -s /initrd/var/preserve /var/preserve
-        ln -s /initrd/var/run /var/run
-
-        # make a mount for /var/shm
-        mkdir var/shm 
-        ln -s /var/shm /initrd/var/shm
-
-        # move /var/spool
-        mkdir var/spool
-        mkdir var/spool/mail var/spool/anacron var/spool/at var/spool/lpd
-        mkdir var/spool/rwho var/spool/mqueue var/spool/cron
-        rm -rf /var/spool
-        ln -s /var/spool /initrd/var/spool
-
-        # move /var/tmp
-        mkdir var/tmp
-        rm -rf /var/tmp
-        ln -s /var/tmp /initrd/var/tmp
-
-        # trim /dev - too many inodes here - remove anything you don't need
-        # (small ramdisk has a small number of inodes)
-        rm -rf /initrd/dev/<....>   
-
-    All going well, all the directories you've made should link through
-    /initrd and into /initrd_init, and the machine should come back up
-    if you restart it.
-
-    You want to keep the contents of /initrd_init to a minimum because
-    this stuff has to fit into the ramdisk.
-
-*** getting the ramdisk going ***
-
-    See the rc.sysinit file for some details of what to do to get the
-    ro-root/ramdisk up and running.
-
-    Once everything is going, the root FS should never be remounted to
-    r/w on boot and should be in r/o mode when the machine comes up.
-    
-    All going well, any open files have been redirected through the
-    symlinks onto the ramdisk, so you should be able to remount the
-    root FS to r/w and then remount it back to r/o.
-    
-    Since there's no r/w filesystems mounted, it should be ok to 
-    reboot the machine with 'reboot -fn' and everything should come
-    back without dirty filesystems and without having to fsck.
-    
-*** starting xfscrash ***
-
-    The simplest way to restart xfscrash on reboot is to start it
-    in the background from rc.local. The script logs to /dev/tty1,
-    /dev/console & a logfile by default, so the output should be
-    easy to find.
-    
-    Link the xfscrash directory off an NFS mounted FS so you can make
-    changes while the machine is rebooting and so you can touch the
-    'stop' and 'start' control files.
-
-    To configure the system, change the parameters in the configuration
-    section of the 'xfscrash' script.
-    
-    To start the system, touch the 'start' control file and then either
-    reboot or manually run the 'xfscrash' script.
-    
-    To stop the system, touch the 'stop' control file and wait for the
-    next cycle to start when the control file will be checked and
-    the test terminated.
-
crash/rc.sysinit deleted +0 -46

46 lines not on this page · raw message

crash/xfscrash deleted +0 -506

506 lines not on this page · raw message

Signature · 1 line
2.45.2
#4 lore raw

PATCH 4/5 fstests: remove tools/auto-qa

In reply to Dave Chinner

From: Dave Chinner <[email protected]>

This is a 2000s era SGI test script that no-one uses anymore. It likely doesn't even work because it is dependent on CVS and/or the SGI proprietary ptools revision control system for source control. Hence it clearly hasn't been used for years, so remove it.

---
 tools/auto-qa | 568 --------------------------------------------------
 1 file changed, 568 deletions(-)
 delete mode 100755 tools/auto-qa
tools/auto-qa deleted +0 -568
deleted file mode 100755
index 1beb28359..000000000
@@ -1,568 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# automatic qa system. 31/08/00 [email protected]
-#
-# Usage: auto_qa start-state [stop-state]
-# Do auto_qa from start-state up to stop-state inclusive
-# or if no stop-state given then do it until reach "done" state.
-#
-
-_log()
-{
-    echo "$*" >&2
-    echo "$*" >> $LOG
-    sync
-}
-
-_fail()
-{
-    if [ "$started" = "1" ] 
-    then
-	echo "auto-qa stopped" | wall
-	started=0
-    fi
-
-    _log "$*"
-    
-    # send special email if a cron'd qa run fails
-    case $state
-    in
-	cron*)
-	    mail -s "XFS QA status report" $EMAIL < $LOG 2>&1
-	;;
-    esac
-
-    status=1
-    exit 1
-}
-
-_get_kernel_version()
-{
-    [ -x "$KWORKAREA" ] || return
-    [ -r "$KWORKAREA/Makefile" ] \
-	|| _fail "can't read kernel makefile $KWORKAREA/Makefile"
-
-    eval `awk '
-	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
-	}
-   ' < $KWORKAREA/Makefile`
-}
-
-# this should be constant
-
-ROOT="$HOME/qa"
-HOST=`hostname -s`
-if [ ! -z "$CVSROOT" ]; then
-    export WORKAREA="$ROOT/xfs-cmds"
-else
-    [ -z "$WORKAREA" ] && export WORKAREA="$ROOT/xfs-cmds"
-fi
-
-
-export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin/ptools:/usr/local/bin"
-STATE=$ROOT/qa.state
-QADIR="$WORKAREA/xfstests"
-SUDO="su -c"
-CONFIG="$ROOT/$HOST.config"
-COMMON_CONFIG="$QADIR/common/config"
-SH="/bin/sh"
-LOG="$ROOT/qa.log"
-
-# do some cleanup on exit
-
-_cleanup()
-{
-    umount $SCRATCH_DEV &> /dev/null
-    umount $TEST_DEV &> /dev/null
-    if [ "$started" = 1 ]
-    then
-	echo "auto-qa stopped" | wall
-	started=0
-    fi
-}
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# clean exit
-
-_success()
-{
-    status=0
-    exit 0
-}
-
-_get_state()
-{
-    state=`cat $STATE`
-}
-
-_set_state()
-{
-    echo $1 > $STATE
-    _get_state
-}
-
-_change_state()
-{
-    new=$1
-
-    # if have state XXXX-state then preserve XXXX-newstate
-    
-    case $state
-    in
-	*-*)
-	    case $new
-	    in
-		*-*)
-		    _set_state $new
-		    ;;
-		*)
-		    _set_state `echo $state | sed "s/-.*$/-$new/"`
-		    ;;
-	    esac
-	    ;;
-	*)
-	    _set_state $new
-	    ;;
-    esac
-}
-
-_sudo()
-{
-    $ROOT/su -c "$*" < /dev/null ;# HACK - we need a hacked su at the mo
-}
-
-_restart()
-{
-    exec $ROOT/su -c "(shutdown -r now \"auto-qa rebooting\" )&" < /dev/null
-}
-
-_update_workarea()
-{
-    if [ -z "$CVSROOT" ]; then
-	_log "	*** p_tupdate"
-	cd "$1"
-	WORKAREA="$1" p_tupdate 2>&1 \
-			|| _fail "	    !!! p_tupdate failed"
-
-	_log "	*** non-trunk files"
-	cd "$1"
-	WORKAREA="$1" p_list -c 2>&1 \
-			|| _fail "	    !!! p_list failed"
-    else
-	_log "	*** cvs update"
-	cd "$1"
-	cvs -z3 update -d
-    fi
-}
-
-_test_mkfs_xfs()
-{
-    TEST_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -rrtdev=$TEST_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -llogdev=$TEST_LOGDEV"
-    _sudo /sbin/mkfs.xfs -f $TEST_OPTIONS $MKFS_OPTIONS $* $TEST_DEV
-    mkfs_status=$?
-    if [ "$USE_BIG_LOOPFS" = yes ]; then
-        [ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
-        _sudo $QADIR/tools/ag-wipe -q -r $RETAIN_AG_BYTES $TEST_DEV
-    fi
-    return $mkfs_status
-}
-
-_test_mount()
-{
-    TEST_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
-    _sudo mount -t xfs $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
-}
-
-_i386_install()
-{
-    _sudo cp -f "$KWORKAREA/arch/i386/boot/bzImage" "$IMAGE" 2>&1 \
-		|| _fail "	    !!! install kernel failed"
-    _sudo cp -f "$KWORKAREA/System.map" "$SYSTEMMAP" 2>&1 \
-		|| _fail "	    !!! install kernel failed"
-    if [ -z "$KMODULES" -o "$KMODULES" = yes ]; then
-	_sudo make EXTRAVERSION=-$EXTRA modules_install 2>&1 \
-		|| _fail "	    !!! install modules failed"
-    fi
-
-
-    if [ -z "$KINSTALL" -o "$KINSTALL" = lilo ]; then
-	_log "	*** reinit lilo"
-	_sudo /sbin/lilo 2>&1 \
-		|| _fail "	    !!! reinit lilo failed"
-    fi
-}
-
-_i386_restart()
-{
-    if [ -z "$KINSTALL" -o "$KINSTALL" = lilo ]; then
-	_sudo /sbin/lilo -R $EXTRA $KERNEL_OPTIONS 2>&1 \
-		|| _fail "	    !!! lilo failed"
-    fi
-}
-
-_ia64_install()
-{
-    echo not yet implemented
-}
-
-_ia64_restart()
-{
-    echo not yet implemented
-}
-
-_check_kernel()
-{
-    [ -d "$KWORKAREA" ]	|| _fail "    !!! QA kernel workarea \"$KWORKAREA\" not found"
-    [ -r "$CONFIG" ]	|| _fail "    !!! Can't read config file $CONFIG"
-}
-
-
-_log "*** XFS QA (`date`)"
-
-_get_state
-
-# check preconditions for starting state
-case $1
-in
-    cron-init)
-	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
-	;;
-esac
-
-[ -n "$1" ] && _set_state $1
-[ -n "$2" ] && stop_state=$2
-
-[ "$UID" -eq 0 ]	&& _fail "    !!! QA most be run as a normal user"
-[ -d "$ROOT" ]		|| _fail "    !!! QA root \"$ROOT\" not found"
-[ -d "$WORKAREA" ]	|| _fail "    !!! QA workarea \"$WORKAREA\" not found"
-cd $QADIR
-. "$COMMON_CONFIG" 	|| _fail "    !!! Couldn't source $COMMON_CONFIG"
-
-_get_kernel_version
-IMAGE="$BOOT/vmlinuz-$EXTRA"
-SYSTEMMAP="$BOOT/System.map-$VERSION-$EXTRA"
-MODULES="/lib/modules/$SVERSION"
-
-cd $ROOT
-
-started=1
-echo "auto-qa started" | wall
-
-while true
-do
-    _get_state
-
-    _log "    *** state $state start (`date`)"
-    _log "	(user=$USER, host=$HOST)"
-    new_state=""
-
-    start_state=$state
-
-    case $state
-    in
-	*init)
-	    echo "" > $ROOT/qa.log
-	    echo "" > $ROOT/qa.full
-	    _log "******************************************************"
-	    _log "QA init $VERSION (`date`)"
-	    _log "******************************************************"
-	    new_state="updatetools"
-	    ;;
-	
-	*updatetools)
-	    _update_workarea "$WORKAREA"
-	    new_state="cleantools"
-	    ;;
-
-	*cleantools)
-	    # we need to configure or else we might fail to clean
-	    for pkg in attr acl xfsprogs xfsdump xfstests
-	    do
-		[ -d $WORKAREA/$pkg ] || continue
-		cd $WORKAREA/$pkg
-		_log "	*** clean $pkg tools"
-		make realclean 2>&1 \
-			|| _fail "	    !!! clean $pkg failed"
-	    done
-	    new_state="buildtools"
-	    ;;
-
-	*buildtools)
-	    _log "	*** build and install tools"
-	    for pkg in attr acl xfsprogs xfsdump xfstests 
-	    do
-		[ -d $WORKAREA/$pkg ] || continue
-		cd $WORKAREA/$pkg
-
-		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="updatekernel"
-	    ;;
-
-	*updatekernel)
-	    _check_kernel
-	    _update_workarea "$KWORKAREA"
-	    new_state="cleankernel"
-	    ;;
-
-	*cleankernel)
-	    _check_kernel
-	    _log "	*** clean kernel"
-	    cd "$KWORKAREA"
-	    make mrproper 2>&1 \
-			|| _fail "	    !!! clean kernel failed"
-
-	    _log "	*** install configuration file"
-	    cp -f $CONFIG "$KWORKAREA/.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)
-	    _check_kernel
-	    _log "	*** reconfig kernel"
-	    
-	    # we better start from scratch if this fails
-	    _change_state "cleankernel"
-	    
-	    cd "$KWORKAREA"
-	    # 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="buildkernel"
-	    ;;
-	    
-	*buildkernel)
-	    _check_kernel
-	    _log "	*** build kernel"
-	    _log "          --- kernel ($IMAGE)"
-	    [ -z "$KMODULES" -o "$KMODULES" = yes ] && \
-            _log "          --- modules ($MODULES)"
-	    
-	    _change_state "cleankernel" ; # we better start from scratch if this fails
-	    
-	    cd "$KWORKAREA"
-	    [ -z "$KTARGET" ] && KTARGET=bzImage
-	    [ -z "$KMODULES" -o "$KMODULES" = yes ] && \
-		KTARGET="$KTARGET modules"
-	    make -j4 EXTRAVERSION=-$EXTRA $KTARGET 2>&1 \
-			|| _fail "	    !!! build $KTARGET failed"
-	    new_state="install"
-	    ;;
-
-	*install)
-	    _check_kernel
-	    _log "	*** blat old modules"
-	    _sudo rm -rf $MODULES
-	    
-	    _log "	*** install kernel"
-	    cd "$KWORKAREA"
-	    case `uname -m`
-	    in
-		i386|i686)	_i386_install ;;
-		ia64)		_ia64_install ;;
-	    esac
-
-	    new_state="restart"
-	    ;;
-	    
-	*restart)
-	    _log "	    *** select qa kernel"
-	    case `uname -m`
-	    in
-		i386|i686)	_i386_restart ;;
-		ia64)		_ia64_restart ;;
-	    esac
-
-	    _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 -a`
-	    _log "	    *** uname $uname"
-
-	    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"
-	    _test_mkfs_xfs 2>&1 \
-			|| _fail "	    !!! failed to mkfs TEST_DEV"
-	    
-	    _log "	    *** mounting TEST_DEV"
-	    _test_mount 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"
-	    ;;
-	    
-	bench-run)
-	    cd $QADIR
-	    
-	    # $BENCHMARK is typically unset, which equates to "all"
-	    #
-	    _log "	    *** run benchmarks"
-	    _sudo ./bench $BENCH_PASSES `id -nu && id -ng` $BENCHMARK \
-			|| _fail "	    !!! failed to run benchmarks"
-
-	    _log ""
-	    _log "	    *** send results mail"
-	    mail -s "XFS QA benchmark results" $EMAIL < $QADIR/bench.out 2>&1
-	
-	    new_state="done"
-	    ;;
-	    
-	*run)
-	    cd $QADIR
-	    
-	    _log "	    *** run tests ($CHECK_OPTIONS)"
-	    _sudo ./check -l $CHECK_OPTIONS 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 "*** requested QA state transitions complete"
-
-	    _success
-	    ;;
-	    
-	*nothing)
-	    new_state="done"
-	    _log "    *** do nothing"
-	    ;;
-	    
-	*)
-	    _fail "	   !!! unknown state $state"
-	    ;;
-    esac
-
-    _log "    *** state $state done (`date`)"
-    [ "$new_state" = "" ] && _fail "    !!! no new state set"
-
-    if [ -n "$stop_state" ]
-    then
-        # remove hyphen prefixes
-	s1=`echo $start_state | sed 's/.*-//'`
-	s2=`echo $stop_state | sed 's/.*-//'`
-
-	if [ $s1 = $s2 ]
-	then
-	    # we have been requested to stop here and not go on
-	    new_state="done"
-	fi
-    fi
-
-    _change_state $new_state
-    
-done
Signature · 1 line
2.45.2
#5 lore raw

PATCH 5/5 fstests: remove old tools from tools directory

In reply to Dave Chinner

From: Dave Chinner <[email protected]>

ag-wipe, db-walk, fs-walk and interop are all old 2000s era SGI QA scripts that are either not usable anymore of have been superceded by much more recent functionality.

interop only runs on machines with the host named "bruce" or "whack", requires NFS mounts from a machine named "snort" and access to a specific user's home dir. I know what all these were; they were test and build machines in SGI's engineering office in Melbourne, Australia. That went away in ~2009....

ag-wipe is unused and has been superceded by multiple different sets of functionality (e.g. ./check --large-fs).

db-walk is unused by fstests and now is native xfs_db functionality.

fs-walk is dumping the md5sum and stat info of every file in a directory heirachy and only used by the interop script....

Remove them all.

---
 tools/ag-wipe | 171 ------------------------------------------------
 tools/db-walk | 178 --------------------------------------------------
 tools/fs-walk |  85 ------------------------
 tools/interop | 101 ----------------------------
 4 files changed, 535 deletions(-)
 delete mode 100755 tools/ag-wipe
 delete mode 100755 tools/db-walk
 delete mode 100755 tools/fs-walk
 delete mode 100755 tools/interop
tools/ag-wipe deleted +0 -171
deleted file mode 100755
index 52acf0f80..000000000
@@ -1,171 +0,0 @@
-#!/usr/bin/perl -w
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2003-2004 Silicon Graphics, Inc.  All Rights Reserved.
-#
-use strict;
-use IO::File;
-use Getopt::Std;
-#
-#
-# Modify a filesystem's superblock and AGF metadata structures
-# so that only a subset of the allocation groups will be used.
-# Intended use is in testing large virtual devices (eg. loop)
-# with extremely large filesystems, where we want to ensure
-# high allocation groups are used as much as possible (where
-# the block addresses are large).
-#
-
-my %opt;
-getopts('cf:l:qr:v', \%opt);
-
-die "Usage: $0 [-f AG] [-l AG] [-r bytes] [-cqv] device\n" unless (@ARGV == 1);
-my $device = shift @ARGV;
-die "$device: no such file\n" unless (-e $device);
-
-my $clearall = defined($opt{'c'}) ? 1 : 0;
-my $retain = defined($opt{'r'}) ? $opt{'r'} : -1;
-my $quiet = defined($opt{'q'}) ? 1 : 0;
-my $verbose = defined($opt{'v'}) ? 1 : 0;
-my $nagfirst = defined($opt{'f'}) ? $opt{'f'} : 0;
-my $naglast = defined($opt{'l'}) ? $opt{'l'} : 0;
-
-# 
-# "clearall" means clear everything barring the final AG.
-# "retain" means clearall and retain a specified amount in the
-# second-from-last AG as well (value is the number of bytes).
-# [NB: retain with a value of zero is now the same as clearall].
-# 
-if ($retain >= 0) {
-	$clearall = 1;
-}
-
-sub xfs_db {
-	my $xfsdb = 'xfs_db -x';
-	my %hash;
-
-	foreach (@_) {
-		$xfsdb .= ' -c ' . $_;
-	}
-	print $xfsdb, ' ', $device, "\n" if ($verbose);
-
-	die unless open(DB, "$xfsdb $device 2>/dev/null |");
-	while (<DB>) {
-		if (/^(\S+) = (.*)$/) {
-			print if ($verbose);
-			$hash{$1} = $2;
-		}
-	}
-	return %hash;
-}
-
-
-# 
-# Stage 1: Get control information from the superblock
-# 
-
-my @sbprint = ( '"print fdblocks"', '"print agcount"', '"print blocksize"' );
-my @agffree = ( '"print freeblks"' );
-
-my %sb = xfs_db 'sb', @sbprint;
-print "=== Initially ", $sb{'fdblocks'}, " blocks free across ",
-	$sb{'agcount'}, " AGs\n" unless $quiet;
-if ($clearall && ($nagfirst || $naglast)) {
-	print STDERR "  o Clearall/retain specified with first/last AG\n";
-	exit(1);
-}
-if ($nagfirst >= $sb{'agcount'}) {
-	print STDERR "  o First AG number is too large\n";
-	exit(1);
-}
-if ($naglast >= $sb{'agcount'}) {
-	print STDERR "  o Last AG number is too large\n";
-	exit(1);
-}
-if ($naglast - $nagfirst < 0) {
-	print STDERR "  o No AGs to clear\n";
-	exit(1);
-}
-if ($clearall) {
-	$naglast = $sb{'agcount'} - 2;
-	if ($retain > 0) {
-		my %check;
-
-		$naglast--;
-		$retain /= $sb{'blocksize'};	# convert to fsblocks
-		%check = xfs_db "'agf $naglast'", @agffree;
-		if ($check{'freeblks'} < $retain) {
-			print STDERR "  o Insufficient space to retain\n";
-			exit(1);
-		}
-	}
-}
-
-
-# 
-# Stage 2: Wipe out all completely masked allocation groups.
-# 
-
-my @agfprint = ( '"print freeblks"', '"print flcount"' );
-my @agfcommands = ( '"write freeblks 0"',
-			'"write longest 0"', '"write flcount 0"',
-			'"write bnolevel 1"', '"write cntlevel 1"',
-			'"write flfirst 0"', '"write fllast 0"' );
-my @bnoprint = ( '"addr bnoroot"', '"print numrecs"' );
-my @bnocommands = ( '"addr bnoroot"', '"write numrecs 0"',
-			'"write leftsib -1"', '"write rightsib -1"' );
-my @cntprint = ( '"addr cntroot"', '"print numrecs"' );
-my @cntcommands = ( '"addr cntroot"', '"write numrecs 0"',
-			'"write leftsib -1"', '"write rightsib -1"' );
-
-print "=== Wiping ", $naglast - $nagfirst + 1,
-	" AGs starting from AG #", $nagfirst, "\n" unless $quiet;
-
-my $ag = $nagfirst;
-while ($ag <= $naglast) {
-	print "  o AG#", $ag, " AGF fields\n" unless $quiet;
-
-	my %agf = xfs_db "'agf $ag'", @agfprint;
-	xfs_db "'agf $ag'", @agfcommands;
-
-	my $blockcnt = $agf{'freeblks'} + $agf{'flcount'};
-	$sb{'fdblocks'} -= $blockcnt;
-	print "     cleared ", $blockcnt, " blocks from AG#", $ag, "\n"
-		unless $quiet;
-
-	my %btree = xfs_db "'agf $ag'", @bnoprint;
-	xfs_db "'agf $ag'", @bnocommands, "'agf $ag'", @cntcommands;
-	print "     cleared ", $btree{'numrecs'}, " BNO/CNT btree recs in AG#",
-		$ag, "\n" unless $quiet;
-
-	$ag++;
-}
-
-
-# 
-# Stage 3: Wipe out any partially masked allocation group.
-# 
-
-if ($retain > 0) {
-	print "  o AG#", $ag, " AGF fields (partial)\n" unless $quiet;
-
-	my %ragf = xfs_db "'agf $ag'", '"print freeblks"',
-		'"addr bnoroot"', '"print recs[1].startblock"';
-	my $maskblks = $ragf{'freeblks'} - $retain;
-	my $newstart = $ragf{'recs[1].startblock'} + $maskblks;
-	xfs_db "'agf $ag'",
-		"'write freeblks $retain'", "'write longest $retain'",
-		"'agf $ag'", '"addr bnoroot"',
-		"'write recs[1].startblock $newstart'",
-		"'write recs[1].blockcount $retain'",
-		"'agf $ag'", '"addr cntroot"',
-		"'write recs[1].startblock $newstart'",
-		"'write recs[1].blockcount $retain'";
-
-	$sb{'fdblocks'} -= $maskblks;
-	print "     cleared ", $maskblks, " blocks from AG#", $ag, "\n"
-		unless $quiet;
-}
-
-print "=== Updating final freespace count, ", $sb{'fdblocks'}, " blocks\n"
-	unless $quiet;
-xfs_db "'sb 0'", "'write fdblocks $sb{'fdblocks'}'"
tools/db-walk deleted +0 -178

178 lines not on this page · raw message

tools/fs-walk deleted +0 -85

85 lines not on this page · raw message

tools/interop deleted +0 -101

101 lines not on this page · raw message

Signature · 1 line
2.45.2
Reviewed-by on the v1 series
#6 lore raw
In reply to Dave Chinner
Quoted 7 lines · Dave Chinner

Hi folks,

The scripts this patchset removes are historical relics. They haven't been maintained, in many cases they don't work, and in a couple fo cases they are reliant on test machines that SGI decomissioned almost two decades ago.

Quoted 6 lines

There is no point in trying to maintain these scripts, but they still create dependencies on common fstests code that is now getting in the way of making changes to fstests infrastructure.

Hence we should simply remove them and get rid of all the technical debt they contain with them.

The whole set looks good to me -- I've definitely never needed, used, or noticed the old SGI scripts.

--D

Quoted 3 lines

-Dave.

Reviewed-by on the v1 series
#7 lore raw
In reply to Dave Chinner
Quoted 7 lines · Dave Chinner

Hi folks,

The scripts this patchset removes are historical relics. They haven't been maintained, in many cases they don't work, and in a couple fo cases they are reliant on test machines that SGI decomissioned almost two decades ago.

Quoted 6 lines

There is no point in trying to maintain these scripts, but they still create dependencies on common fstests code that is now getting in the way of making changes to fstests infrastructure.

Hence we should simply remove them and get rid of all the technical debt they contain with them.

For the series:

Thanks