mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-12 17:37:13 +00:00
a0e44021ab
Current common.local doesn't handle lowmem mode well. It passes "--mode=lowmem" alone with "--repair", making it unable to check lowmem mode. It's caused by the following bugs: 1) Wrong variable in test/common.local We should check TEST_ARGS_CHECK, not TEST_CHECK, which is not defined so we never return 1. 2) Wrong parameter passed to _cmd_spec() in test/common This prevents us from grepping the correct parameters. Fix it. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
26 lines
537 B
Bash
26 lines
537 B
Bash
#!/bin/bash
|
|
#
|
|
# additional arguments to various commands
|
|
|
|
# already defined, eg. via make argument
|
|
if [ -n "$TEST_ENABLE_OVERRIDE" ]; then
|
|
return
|
|
fi
|
|
|
|
# set to 'true'
|
|
TEST_ENABLE_OVERRIDE=false
|
|
|
|
TEST_ARGS_CHECK=--mode=lowmem
|
|
|
|
# gets arguments of a current command and can decide if the argument insertion
|
|
# should happen, eg. if some option combination does not make sense or would
|
|
# break tests
|
|
_skip_spec()
|
|
{
|
|
if echo "$TEST_ARGS_CHECK" | grep -q 'mode=lowmem' &&
|
|
echo "$@" | grep -q -- '--repair'; then
|
|
return 0
|
|
fi
|
|
return 1
|
|
}
|