3 # Copyright (c) 2001 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 $PATH="$PATH:/usr/local/bin/ptools:/sbin:/usr/sbin";
24 if ("$HOST" eq "bruce") {
25 $TOOLS="/home/dxm/isms/slinx-xfs/cmd/xfs/tools";
26 $SCRATCH_DEV="/dev/sdf1";
27 $SCRATCH_MNT="/mnt/xfs3";
28 $MKFS="/sbin/mkfs -t xfs -f";
29 $SUDO="/home/dxm/su -c";
30 $MOUNT="/bin/mount -t xfs";
31 $UMOUNT="/bin/umount";
33 } elsif ("$HOST" eq "whack") {
34 $TOOLS="/hosts/snort/build1/people/dxm/isms/slinx-xfs/cmd/xfs/tools";
35 $SCRATCH_DEV="/dev/dsk/20000080e5114459/lun2s0/c2p1";
39 $MOUNT="/sbin/mount -t xfs";
40 $UMOUNT="/sbin/umount";
43 die "unconfigured host \"$HOST\"\n"
55 || die "ERROR \"" . join(" ",@_) . "\" returned error\n";
58 sub run_expect_fail(@)
61 && die "ERROR \"" . join(" ",@_) . "\" returned non-error\n";
66 run_no_check("umount $SCRATCH_DEV");
71 run("umount $SCRATCH_DEV");
77 run("mount -t xfs $ops $SCRATCH_DEV $SCRATCH_MNT");
80 chomp($HOST=`hostname -s`);
82 die "usage: $ARGV0 <operation> [parameters]\n" unless (scalar(@ARGV));
83 print "*** $HOST: Interop started\n";
84 print " *** ", join(" ", @ARGV), "\n";
94 run("mkfs -t xfs $MKFS_EXTRA $SCRATCH_DEV");
96 } elsif ($op eq "test") {
98 run("xfs_repair -n $SCRATCH_DEV");
100 } elsif ($op eq "easy") {
104 mkdir("$SCRATCH_MNT/fish",0777);
106 } elsif ($op eq "check") {
109 system("cd $SCRATCH_MNT ; $TOOLS/fs-walk .");
112 die "unknown operation \"$op\"\n";