Commit Graph

46 Commits

Author SHA1 Message Date
Dmitry Monakhov 32553be2e4 xfstests: add fiemap operation to fsstress
Related bug: http://patchwork.ozlabs.org/patch/118863

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov 96fb9f93ca xfstests: fsstress add FS_IOC_{SET,GET}FLAGS operations v2
Add two new operations:
- getattr: ioctl(fd, FS_IOC_GETFLAGS, &fl)
- setattr: ioctl(fd, FS_IOC_SETFLAGS, &random_flags)
Attribute mask may be passed via -M opt, by default is (~0).
By default FS_IOC_SETFLAGS has zero probability because
it may produce inodes with APPEND or IMMUTABLE flags which
are not deletable by default. Let's assumes that one who
enable it knows how to delete such inodes.
For example like follows:
find $TEST_PATH -exec chattr -i -a {} \;
rm -rf $TEST_PATH

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov dca63722ea xfstests: add fallocate support to fsstress
Add tests for fallocate(2) syscall
- fallocate: reserve the disk space
- punch: de-allocates the disk space
Since FALLOC_FL_PUNCH_HOLE is relatively new it's value defined
explicitly if not yet defined. Later we may clear that define.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov df3c057ccb xfstests: fsstress add command line style output for show_opts
Once some combination of seed+fs_ops result in regression it is
reasonable to document that combination. It is usefull to dump
that configuration in command line style. Later this line may be
simply hardcoded in to regression test.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov bd11e87d59 xfstests: fsstress should kill children tasks before exit
It is very hard to predict runtime for fsstress. In many cases it
is useful to give test to run a reasonable time, and then kill it.
But currently there is no reliable way to kill test without leaving
running children.
This patch add sanity cleanup logic which looks follow:
 - On sigterm received by parent, it resend signal to it's children
 - Wait for each child to terminates
 - EXTRA_SANITY: Even if parent was killed by other signal, children
   will be terminated with SIGKILL to preven staled children.

So now one can simply run fsstress like this:
./fsstress -p 1000 -n999999999 -d $TEST_DIR &
PID=$!
sleep 300
kill $PID
wait $PID

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dmitry Monakhov e67879499e xfstests: add different logging option to fsstress
Currently the only way to log fsstress's output is to redirect it's shared
stdout to pipe which is very painfull because:

1) Pipe writers are serialized via i_mutex so we waste cpu-cores power on stupid
   sinchronization for loging purpose, instead of hunting real race conditions,
   and bugs inside file system.
2) Usually output is corrupted due to luck of sychronization on shared stdout.

Since fsstress's children operate on independend paths, let's just open didicated
log file for each child and simply avoid useless sycnhronization.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dmitry Monakhov e8f6c8e42e xfstests: fsstress dump inode info when possible
Fsstress exec behaviour is not completely determinated in case of
low resources mode due to ENOMEM, ENOSPC, etc. In some places we
call stat(2). This information may be halpfull for future
investigations purposes. Let's dump stat info where possible.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dave Chinner b1da830791 xfstests: fix bulkstat related compile warnings.
Use correct types for bulkstat structure to avoid pointer warnings.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-21 08:53:44 +11:00
Eric Sandeen 84567e4977 Drop the xfs-specific MAXNAMELEN in favor of the Posix NAME_MAX
This makes it easier to lose libxfs.h later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:35:56 -05:00
Nathan Scott a90d78c5da QA updates - make builds on older versions of headers work, reenable rt on bruce.
Merge of master-melb:xfs-cmds:26356a by kenmcd.
2006-06-27 03:49:23 +00:00
Nathan Scott 26fdd3c59c Comment out extsize setting for all allocators until delalloc accounting issue resolved.
Merge of master-melb:xfs-cmds:26268a by kenmcd.
2006-06-17 06:11:37 +00:00
Nathan Scott de6d86177f QA test updates - fixes for pquota, extsize, fsstress, and ensure mount options passed through to test_dev.
Merge of master-melb:xfs-cmds:24763a by kenmcd.
2005-12-09 02:52:22 +00:00
Nathan Scott 6449a993f2 Switch to always using get/setxattr rather than a separate projid call on IRIX.
Merge of master-melb:xfs-cmds:24692a by kenmcd.
2005-12-05 21:41:47 +00:00
Nathan Scott d259454b19 Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24329a by kenmcd.
2005-11-09 02:50:19 +00:00
Tim Shimmin 5b23d7a080 Add comments, diganostics, pass back some errors from funcs.
Merge of master-melb:xfs-cmds:24197a by kenmcd.

  When tracking down an error msg from fsstress, I had no idea what
  was going on. So I have added a bunch of comments to the code
  and added some more diagnostics (in verbose mode). Have also passed
  back some failures which weren't directly before.
  Hopefully this will not change the ops which are called for
  a given rand-seed run.
2005-10-25 06:37:03 +00:00
Nathan Scott 781a49c308 Fix fsstress builds when setting the project identifier (fsx interface now).
Merge of master-melb:xfs-cmds:23061a by kenmcd.
2005-07-05 03:44:14 +00:00
Nathan Scott a175e44297 Abstract out some common quota shell code, add project operation to fsstress.
Merge of master-melb:xfs-cmds:22099a by kenmcd.
2005-04-08 03:50:59 +00:00
Tim Shimmin 4c56e56f91 xfs qa changes to get thinks working on irix
add verbosity to a file for debugging
reduce iteration count
2004-08-10 03:55:47 +00:00
ptools cb6beb9759 Fixed merge problems 2004-06-15 07:32:36 +00:00
fsgqa 74e3d56bf2 QA test updates.
Fix location of fsstress and clamp the uid/gid range for chown so as to
limit memory requirements for xfs_db/check afterward.
2003-07-17 23:06:11 +00:00
Nathan Scott 332ee29d1a xfstests updates - rework build to be like other xfs packages, revive some old fs test tools and reenable xfs extensions, move ltp code into a separate subdir to help keeping in sync with real ltp project (hopefully) 2003-07-07 06:36:46 +00:00