automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: [dpdk-test-report] |WARNING| pw100523 [PATCH] usertools/telemetry: add listing of available file prefixes
Date: Tue,  5 Oct 2021 11:28:39 -0400 (EDT)	[thread overview]
Message-ID: <20211005152839.BA4986D535@noxus.dpdklab.iol.unh.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 4021 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/100523

_apply patch failure_

Submitter: Conor Walsh <conor.walsh@intel.com>
Date: Tuesday, October 05 2021 15:00:17 
Applied on: CommitID:086d426406bd3f6fac96a15bbd871c7fe714bc2d
Apply patch set 100523 failed:

Checking patch usertools/dpdk-telemetry.py...
error: while searching for:
                                                           s.split('.')[-1]))


def handle_socket(args, path):
    """ Connect to socket and handle user input """
    prompt = ''  # this evaluates to false in conditions

error: patch failed: usertools/dpdk-telemetry.py:72
error: while searching for:
        if socks:
            print("\nOther DPDK telemetry sockets found:")
            print_socket_options(args.file_prefix, socks)
        return
    json_reply = read_socket(sock, 1024, prompt)
    output_buf_len = json_reply["max_output_len"]

error: patch failed: usertools/dpdk-telemetry.py:95
Hunk #3 succeeded at 97 (offset -60 lines).
error: while searching for:
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file-prefix', default=DEFAULT_PREFIX,
                    help='Provide file-prefix for DPDK runtime directory')
parser.add_argument('-p', '--pid',
                    help='Connect to DPDK process with the given pid')
args = parser.parse_args()
rd = get_dpdk_runtime_dir(args.file_prefix)
sock_path = os.path.join(rd, SOCKET_NAME)
if args.pid:

error: patch failed: usertools/dpdk-telemetry.py:145
Applying patch usertools/dpdk-telemetry.py with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Hunk #3 applied cleanly.
Rejected hunk #4.
diff a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py	(rejected hunks)
@@ -72,6 +72,31 @@ def print_socket_options(prefix, paths):
                                                            s.split('.')[-1]))
 
 
+def get_dpdk_runtime_dir(fp):
+    """ Using the same logic as in DPDK's EAL, get the DPDK runtime directory
+    based on the file-prefix and user """
+    if (os.getuid() == 0):
+        return os.path.join('/var/run/dpdk', fp)
+    return os.path.join(os.environ.get('XDG_RUNTIME_DIR', '/tmp'), 'dpdk', fp)
+
+
+def list_fp():
+    """ List all available file-prefixes to user """
+    print("Valid file-prefixes:\n")
+    path = get_dpdk_runtime_dir('')
+
+    sockets = glob.glob(os.path.join(path, "*", SOCKET_NAME + "*"))
+    prefixes = []
+    if not sockets:
+        print("\tNo DPDK apps with telemetry enabled available")
+    for s in sockets:
+        prefixes.append(os.path.relpath(os.path.dirname(s), start=path))
+    for p in sorted(set(prefixes)):
+        print(p)
+        print_socket_options(p, glob.glob(os.path.join(path, p,
+                                                       SOCKET_NAME + "*")))
+
+
 def handle_socket(args, path):
     """ Connect to socket and handle user input """
     prompt = ''  # this evaluates to false in conditions
@@ -95,6 +120,8 @@ def handle_socket(args, path):
         if socks:
             print("\nOther DPDK telemetry sockets found:")
             print_socket_options(args.file_prefix, socks)
+        else:
+            list_fp()
         return
     json_reply = read_socket(sock, 1024, prompt)
     output_buf_len = json_reply["max_output_len"]
@@ -145,9 +164,14 @@ def get_dpdk_runtime_dir(fp):
 parser = argparse.ArgumentParser()
 parser.add_argument('-f', '--file-prefix', default=DEFAULT_PREFIX,
                     help='Provide file-prefix for DPDK runtime directory')
+parser.add_argument('-l', '--list', action="store_true", default=False,
+                    help='List all possible file-prefixes and exit')
 parser.add_argument('-p', '--pid',
                     help='Connect to DPDK process with the given pid')
 args = parser.parse_args()
+if args.list:
+    list_fp()
+    sys.exit(0)
 rd = get_dpdk_runtime_dir(args.file_prefix)
 sock_path = os.path.join(rd, SOCKET_NAME)
 if args.pid:

https://lab.dpdk.org/results/dashboard/patchsets/19180/

UNH-IOL DPDK Community Lab

                 reply	other threads:[~2021-10-05 15:28 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=20211005152839.BA4986D535@noxus.dpdklab.iol.unh.edu \
    --to=dpdklab@iol.unh.edu \
    --cc=dpdk-test-reports@iol.unh.edu \
    --cc=test-report@dpdk.org \
    /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).