<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt, branch ndebug</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>test: Add test for builds with -DNDEBUG</title>
<updated>2026-05-15T04:11:23+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-15T03:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=1af39cf7c7bb784517f8e89409c5d7e1b1bc1505'/>
<id>1af39cf7c7bb784517f8e89409c5d7e1b1bc1505</id>
<content type='text'>
Since bc872d91765d we omit assert()s if the NDEBUG preprocessor symbol is
defined, as is the case with the standard library assert(3).  However,
none of our tests verify that we can actually build that way.  Add an
extra test to test/build/build.py tto verify this.

Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()")

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since bc872d91765d we omit assert()s if the NDEBUG preprocessor symbol is
defined, as is the case with the standard library assert(3).  However,
none of our tests verify that we can actually build that way.  Add an
extra test to test/build/build.py tto verify this.

Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()")

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix build with -DNDEBUG</title>
<updated>2026-05-15T04:11:23+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-15T01:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=93b6f3ef4c3349df7bb4443a389a07662fe02478'/>
<id>93b6f3ef4c3349df7bb4443a389a07662fe02478</id>
<content type='text'>
Since bc872d91765d, our assert() statements are omitted if we compile with
-DNDEBUG, like the standard library assert(3).  Unfortunately a trivial but
embarrassing mistake in that patch means that instead of never aborting in
this case, assert_with_msg() *always* aborts, breaking pretty much
everything.

There's also a missing #include that breaks the build with -DNDEBUG on at
least some library versions.

Reported-by: Jan Palus &lt;jpalus@fastmail.com&gt;
Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()")
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since bc872d91765d, our assert() statements are omitted if we compile with
-DNDEBUG, like the standard library assert(3).  Unfortunately a trivial but
embarrassing mistake in that patch means that instead of never aborting in
this case, assert_with_msg() *always* aborts, breaking pretty much
everything.

There's also a missing #include that breaks the build with -DNDEBUG on at
least some library versions.

Reported-by: Jan Palus &lt;jpalus@fastmail.com&gt;
Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()")
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Extend exeter build tests to cover more recent binaries</title>
<updated>2026-05-15T03:22:33+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-15T01:38:10+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=6cab5e3713acf94c8304feb332714cb93942c29c'/>
<id>6cab5e3713acf94c8304feb332714cb93942c29c</id>
<content type='text'>
test/build/build.py tests that the Makefile works to build our binaries.
However, it hasn't been updated for a while, and doesn't cover passt-repair
or pesto.  Extend it to cover those too.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test/build/build.py tests that the Makefile works to build our binaries.
However, it hasn't been updated for a while, and doesn't cover passt-repair
or pesto.  Extend it to cover those too.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clang-tidy: Suppress some new unhelpful new warnings</title>
<updated>2026-05-11T22:04:11+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=4de7c3826d810e2e3f7f404dc8037ab445d6f2f0'/>
<id>4de7c3826d810e2e3f7f404dc8037ab445d6f2f0</id>
<content type='text'>
clang-tidy 22.1.4 (or thereabouts) introduced some new warning categories
that while theoretically useful, trip in too many silly occasions to be
useful.  Suppress them.

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>
clang-tidy 22.1.4 (or thereabouts) introduced some new warning categories
that while theoretically useful, trip in too many silly occasions to be
useful.  Suppress them.

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>treewide: Make some additional variables static</title>
<updated>2026-05-11T22:04:08+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=97e478b40d4154cf007641f1e247cc3fef8392ad'/>
<id>97e478b40d4154cf007641f1e247cc3fef8392ad</id>
<content type='text'>
Mark a number of extra variables local to a single module as static.

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>
Mark a number of extra variables local to a single module as static.

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>packet, clang-tidy: Packet pool buffers are not NULL</title>
<updated>2026-05-11T22:04:06+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=90f175d82dabfa564122e98949f5abb5590d89d1'/>
<id>90f175d82dabfa564122e98949f5abb5590d89d1</id>
<content type='text'>
struct pool always needs a non-NULL buf field: it points either to the
actual memory used to store packets, or for vhost-user to the vhost user
memory structure which will contain the packets.  We set this pointer
when we initialise the pool.  However, clang-tidy (as of 22.1.4, at least)
doesn't realise this in packet_check_range(), causing UB warnings due to
the subtraction of ptr and p-&gt;buf.

