- Use 'getfattr' properly avoid redundant options during xattr query - Untabify certain parts of tests (remove tabs) - Avoid backtick evaluation for certain values to make code more portable. - Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds spurious spaces in its output. Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
20 lines
620 B
Bash
20 lines
620 B
Bash
#!/bin/bash
|
|
|
|
# Helper to verify a given fallocate command is supported and skip a test
|
|
# otherwise. Older versions of the fallocate utility might not support all modes
|
|
# (i.e., discard) and older versions of fuse might not support the associated
|
|
# fallocate requests.
|
|
|
|
function require_fallocate()
|
|
{
|
|
output=`fallocate $* 2>&1`
|
|
ret=$?
|
|
if [ ! $ret -eq 0 ] && ([[ $output == *unsupported* ]] ||
|
|
[[ $output == *invalid* ]] ||
|
|
[[ $output == *"not supported"* ]])
|
|
then
|
|
SKIP_TESTS
|
|
exit
|
|
fi
|
|
}
|