* [Devel] [PATCH vz10] selftests: ve_printk: match the conntrack overflow message
@ 2026-08-21 15:32 Eva Kurchatova
2026-08-24 14:53 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
0 siblings, 1 reply; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-21 15:32 UTC (permalink / raw)
The kernel prints "VE0: nf_conntrack table full in netns 4026533915,
dropping packet" while the test looks for "nf_conntrack table full,
dropping packet", so ve_log_both never counted a single message and
failed even when the container produced all ten of them.
https://virtuozzo.atlassian.net/browse/VSTOR-139673
Feature: fix vz selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/ve_printk/ve_printk_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/ve_printk/ve_printk_test.c b/tools/testing/selftests/ve_printk/ve_printk_test.c
index 2df672d75e00..b33a77ecd488 100644
--- a/tools/testing/selftests/ve_printk/ve_printk_test.c
+++ b/tools/testing/selftests/ve_printk/ve_printk_test.c
@@ -286,7 +286,7 @@ int ve_printk_test_logboth(void)
ret = TEST_RATELIMIT_BURST;
/* verify that only 10 records were added */
while (fgets(buf, sizeof(buf), pdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret--;
}
}
@@ -635,7 +635,7 @@ TEST_F(ve_printk, ve_log_both)
ASSERT_EQ(ret, 0);
while (fgets(buf, sizeof(buf), fdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret++;
}
}
--
2.55.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Devel] [PATCH vz10 v2] selftests: ve_printk: match the conntrack overflow message
2026-08-21 15:32 [Devel] [PATCH vz10] selftests: ve_printk: match the conntrack overflow message Eva Kurchatova
@ 2026-08-24 14:53 ` Konstantin Khorenko
2026-08-24 14:54 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 14:53 UTC (permalink / raw)
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
The kernel prints
VE%s: nf_conntrack table full in netns %u, dropping packet
while the test looks for "nf_conntrack table full, dropping packet".
The "in netns %u" part sits between the two halves the test expects to
be adjacent, so strstr() never matched: ve_log_both counted zero
messages and failed even when the container produced all ten of them.
Match the part of the message which carries no netns number, and drop
the stale quote from the comment above the test.
Fixes: d5ec8836f50d ("tests: add ve_printk selftest")
https://virtuozzo.atlassian.net/browse/VSTOR-139673
Feature: fix vz selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
Changes in v2:
- fix the stale quote in the comment above ve_log_both as well. It
still spelled out the message the test used to look for, which is
exactly what would mislead the next reader.
- add a Fixes: tag. The kernel message has carried "in netns %u"
since 2015, so the test has been looking for a string that never
existed rather than falling behind a later kernel change.
- commit message: quote the kernel format string instead of a made up
log line with a VE0 prefix. Inside the test the message is emitted
for the container's netns, so the prefix is the container, not VE0.
tools/testing/selftests/ve_printk/ve_printk_test.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/ve_printk/ve_printk_test.c b/tools/testing/selftests/ve_printk/ve_printk_test.c
index 2df672d75e00..020df691e5d5 100644
--- a/tools/testing/selftests/ve_printk/ve_printk_test.c
+++ b/tools/testing/selftests/ve_printk/ve_printk_test.c
@@ -286,7 +286,7 @@ int ve_printk_test_logboth(void)
ret = TEST_RATELIMIT_BURST;
/* verify that only 10 records were added */
while (fgets(buf, sizeof(buf), pdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret--;
}
}
@@ -614,10 +614,10 @@ TEST_F(ve_printk, ve0_log)
* Test verifies net_veboth_ratelimited function which logs messages simultaneously
* to both the container (VE_LOG) and VE0 (VE0_LOG), but with ratelimit throttling.
* Inside the container, a small conntrack table (size 2) is configured, then many ping
- * packets are sent, causing table overflow and generation of "nf_conntrack table full,
- * dropping packet" messages. The test verifies that exactly TEST_RATELIMIT_BURST (10)
- * messages appeared on the host - ratelimit should limit the number of messages even
- * if more were generated.
+ * packets are sent, causing table overflow and generation of "nf_conntrack table
+ * full in netns N, dropping packet" messages. The test verifies that exactly
+ * TEST_RATELIMIT_BURST (10) messages appeared on the host - ratelimit should
+ * limit the number of messages even if more were generated.
*/
TEST_F(ve_printk, ve_log_both)
{
@@ -635,7 +635,7 @@ TEST_F(ve_printk, ve_log_both)
ASSERT_EQ(ret, 0);
while (fgets(buf, sizeof(buf), fdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret++;
}
}
--
2.47.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Devel] [PATCH RHEL10 COMMIT] selftests: ve_printk: match the conntrack overflow message
2026-08-24 14:53 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
@ 2026-08-24 14:54 ` Konstantin Khorenko
0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 14:54 UTC (permalink / raw)
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.8.vz10
------>
commit b8602e1ad08847d26d25dbf1426cf1247ef24c26
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Date: Fri Aug 21 18:32:21 2026 +0300
selftests: ve_printk: match the conntrack overflow message
The kernel prints
VE%s: nf_conntrack table full in netns %u, dropping packet
while the test looks for "nf_conntrack table full, dropping packet".
The "in netns %u" part sits between the two halves the test expects to
be adjacent, so strstr() never matched: ve_log_both counted zero
messages and failed even when the container produced all ten of them.
Match the part of the message which carries no netns number, and drop
the stale quote from the comment above the test.
Fixes: d5ec8836f50d ("tests: add ve_printk selftest")
https://virtuozzo.atlassian.net/browse/VSTOR-139673
Feature: fix vz selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/ve_printk/ve_printk_test.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/ve_printk/ve_printk_test.c b/tools/testing/selftests/ve_printk/ve_printk_test.c
index 2df672d75e00..020df691e5d5 100644
--- a/tools/testing/selftests/ve_printk/ve_printk_test.c
+++ b/tools/testing/selftests/ve_printk/ve_printk_test.c
@@ -286,7 +286,7 @@ int ve_printk_test_logboth(void)
ret = TEST_RATELIMIT_BURST;
/* verify that only 10 records were added */
while (fgets(buf, sizeof(buf), pdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret--;
}
}
@@ -614,10 +614,10 @@ TEST_F(ve_printk, ve0_log)
* Test verifies net_veboth_ratelimited function which logs messages simultaneously
* to both the container (VE_LOG) and VE0 (VE0_LOG), but with ratelimit throttling.
* Inside the container, a small conntrack table (size 2) is configured, then many ping
- * packets are sent, causing table overflow and generation of "nf_conntrack table full,
- * dropping packet" messages. The test verifies that exactly TEST_RATELIMIT_BURST (10)
- * messages appeared on the host - ratelimit should limit the number of messages even
- * if more were generated.
+ * packets are sent, causing table overflow and generation of "nf_conntrack table
+ * full in netns N, dropping packet" messages. The test verifies that exactly
+ * TEST_RATELIMIT_BURST (10) messages appeared on the host - ratelimit should
+ * limit the number of messages even if more were generated.
*/
TEST_F(ve_printk, ve_log_both)
{
@@ -635,7 +635,7 @@ TEST_F(ve_printk, ve_log_both)
ASSERT_EQ(ret, 0);
while (fgets(buf, sizeof(buf), fdmesg)) {
- if (strstr(buf, "nf_conntrack table full, dropping packet")) {
+ if (strstr(buf, "nf_conntrack table full")) {
ret++;
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-24 14:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 15:32 [Devel] [PATCH vz10] selftests: ve_printk: match the conntrack overflow message Eva Kurchatova
2026-08-24 14:53 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
2026-08-24 14:54 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.