DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Wilks <thomas.wilks@arm.com>
To: dev@dpdk.org
Cc: Paul Szczepanek <paul.szczepanek@arm.com>,
	Luca Vizzarro <luca.vizzarro@arm.com>,
	Patrick Robb <probb@iol.unh.edu>,
	Thomas Wilks <thomas.wilks@arm.com>,
	Paul Szczepanek <Paul.Szczepanek@arm.com>
Subject: [PATCH 1/2] dts: add remote create dir function
Date: Tue, 15 Apr 2025 14:09:02 +0100	[thread overview]
Message-ID: <20250415130903.224858-2-thomas.wilks@arm.com> (raw)
In-Reply-To: <20250415130903.224858-1-thomas.wilks@arm.com>

Add a function that creates a directory on the
remote.

Signed-off-by: Thomas Wilks <thomas.wilks@arm.com>
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <Paul.Szczepanek@arm.com>
---
 dts/framework/testbed_model/os_session.py    | 4 ++++
 dts/framework/testbed_model/posix_session.py | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/dts/framework/testbed_model/os_session.py b/dts/framework/testbed_model/os_session.py
index 354c607357..2be4f78ac0 100644
--- a/dts/framework/testbed_model/os_session.py
+++ b/dts/framework/testbed_model/os_session.py
@@ -360,6 +360,10 @@ def create_remote_tarball(
             The path to the created tarball on the remote node.
         """
 
+    @abstractmethod
+    def create_directory(self, path: PurePath) -> None:
+        """Create a directory at a specified `path`."""
+
     @abstractmethod
     def extract_remote_tarball(
         self,
diff --git a/dts/framework/testbed_model/posix_session.py b/dts/framework/testbed_model/posix_session.py
index 2d2701e1cf..57d58030b4 100644
--- a/dts/framework/testbed_model/posix_session.py
+++ b/dts/framework/testbed_model/posix_session.py
@@ -195,6 +195,10 @@ def generate_tar_exclude_args(exclude_patterns) -> str:
 
         return target_tarball_path
 
+    def create_directory(self, path: PurePath) -> None:
+        """Overrides :meth:`~.os_session.OSSession.create_directory`."""
+        self.send_command(f"mkdir -p {path}")
+
     def extract_remote_tarball(
         self,
         remote_tarball_path: str | PurePath,
-- 
2.43.0


  reply	other threads:[~2025-04-15 13:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 13:09 [PATCH 0/2] dts: use tmp dir and DPDK tree dir Thomas Wilks
2025-04-15 13:09 ` Thomas Wilks [this message]
2025-04-15 13:09 ` [PATCH 2/2] " Thomas Wilks
2025-04-17 11:46 ` [PATCH 0/2] " Thomas Wilks

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=20250415130903.224858-2-thomas.wilks@arm.com \
    --to=thomas.wilks@arm.com \
    --cc=dev@dpdk.org \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    /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).