6 # The purpose of this test is only to nag the maintainer of xfsprogs to try to
7 # keep xfsprogs's libxfs files in sync with the latest kernel's libxfs. There
8 # is no functional need for anyone to actually run this test to confirm
9 # proper XFS functionalilty, this is an xfsprogs maintainer test.
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 #-----------------------------------------------------------------------
31 seqres=$RESULT_DIR/$seq
32 echo "QA output created by $seq"
36 status=1 # failure is the default!
37 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
39 # get standard environment, filters and checks
43 [ -z "$KWORKAREA" ] && \
44 _notrun "Can't run libxfs-diff without KWORKAREA set"
45 [ -d "$KWORKAREA/fs/xfs" ] || \
46 _notrun "Can't find XFS source under \"$KWORKAREA\""
48 [ -z "$WORKAREA" ] && \
49 _notrun "Can't run libxfs-diff without WORKAREA set"
50 [ -f "$WORKAREA/tools/libxfs-diff" ] || \
51 _notrun "Can't find libxfs-diff tool under \"$WORKAREA\""
53 filter_libxfs_diff() {
54 sed -e 's/^--- libxfs/--- xfsprogs\/libxfs/g' \
55 -e 's/^+++ .*libxfs/+++ kernel\/libxfs/g' \
56 -e 's/^@@.*$/@@ -XXXX,X +YYYY,Y @@/g'
59 # Compare the two libxfses
60 (cd "$WORKAREA" ; ./tools/libxfs-diff "$KWORKAREA/fs/xfs/libxfs") | filter_libxfs_diff | tee -a $seqres.full