xfs: no excessive warnings about dprecated mount options on remount
[xfstests-dev.git] / tests / xfs / 040
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 040
6 #
7 # compare-libxfs test
8 #
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.
13 #
14 seq=`basename $0`
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
17
18 here=`pwd`
19 tmp=/tmp/$$
20 status=1        # failure is the default!
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22
23 # get standard environment, filters and checks
24 . ./common/rc
25 . ./common/filter
26
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\""
31
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\""
36
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'
41 }
42
43 # Compare the two libxfses
44 (cd "$WORKAREA" ; ./tools/libxfs-diff "$KWORKAREA/fs/xfs/libxfs") | filter_libxfs_diff | tee -a $seqres.full
45
46 # success, all done
47 status=0
48 exit