DPDK patches and discussions
 help / color / mirror / Atom feed
From: Clemens Famulla-Conrad <cfamullaconrad@suse.com>
To: paul.szczepanek@arm.com
Cc: dev@dpdk.org, Clemens Famulla-Conrad <cfamullaconrad@suse.com>
Subject: [PATCH 1/1] dts: fix deterministic doc
Date: Fri,  6 Jun 2025 11:35:02 +0200	[thread overview]
Message-ID: <20250606093502.31767-1-cfamullaconrad@suse.com> (raw)

Previously, `capture_name` defaulted to a "dynamic" value.
This caused non-deterministic documentation and could lead
to overwriting capture files if the method was called
multiple times within a single Python process.

Bugzilla ID: 1718

Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.com>
---
 .mailmap                                                     | 1 +
 .../traffic_generator/capturing_traffic_generator.py         | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 76f65e5114..cd5362f130 100644
--- a/.mailmap
+++ b/.mailmap
@@ -272,6 +272,7 @@ Cian Ferriter <cian.ferriter@intel.com>
 Ciara Loftus <ciara.loftus@intel.com>
 Ciara Power <ciara.power@intel.com>
 Claire Murphy <claire.k.murphy@intel.com>
+Clemens Famulla-Conrad <cfamullaconrad@suse.com>
 Cody Doucette <doucette@bu.edu>
 Congwen Zhang <zhang.congwen@zte.com.cn>
 Conor Fogarty <conor.fogarty@intel.com>
diff --git a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
index 66a77da9c4..c1e4a898d4 100644
--- a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
+++ b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
@@ -70,7 +70,7 @@ def send_packets_and_capture(
         receive_port: Port,
         filter_config: PacketFilteringConfig,
         duration: float,
-        capture_name: str = _get_default_capture_name(),
+        capture_name: str = None,
     ) -> list[Packet]:
         """Send `packets` and capture received traffic.
 
@@ -104,6 +104,9 @@ def send_packets_and_capture(
             duration,
         )
 
+        if capture_name is None:
+            capture_name = _get_default_capture_name()
+
         self._logger.debug(f"Received packets: {get_packet_summaries(received_packets)}")
         self._write_capture_from_packets(capture_name, received_packets)
         return received_packets
-- 
2.43.0


                 reply	other threads:[~2025-06-06  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250606093502.31767-1-cfamullaconrad@suse.com \
    --to=cfamullaconrad@suse.com \
    --cc=dev@dpdk.org \
    --cc=paul.szczepanek@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).