xfstests: fix src/seek_sanity_test -t option
authorEric Sandeen <sandeen@redhat.com>
Tue, 28 May 2013 15:37:39 +0000 (10:37 -0500)
committerRich Johnston <rjohnston@sgi.com>
Tue, 28 May 2013 15:37:39 +0000 (10:37 -0500)
commitbd13bf9e2a87a40d3aab2644967029b854ed2d11
treedf70c9459393a37301cc44ce787a18cb55776d54
parentf761cd9a6aa9b44be7f3056f01c419edf1356789
xfstests: fix src/seek_sanity_test -t option

_require_seek_data_hole() does not work because
the -t (test) option of seek_sanity_test is broken,
because of an early check for (argc != 2):

# src/seek_sanity_test -t foo
Usage: src/seek_sanity_test base_file_path

So _require_seek_data_hole() doesn't see the
"Kernel does not support" string it's looking for,
and passes the check.

So rather than _notrun-ing the test, it proceeds to
fail with noisy errors.

Fix that, make a common usage() function, and check for
too many args as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
src/seek_sanity_test.c