2001-01-15 05:01:19 +00:00
|
|
|
#! /bin/sh
|
2004-06-15 07:36:09 +00:00
|
|
|
# FS QA Test No. 040
|
2001-01-15 05:01:19 +00:00
|
|
|
#
|
|
|
|
|
# srcdiff test
|
|
|
|
|
#
|
|
|
|
|
#-----------------------------------------------------------------------
|
2002-06-04 23:07:56 +00:00
|
|
|
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
|
2001-01-15 05:01:19 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# creator
|
2003-09-03 00:30:33 +00:00
|
|
|
owner=nathans@sgi.com
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
seq=`basename $0`
|
|
|
|
|
echo "QA output created by $seq"
|
|
|
|
|
|
|
|
|
|
here=`pwd`
|
|
|
|
|
tmp=/tmp/$$
|
|
|
|
|
status=1 # failure is the default!
|
|
|
|
|
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
|
|
|
|
|
|
|
|
|
# get standard environment, filters and checks
|
|
|
|
|
. ./common.rc
|
|
|
|
|
. ./common.filter
|
|
|
|
|
|
2004-01-19 04:51:52 +00:00
|
|
|
[ -z "$KWORKAREA" ] && \
|
|
|
|
|
_notrun "Can't run srcdiff without KWORKAREA set"
|
|
|
|
|
[ -d "$KWORKAREA/fs/xfs" ] || \
|
|
|
|
|
_notrun "Can't find XFS source under \"$KWORKAREA\""
|
|
|
|
|
|
|
|
|
|
[ -z "$WORKAREA" ] && \
|
|
|
|
|
_notrun "Can't run srcdiff without WORKAREA set"
|
|
|
|
|
[ -f "$WORKAREA/xfstests/tools/srcdiff" ] || \
|
|
|
|
|
_notrun "Can't find srcdiff tool under \"$WORKAREA\""
|
|
|
|
|
[ -d "$WORKAREA/xfsprogs/include" ] || \
|
|
|
|
|
_notrun "Can't find XFS command headers under \"$WORKAREA\""
|
|
|
|
|
|
2001-01-15 05:01:19 +00:00
|
|
|
# real QA test starts here
|
2004-01-19 04:51:52 +00:00
|
|
|
cd "$WORKAREA/xfstests"
|
2003-09-03 00:30:33 +00:00
|
|
|
echo Silence is golden.
|
|
|
|
|
perl tools/srcdiff -q >$seq.full
|
|
|
|
|
if ! diff $seq.full $seq.good >/dev/null; then
|
|
|
|
|
echo "FAILED: srcdiff output $seq.full differs to $seq.good"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
# success, all done
|
|
|
|
|
status=0
|
|
|
|
|
exit
|