diff options
| author | Yumei Huang <yuhuang@redhat.com> | 2025-09-30 09:41:58 +0800 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-09-30 11:56:21 +0200 |
| commit | 70867817a93353653e367010b18416040740e75c (patch) | |
| tree | 04cc314e8109589fbf6509f578e15e779c9b2946 /test/lib/git: | |
| parent | c54ef9e8358db1a720c849612a32e52340d7a548 (diff) | |
| download | passt-70867817a93353653e367010b18416040740e75c.tar passt-70867817a93353653e367010b18416040740e75c.tar.gz passt-70867817a93353653e367010b18416040740e75c.tar.bz2 passt-70867817a93353653e367010b18416040740e75c.tar.lz passt-70867817a93353653e367010b18416040740e75c.tar.xz passt-70867817a93353653e367010b18416040740e75c.tar.zst passt-70867817a93353653e367010b18416040740e75c.zip | |
test: Fix printf error when debug is enabled
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 <yuhuang@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/git:')
0 files changed, 0 insertions, 0 deletions
