patch 'test/cfgfile: avoid temp filename truncation' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:09 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/21ff8f42be45ee8bdc08890898f20983a627c54b
Thanks.
Luca Boccassi
---
>From 21ff8f42be45ee8bdc08890898f20983a627c54b 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
@@ -178,12 +178,8 @@ test_cfgfile_realloc_sections(void)
ret = remove(filename);
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);
TEST_ASSERT_SUCCESS(ret, "Failed to save to %s", filename);
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:45.823968300 +0000
+++ 0067-test-cfgfile-avoid-temp-filename-truncation.patch 2026-02-20 14:55:43.256191956 +0000
@@ -1 +1 @@
-From 356956154480d2906f11ed959b3c62cc0c8649ad Mon Sep 17 00:00:00 2001
+From 21ff8f42be45ee8bdc08890898f20983a627c54b 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