2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
9 # The purpose of this test is only to nag the maintainer of xfsprogs to try to
10 # keep xfsprogs's libxfs files in sync with the latest kernel's libxfs. There
11 # is no functional need for anyone to actually run this test to confirm
12 # proper XFS functionalilty, this is an xfsprogs maintainer test.
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
23 # get standard environment, filters and checks
27 [ -z "$KWORKAREA" ] && \
28 _notrun "Can't run libxfs-diff without KWORKAREA set"
29 [ -d "$KWORKAREA/fs/xfs" ] || \
30 _notrun "Can't find XFS source under \"$KWORKAREA\""
32 [ -z "$WORKAREA" ] && \
33 _notrun "Can't run libxfs-diff without WORKAREA set"
34 [ -f "$WORKAREA/tools/libxfs-diff" ] || \
35 _notrun "Can't find libxfs-diff tool under \"$WORKAREA\""
37 filter_libxfs_diff() {
38 sed -e 's/^--- libxfs/--- xfsprogs\/libxfs/g' \
39 -e 's/^+++ .*libxfs/+++ kernel\/libxfs/g' \
40 -e 's/^@@.*$/@@ -XXXX,X +YYYY,Y @@/g'
43 # Compare the two libxfses
44 (cd "$WORKAREA" ; ./tools/libxfs-diff "$KWORKAREA/fs/xfs/libxfs") | filter_libxfs_diff | tee -a $seqres.full