btrfs-progs: tests: fssum, fix memory leak
[platform/upstream/btrfs-progs.git] / tests / common.local
1 #!/bin/bash
2 #
3 # additional arguments to various commands
4
5 # already defined, eg. via make argument
6 if [ -n "$TEST_ENABLE_OVERRIDE" ]; then
7         return
8 fi
9
10 # set to 'true'
11 TEST_ENABLE_OVERRIDE=false
12
13 TEST_ARGS_CHECK=--mode=lowmem
14
15 # gets arguments of a current command and can decide if the argument insertion
16 # should happen, eg. if some option combination does not make sense or would
17 # break tests
18 _skip_spec()
19 {
20         if echo "$TEST_ARGS_CHECK" | grep -q 'mode=lowmem' &&
21            echo "$@" | grep -q -- '--repair'; then
22                 return 0
23         fi
24         return 1
25 }