* [dpdk-test-report] |WARNING| pw101002 [PATCH] [v2] usertools/telemetry: add list of available file-prefixes
@ 2021-10-11 17:43 dpdklab
0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-10-11 17:43 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
[-- Attachment #1: Type: text/plain, Size: 3982 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/101002
_apply patch failure_
Submitter: Walsh, Conor <conor.walsh@intel.com>
Date: Monday, October 11 2021 09:49:03
Applied on: CommitID:515d20195b17444262a5732831c0615146c7189c
Apply patch set 101002 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:
help='Provide file-prefix for DPDK runtime directory')
parser.add_argument('-i', '--instance', default='0', type=int,
help='Provide file-prefix for DPDK runtime directory')
args = parser.parse_args()
sock_path = os.path.join(get_dpdk_runtime_dir(args.file_prefix), SOCKET_NAME)
if args.instance > 0:
sock_path += ":{}".format(args.instance)
error: patch failed: usertools/dpdk-telemetry.py:147
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 """
+ path = get_dpdk_runtime_dir('')
+ sockets = glob.glob(os.path.join(path, "*", SOCKET_NAME + "*"))
+ prefixes = []
+ if not sockets:
+ print("No DPDK apps with telemetry enabled available")
+ else:
+ print("Valid file-prefixes:\n")
+ 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"]
@@ -147,7 +166,12 @@ def get_dpdk_runtime_dir(fp):
help='Provide file-prefix for DPDK runtime directory')
parser.add_argument('-i', '--instance', default='0', type=int,
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')
args = parser.parse_args()
+if args.list:
+ list_fp()
+ sys.exit(0)
sock_path = os.path.join(get_dpdk_runtime_dir(args.file_prefix), SOCKET_NAME)
if args.instance > 0:
sock_path += ":{}".format(args.instance)
https://lab.dpdk.org/results/dashboard/patchsets/19291/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 17:43 [dpdk-test-report] |WARNING| pw101002 [PATCH] [v2] usertools/telemetry: add list of available file-prefixes dpdklab
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).