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 _begin_fstest other auto
17 # Import common functions.
20 [ -z "$KWORKAREA" ] && \
21 _notrun "Can't run libxfs-diff without KWORKAREA set"
22 [ -d "$KWORKAREA/fs/xfs" ] || \
23 _notrun "Can't find XFS source under \"$KWORKAREA\""
25 [ -z "$WORKAREA" ] && \
26 _notrun "Can't run libxfs-diff without WORKAREA set"
27 [ -f "$WORKAREA/tools/libxfs-diff" ] || \
28 _notrun "Can't find libxfs-diff tool under \"$WORKAREA\""
30 filter_libxfs_diff() {
31 sed -e 's/^--- libxfs/--- xfsprogs\/libxfs/g' \
32 -e 's/^+++ .*libxfs/+++ kernel\/libxfs/g' \
33 -e 's/^@@.*$/@@ -XXXX,X +YYYY,Y @@/g'
36 # Compare the two libxfses
37 (cd "$WORKAREA" ; ./tools/libxfs-diff "$KWORKAREA/fs/xfs/libxfs") | filter_libxfs_diff | tee -a $seqres.full