<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/test/lib, branch master</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>lib/term: Quote tr character ranges to prevent glob expansion</title>
<updated>2026-05-16T13:50:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2026-05-12T09:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=ab122931e18001a4f2e06f80fb30ad3bbb2bd0d6'/>
<id>ab122931e18001a4f2e06f80fb30ad3bbb2bd0d6</id>
<content type='text'>
Single-letter files in the working directory cause glob expansion of
unquoted tr character ranges like [A-Z] and [a-z].  When the shell
expands these against matching filenames, tr receives wrong arguments
and pane_or_context_run() hangs without errors.

Apply the same fix as in a36031a4d807 ("seccomp.sh: Quote tr character
ranges to prevent glob expansion"): quote all tr ranges in test/lib/term.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Single-letter files in the working directory cause glob expansion of
unquoted tr character ranges like [A-Z] and [a-z].  When the shell
expands these against matching filenames, tr receives wrong arguments
and pane_or_context_run() hangs without errors.

Apply the same fix as in a36031a4d807 ("seccomp.sh: Quote tr character
ranges to prevent glob expansion"): quote all tr ranges in test/lib/term.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Handle Operating System Command escapes in terminal output</title>
<updated>2026-01-10T18:27:47+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-01-07T01:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=ac77d0ce5fc8ba59909ebb6d2a38052dbae6e871'/>
<id>ac77d0ce5fc8ba59909ebb6d2a38052dbae6e871</id>
<content type='text'>
Our "old style" test script stuff uses raw terminal output scraped from
tmux.  This might include terminal escape sequences from the shell, or
whatever we run in it: they think they're talking to a terminal emulator
not a script, and they're not entirely incorrect.

In several places we filter out ANSI ESC-[ sequences to make this work.
However, this doesn't include ESC-] "Operating System Command" sequences.
Something I've updated in Fedora 43 generates heaps of these, which break
everything.

Add more hairy regexps to filter these out as well.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Reviewed-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our "old style" test script stuff uses raw terminal output scraped from
tmux.  This might include terminal escape sequences from the shell, or
whatever we run in it: they think they're talking to a terminal emulator
not a script, and they're not entirely incorrect.

In several places we filter out ANSI ESC-[ sequences to make this work.
However, this doesn't include ESC-] "Operating System Command" sequences.
Something I've updated in Fedora 43 generates heaps of these, which break
everything.

Add more hairy regexps to filter these out as well.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Reviewed-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Expand tmux right status bar to fit pass/fail/skipped counter and time</title>
<updated>2025-12-07T22:17:59+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2025-12-04T21:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=7c7be67ddf264281f192084521af23a1c429dd99'/>
<id>7c7be67ddf264281f192084521af23a1c429dd99</id>
<content type='text'>
I recently realised I couldn't see seconds elapsing in asciinema test
recordings. That's because now that we display a SKIPPED counter, we
need some extra room for characters, 64 in total:

  PASS: xxx | FAIL: xxx | SKIPPED: xxx | YYYY-MM-DDThh:mm:ss+00:00

Fixes: 4234ace84cdf ("test: Display count of skipped tests in status and summary")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I recently realised I couldn't see seconds elapsing in asciinema test
recordings. That's because now that we display a SKIPPED counter, we
need some extra room for characters, 64 in total:

  PASS: xxx | FAIL: xxx | SKIPPED: xxx | YYYY-MM-DDThh:mm:ss+00:00

Fixes: 4234ace84cdf ("test: Display count of skipped tests in status and summary")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: For missing static checkers, skip rather than failing tests</title>
<updated>2025-10-15T21:16:38+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-10-10T03:45:49+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=6d84c90c8e32659d3b25fd352126889f33d66f1d'/>
<id>6d84c90c8e32659d3b25fd352126889f33d66f1d</id>
<content type='text'>
We run a bunch of static checkers as part of our testsuite.  That's useful,
but it means that if a user doesn't have one of them installed, it fails
the entire testsuite.  Alter our scripts to skip the test, rather than
failing outright if the checker tool is not installed.

This requires exeter v0.4.4 or later.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We run a bunch of static checkers as part of our testsuite.  That's useful,
but it means that if a user doesn't have one of them installed, it fails
the entire testsuite.  Alter our scripts to skip the test, rather than
failing outright if the checker tool is not installed.

This requires exeter v0.4.4 or later.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add some missing quoting in exeter runner</title>
<updated>2025-10-15T21:16:38+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-10-10T03:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=5149f34902555852ff96a33ea377223d4b770ffe'/>
<id>5149f34902555852ff96a33ea377223d4b770ffe</id>
<content type='text'>
exeter() quoted ${__testid}, but in some places we use it there's an
extra level of shell, which needs another layer of quoting.  This breaks
if testids include ';', which is quite common in exeter tests created as
a composition/pipeline of two functions.  Add the required extra quoting.

While we're there, improve consistency with other scripts by always using
the optional {} around variable names.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
exeter() quoted ${__testid}, but in some places we use it there's an
extra level of shell, which needs another layer of quoting.  This breaks
if testids include ';', which is quite common in exeter tests created as
a composition/pipeline of two functions.  Add the required extra quoting.

While we're there, improve consistency with other scripts by always using
the optional {} around variable names.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Use ${} consistently in lib/exeter</title>
<updated>2025-10-15T21:16:38+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-10-10T03:45:47+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=898cf50e94e596409869d57e58e29f1ff069664a'/>
<id>898cf50e94e596409869d57e58e29f1ff069664a</id>
<content type='text'>
Most of the test shell scripts use {} around variable names even when it's
not required, for consistency.  lib/exeter didn't do so consistently,
however.  Correct that.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the test shell scripts use {} around variable names even when it's
not required, for consistency.  lib/exeter didn't do so consistently,
however.  Correct that.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Fix printf error when debug is enabled</title>
<updated>2025-09-30T09:56:21+00:00</updated>
<author>
<name>Yumei Huang</name>
<email>yuhuang@redhat.com</email>
</author>
<published>2025-09-30T01:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=70867817a93353653e367010b18416040740e75c'/>
<id>70867817a93353653e367010b18416040740e75c</id>
<content type='text'>
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 &lt;yuhuang@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;yuhuang@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Update lib/term for clearer output when DEBUG is enabled</title>
<updated>2025-09-26T10:14:32+00:00</updated>
<author>
<name>Yumei Huang</name>
<email>yuhuang@redhat.com</email>
</author>
<published>2025-09-26T06:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=de28c20d8051735d0b828cedb8697c8ef65dd719'/>
<id>de28c20d8051735d0b828cedb8697c8ef65dd719</id>
<content type='text'>
When running tests with DEBUG=1, we used to get some
"DEBUG:DEBUG:DEBUG:" in logs, which is not very helpful for
debugging.

With this patch, the log would show the steps like below:

    DEBUG: g1tools  ip jq dhclient socat cat
    DEBUG: htools   ip jq
    DEBUG:
    DEBUG: set      MAP_HOST4 192.0.2.1
    DEBUG: set      MAP_HOST6 2001:db8:9a55::1

The problem here is that "${@}" is magic and expands to multiple
arguments, even though it's quoted.  That means instead of the whole
message going into a single string, the "DEBUG:" becomes the format
string and the rest goes into unused parameters.

Suggested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Yumei Huang &lt;yuhuang@redhat.com&gt;
[dwg: root cause explanation in commit message]
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running tests with DEBUG=1, we used to get some
"DEBUG:DEBUG:DEBUG:" in logs, which is not very helpful for
debugging.

With this patch, the log would show the steps like below:

    DEBUG: g1tools  ip jq dhclient socat cat
    DEBUG: htools   ip jq
    DEBUG:
    DEBUG: set      MAP_HOST4 192.0.2.1
    DEBUG: set      MAP_HOST6 2001:db8:9a55::1

The problem here is that "${@}" is magic and expands to multiple
arguments, even though it's quoted.  That means instead of the whole
message going into a single string, the "DEBUG:" becomes the format
string and the rest goes into unused parameters.

Suggested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Yumei Huang &lt;yuhuang@redhat.com&gt;
[dwg: root cause explanation in commit message]
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Extend test scripts to allow running exeter tests.</title>
<updated>2025-09-05T11:00:04+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-09-05T06:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a283ef47b9b3d525e54d1679f0bbc68ed5498e27'/>
<id>a283ef47b9b3d525e54d1679f0bbc68ed5498e27</id>
<content type='text'>
Introduce some trivial testcases based on the exeter library.  These run
passt and pasta with --help and --version options.  Extend our test
scripts to run these tests.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce some trivial testcases based on the exeter library.  These run
passt and pasta with --help and --version options.  Extend our test
scripts to run these tests.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: By default, don't quit source after migration, keep sockets open</title>
<updated>2025-07-29T15:57:01+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2025-07-17T08:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a8782865c342eb2682cca292d5bf92b567344351'/>
<id>a8782865c342eb2682cca292d5bf92b567344351</id>
<content type='text'>
We are hitting an issue in the KubeVirt integration where some data is
still sent to the source instance even after migration is complete. As
we exit, the kernel closes our sockets and resets connections. The
resulting RST segments are sent to peers, effectively terminating
connections that were meanwhile migrated.

At the moment, this is not done intentionally, but in the future
KubeVirt might enable OVN-Kubernetes features where source and
destination nodes are explicitly getting mirrored traffic for a while,
in order to decrease migration downtime.

By default, don't quit after migration is completed on the source: the
previous behaviour can be enabled with the new, but deprecated,
--migrate-exit option. After migration (as source), the -1 / --one-off
option has no effect.

Also, by default, keep migrated TCP sockets open (in repair mode) as
long as we're running, and ignore events on any epoll descriptor
representing data channels. The previous behaviour can be enabled with
the new, equally deprecated, --migrate-no-linger option.

By keeping sockets open, and not exiting, we prevent the kernel
running on the source node to send out RST segments if further data
reaches us.

Reported-by: Nir Dothan &lt;ndothan@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are hitting an issue in the KubeVirt integration where some data is
still sent to the source instance even after migration is complete. As
we exit, the kernel closes our sockets and resets connections. The
resulting RST segments are sent to peers, effectively terminating
connections that were meanwhile migrated.

At the moment, this is not done intentionally, but in the future
KubeVirt might enable OVN-Kubernetes features where source and
destination nodes are explicitly getting mirrored traffic for a while,
in order to decrease migration downtime.

By default, don't quit after migration is completed on the source: the
previous behaviour can be enabled with the new, but deprecated,
--migrate-exit option. After migration (as source), the -1 / --one-off
option has no effect.

Also, by default, keep migrated TCP sockets open (in repair mode) as
long as we're running, and ignore events on any epoll descriptor
representing data channels. The previous behaviour can be enabled with
the new, equally deprecated, --migrate-no-linger option.

By keeping sockets open, and not exiting, we prevent the kernel
running on the source node to send out RST segments if further data
reaches us.

Reported-by: Nir Dothan &lt;ndothan@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
