Commit Graph

21 Commits

Author SHA1 Message Date
Darrick J. Wong f806708c2c xfs/122: add legacy timestamps to ondisk checker
Add these new ondisk structures.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-25 14:27:40 +08:00
Darrick J. Wong 8df851f5a1 xfs/122: fix test for xfs_attr_shortform_t conversion
The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
Update this test to pass.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-03-15 00:54:03 +08:00
Darrick J. Wong a860a167d8 common: kill _supported_os
fstests only supports Linux, so get rid of this unnecessary predicate.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2020-09-21 01:16:50 +08:00
Darrick J. Wong 35200671b3 xfs/122: fix for linux 5.7 stuff
Fix some regressions on xfsprogs 5.7.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2020-05-10 23:16:29 +08:00
Darrick J. Wong 31f219d3e5 xfs/122: mask wonky ioctls
Don't check the structure size of the inogrp/bstat/fsop_bulkreq
structures because they're incorrectly padded.  When we remove the
old typdefs the old filter stops working.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-08-04 16:50:19 +08:00
Darrick J. Wong 5b9305f2fa xfs/122: ignore inode geometry structure
Ignore new in-core structure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-08-04 16:50:05 +08:00
Dave Chinner 2529c9486a xfs: convert tests to SPDX license tags
Fully scripted conversion, see script in initial SPDX license commit
message.

tests/xfs/044 was hand massaged to remove duplicate copyright and
divider lines before running the script.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2018-06-09 11:35:45 +10:00
Darrick J. Wong 65022a47fc xfs/122: fix sb_fname[XFSLABEL_MAX] in test
We recently redefined sb_fname's array length to use a symbolic
constant instead of a magic number, so update this test accordingly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-06-08 14:11:56 +08:00
Darrick J. Wong a6b5c98da8 xfs/122: fix xfs header ordering problems
XFS headers are supposed to be included in a certain order so that
inline functions actually compile correctly.  For the most part the
shell feeds us the files in an order that works, but with the
addition of the xfs_dir2_dirblock_bytes function this doesn't always
work now.  Therefore, explicitly #include the headers in the
required order.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2018-01-25 15:55:07 +08:00
Darrick J. Wong 6ee333cec4 xfs/122: don't check xfs_iext_cursor
Don't size-check the incore extent map cursor; it's not a disk
structure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-11-16 12:24:35 +08:00
Eryu Guan 16ef0843f2 xfs/122: remove dead code
Seems this hunk of dead code is used for debug purpose to inspect
what the output looks like after _attribute_filter. Just remove it.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-10-14 10:05:34 +08:00
Darrick J. Wong c0c6e54ce6 xfs/122: don't break on old xfsprogs
If we're running against a old version of xfsprogs that lacks some
of the structures that the golden output knows about, copy the
structure size definition from the golden output to the program
output.  This way we can check for structure size mutations on old
xfsprogs without generating false error reports for structs that
don't exist in the old release.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-06-15 15:44:49 +08:00
Eryu Guan 598600ce04 fstests: fix various $seqres.full issues
There're many tests don't remove $seqres.full before writing to it, and
accumulating logs there, then the logs are always growing over time.
Let's fix them once.

generic/16[1-8] generic/170 and generic/33[34] truncate $seqres.full in
the middle of the test, which results in partial logs. Fix them as well.

xfs/227 has duplicated lines to remove $seqres.full, remove the extra
line.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-05-09 16:03:27 +10:00
Darrick J. Wong e1644f57bb xfs/122: define _GNU_SOURCE when compiling test program
This makes it so we don't get warnings about off64_t not being
defined when compiling the test program.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-03-23 17:37:32 +11:00
Darrick J. Wong 4f1a5d60e5 xfs/122: support refcount/rmap data structures
Include the refcount and rmap structures in the golden output.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2016-02-12 09:39:05 -08:00
Darrick J. Wong c0cfa5651f xfs/122: update against xfsprogs 4.3
Make the xfsprogs sb layout and structure size checker work with
modern xfsprogs (i.e. 4.3+ and all the new v5 stuff).  The old test
wasn't picking up structures because they're no longer defined in the
"typedef struct xfs_foo { } xfs_foo_t;" style.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-02-08 09:27:15 +11:00
Zhao Lei 7a1ad744f2 common: fix "utility required warning" with empty utility name
In generic/019, if we hadn't install fio, we will get following output:

 generic/019      [not run]  utility required, skipped this test <- *
 Not run: generic/019
 Passed all 0 tests

When fio is not installed, "$FIO_PROG" is set to blank, and
_require_fio() call _require_command() with none arguments.

This patch fixed all misuse of _require_command(), add 2nd argument
to let _require_command() output right message, and add quotes to
first argument to avoid argument shifting.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2015-03-18 15:00:23 +11:00
Rich Johnston 0efd4f4d48 xfstests: cleanup duplicates in all tests
There are duplicate blank lines, comment hash and lines
containing duplicate seqres= declarations, remove them.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2013-04-04 06:55:21 -05:00
Dave Chinner 8c4905a42e xfstests: introduce a common directory
Introduce a top level common directory and move all the common.*
files into it.  Because there is now a directory named common, the
prefix can be dropped from all the files. Convert all the tests to
use this new directory for including common files.

for f in common.*; do \
	git mv `echo -n "$f " ; echo $f | sed -e 's;n\.;n/;'` \
done

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com reworked for TOT changes]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-26 21:44:05 -05:00
Dave Chinner 1d5d46db80 xfstests: convert tests to use new results directory
Essentially the change is simply this. Converting:

... >> $seq.????

to:

.... >> $RESULT_DIR/$seq.????

so that output files are directed to the defined output directory.

sed to the rescue:

$ sed -i -e '/^seq=.*$/a seqres=$RESULT_DIR/$seq' -e 's/seq.full/seqres.full/' tests/*/*

will do most of the work automatically.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com reworked for TOT changes]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-26 21:38:47 -05:00
Dave Chinner fc48dfb966 xfstests: move xfs specific tests out of top directory
And into tests/xfs. Tests found and moved via:

$ grep "supported_fs xfs$" [0-2]* | cut -d : -f 1 > xfs.tests
$ for i in `cat xfs.tests`; do
> git mv $i* tests/xfs/
> grep ^$i group >> tests/xfs/group
> sed -i -e "/^$i/d" group
> done

Output now looks like:

 sudo ./check -g quick -r
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 test-1 3.5.0-rc5-dgc+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
MOUNT_OPTIONS -- /dev/vdb /mnt/scratch

xfs/170  4s
generic/120      16s
generic/248      0s
generic/213      0s
generic/256      39s
xfs/121  6s
xfs/026  11s
generic/131      1s
xfs/187  1s
generic/135      0s
....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com did not move test 032, belongs in shared]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-26 18:27:34 -05:00