patch 'test/cfgfile: avoid temp filename truncation' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:21 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b49b181f34410851573bd0c7fe377c9cbaf79e49
Thanks.
Kevin
---
>From b49b181f34410851573bd0c7fe377c9cbaf79e49 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 21 Jan 2026 13:06:25 -0800
Subject: [PATCH] test/cfgfile: avoid temp filename truncation
[ upstream commit 356956154480d2906f11ed959b3c62cc0c8649ad ]
Although, it is not possible on Linux (which always uses /tmp)
the compiler complains about possible snprintf() truncation.
Use existing code to make empty tmp file which puts the
OS specific code in one spot and avoids any races if
two tests are run at once.
Fixes: be22019a58c4 ("test: restore cfgfile tests")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Marat Khalili <marat.khalili at huawei.com>
---
app/test/test_cfgfile.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/app/test/test_cfgfile.c b/app/test/test_cfgfile.c
index b189d9d7a5..eabf155404 100644
--- a/app/test/test_cfgfile.c
+++ b/app/test/test_cfgfile.c
@@ -179,10 +179,6 @@ test_cfgfile_realloc_sections(void)
TEST_ASSERT_SUCCESS(ret, "Failed to remove file");
- char tmp[PATH_MAX] = "/tmp/";
-#ifdef RTE_EXEC_ENV_WINDOWS
- ret = GetTempPathA(sizeof(tmp), tmp);
- TEST_ASSERT(ret > 0, "Failed to get tmp directory");
-#endif
- snprintf(filename, sizeof(filename), "%s%s", tmp, "cfg_save.ini");
+ ret = make_tmp_file(filename, "save", "");
+ TEST_ASSERT(ret == 0, "Failed to make empty tmp filename for save");
ret = rte_cfgfile_save(cfgfile, filename);
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:50.226350420 +0000
+++ 0079-test-cfgfile-avoid-temp-filename-truncation.patch 2026-02-26 10:16:47.011990094 +0000
@@ -1 +1 @@
-From 356956154480d2906f11ed959b3c62cc0c8649ad Mon Sep 17 00:00:00 2001
+From b49b181f34410851573bd0c7fe377c9cbaf79e49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 356956154480d2906f11ed959b3c62cc0c8649ad ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 3a5078fc46..1e56473064 100644
+index b189d9d7a5..eabf155404 100644
More information about the stable
mailing list