30 Sep
2025
30 Sep
'25
1:13 p.m.
On Tue, 30 Sep 2025 09:41:58 +0800
Yumei Huang
Running test pasta/tcp with debug enabled would get stuck with below error:
+ printf 'DEBUG: ns socat -u OPEN:__BASEPATH__/big.bin TCP6:[__GW6__%__IFNAME__]:10003\n' lib/term: line 38: printf: `_': invalid format character
The error occurs because printf interprets the % character as the start of a format specifier, and the following '_' isn't one of them.
Fix it by replacing 'printf "${*}"' with 'printf "%b" "${*}"'. Also update the docstring.
Link: https://bugs.passt.top/show_bug.cgi?id=154 Fixes: de28c20d8051 ("test: Update lib/term for clearer output when DEBUG is enabled") Signed-off-by: Yumei Huang
Applied. -- Stefano