Skip to content

Commit 59aee56

Browse files
committed
fstests/Kconfig: use int-specific default for CLI SOAK_DURATION
Commit e629438 ("fstests: add support for overriding soak duration through CLI") added support for overriding the soak duration through the CLI which is useful for CIs. It however re-used an existing script we use for Kconfig defaults, this works well for strings but the default output must be digit if the Kconfig variable was an int, so just add another script for int Kconfig variables so we can avoid the warning, the warning from Kconfig is that we essentially default to "" if the CLI option to override the soak duration was was not set, and this needs to be 0. Fixes: e629438 ("fstests: add support for overriding soak duration through CLI") Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 67186b5 commit 59aee56

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
STR=""
4+
5+
if [[ $# -eq 0 ]]; then
6+
echo 0
7+
exit 0
8+
fi
9+
10+
while [[ ${#1} -gt 0 ]]; do
11+
STR="${STR}${1}"
12+
shift
13+
done
14+
15+
echo $STR

workflows/fstests/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ endchoice
933933
config FSTESTS_SOAK_DURATION_CUSTOM_VAL
934934
int "Custom soak duration value (seconds)"
935935
default 0 if !FSTESTS_SOAK_DURATION_CUSTOM
936-
default $(shell, ./scripts/append-makefile-vars.sh $(SOAK_DURATION)) if FSTESTS_SOAK_DURATION_CUSTOM
936+
default $(shell, ./scripts/append-makefile-vars-int.sh $(SOAK_DURATION)) if FSTESTS_SOAK_DURATION_CUSTOM
937937
depends on FSTESTS_SOAK_DURATION_CUSTOM
938938
help
939939
Enter your custom soak duration value in seconds.

0 commit comments

Comments
 (0)