xfstests: 253: test the metadump functionality of xfs_db
authorAlex Elder <aelder@sgi.com>
Tue, 3 May 2011 18:39:29 +0000 (13:39 -0500)
committerAlex Elder <aelder@sgi.com>
Tue, 3 May 2011 18:39:29 +0000 (13:39 -0500)
commitc8200ef31e0148224404858313eabf473b034205
tree61f5d71def3bd60a27044371f93fcd559a3d8104
parent9935bd9855c34bccef5d180e9af110d3290c4e93
xfstests: 253: test the metadump functionality of xfs_db

This patch creates a test that exercises xfs_metadump, with a focus
on its obfuscation of names.  It was created to verify fixes that
avoided a hang condition when running "xfs_metadump" on a directory
containing files having particular bit patterns in their name.
Arkadiusz MiÃ…\9bkiewicz first reported seeing this while attempting
to create a metadump for a filesystem containing a file named
"R\323\257NE".

For now this script checks the following (using only filenames, not
attributes):
- that short names (4 characters or less) aren't obfuscated
- that long names get obfuscated
- that (long) directory names get obfuscated
- that names that are known to produce bit patterns that lead
  to invalid path components still generate obfuscated names
  (this could previously lead to a hang)
- that many names of the same length can still generate new
  obfuscated names (this could previously lead to a hang)
- that neither "lost+found" nor orphaned files stored in it ge
  obfuscated

Right now there are two sets of "ls" commands executed (one before
and one after obfuscation).  This produces repeatable results for
me on one filesystem, but on a different filesystem I expect the
inode numbers to change (and random number generation might change
the output too).  I'm interested in suggestions on how to filter
the output so the results can be verified.  If nothing else, the
test serves its purpose if I simply comment out those commands,
and will do that if there's not a better suggstion.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
253 [new file with mode: 0755]
253.out [new file with mode: 0644]
group