From 765e6f3a1b995713787db177804cf5f78103378a Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 4 Dec 2022 14:12:08 +0100 Subject: [PATCH] Add test.cases.LsofUds Signed-off-by: Jan Lindemann --- src/python/devtest/os/test/cases/LsofUds.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/python/devtest/os/test/cases/LsofUds.py diff --git a/src/python/devtest/os/test/cases/LsofUds.py b/src/python/devtest/os/test/cases/LsofUds.py new file mode 100644 index 0000000..3ae63cd --- /dev/null +++ b/src/python/devtest/os/test/cases/LsofUds.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from ..ListCmd import ListCmd + +class LsofUds(ListCmd): # export + + def _row_info(self): + return ( + r'lsof +c 15 -U', + # COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME + # systemd 1 root 45u unix 0xeeb45200 0t0 9856 /run/systemd/journal/stdout type=STREAM + "^ *(\S+) +([0-9]+) +(\S+) +(\S+) +(\S+) +(0x[0-9a-f]+) +(\S+) +([0-9]+) +(\S+) +type=(\S+)", + [ 'cmd', 'pid', 'user','fd', 'type', 'device', 'size/off','node', 'path', 'socktype' ], + [ 'cmd', 'user', 'path', 'socktype' ], + [ 'cmd', 'path' ], + )