Clue it in with an assert().

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>
struct pool always needs a non-NULL buf field: it points either to the
actual memory used to store packets, or for vhost-user to the vhost user
memory structure which will contain the packets.  We set this pointer
when we initialise the pool.  However, clang-tidy (as of 22.1.4, at least)
doesn't realise this in packet_check_range(), causing UB warnings due to
the subtraction of ptr and p-&gt;buf.

Clue it in with an assert().

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>clang-tidy: Suppress sscanf() warning harder</title>
<updated>2026-05-11T22:04:05+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=7bafe7163ab0bfafc3d90dcba06c1b045b57a285'/>
<id>7bafe7163ab0bfafc3d90dcba06c1b045b57a285</id>
<content type='text'>
We already have a clang-tidy suppression to stop if complaining about our
use of sscanf() in procfs_scan_listen().  However, it now (clang-tidy
22.1.4 or thereabouts) seems there's an additional warning category that
complains about the same thing.  Add that to the suppression.

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>
We already have a clang-tidy suppression to stop if complaining about our
use of sscanf() in procfs_scan_listen().  However, it now (clang-tidy
22.1.4 or thereabouts) seems there's an additional warning category that
complains about the same thing.  Add that to the suppression.

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>clang-tidy: Squash inconsistent brace warnings in foreach macros</title>
<updated>2026-05-11T22:04:03+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a82a2173d4ea41fe4e97d9451f8ed1626b00d612'/>
<id>a82a2173d4ea41fe4e97d9451f8ed1626b00d612</id>
<content type='text'>
clang-tidy, at least as of 22.1.4 complains about if/else statements with
inconsistent braces.  We generally do want consistend bracing per our
coding style.  However, some of our foreach macros generate inconsistent
bracing in a way that can't really be avoided.  Add suppressions to stop
clang-tidy complaining about these.

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>
clang-tidy, at least as of 22.1.4 complains about if/else statements with
inconsistent braces.  We generally do want consistend bracing per our
coding style.  However, some of our foreach macros generate inconsistent
bracing in a way that can't really be avoided.  Add suppressions to stop
clang-tidy complaining about these.

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>conf: Fix not-actually-const parameter to conf_runas() and conf_ugid()</title>
<updated>2026-05-11T22:03:59+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=db02221ceee1ec01d74ed15d5d5e2d8997c54f51'/>
<id>db02221ceee1ec01d74ed15d5d5e2d8997c54f51</id>
<content type='text'>
Commit 4af3d83170fd changed the @opt parameter to conf_runas() to a const
pointer, to remove a cppcheck error.  However, that error was a false
positive.  We *do* modify that parameter via an aliased pointer within it
retreived from strchr().  At least with gcc 16.1.1 that now causes a
"discards const" warning.  Revert that change and instead directly suppress
the cppcheck warning.

Fixes: 4af3d83170fd ("treewide: Fix more pointers which can be const")
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>
Commit 4af3d83170fd changed the @opt parameter to conf_runas() to a const
pointer, to remove a cppcheck error.  However, that error was a false
positive.  We *do* modify that parameter via an aliased pointer within it
retreived from strchr().  At least with gcc 16.1.1 that now causes a
"discards const" warning.  Revert that change and instead directly suppress
the cppcheck warning.

Fixes: 4af3d83170fd ("treewide: Fix more pointers which can be const")
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>virtio: Reduce scope of variable</title>
<updated>2026-05-11T22:03:57+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-05-11T10:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=5b3ca87079e7a356ba0036ebb0be0a37def35e38'/>
<id>5b3ca87079e7a356ba0036ebb0be0a37def35e38</id>
<content type='text'>
As cppcheck points out, the 'min' variable in vu_log_queue_fill() can have
its scope reduced.  Do so.

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>
As cppcheck points out, the 'min' variable in vu_log_queue_fill() can have
its scope reduced.  Do so.

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>
</feed>
