[LTP] [PATCH] tst_test.sh: Unset the locale concerned variables
Akihiko Odaki
akihiko.odaki@daynix.com
Thu Oct 13 07:58:45 CEST 2022
network/tcp_cmds/tracepath/tracepath01.sh fails with LANG=ja_JP.UTF-8
because it parses localized output.
To avoid such a problem, we can always unset the locale concerned
variables. network/stress/ns-tools/check_envval does that, but it is
limited to the network stress test. Add similar code to tst_test.sh
so that it can cover more tests.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
testcases/lib/tst_test.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 28b7d12ba..9a8b62f1e 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -831,3 +831,8 @@ if [ -z "$TST_NO_DEFAULT_RUN" ]; then
fi
fi
fi
+
+# Unset the locale cocerned variables
+for env in $(locale | cut -f 1 -d =); do
+ unset $env
+done
--
2.37.3
More information about the ltp
mailing list