From: Sebastien GODARD Date: Fri, 6 Dec 2019 15:44:19 +0000 (+0100) Subject: cifsiostat: Add SMB2 non regression test X-Git-Tag: v12.3.1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=770e7a59ca8ca7befdbe4ed22800b94d7308e1ce;p=sysstat cifsiostat: Add SMB2 non regression test Test cifsiostat output using /proc/fs/cifs/Stats file with SMB2 format. Signed-off-by: Sebastien GODARD --- diff --git a/tests/04550 b/tests/04550 new file mode 100644 index 0000000..0b60ed4 --- /dev/null +++ b/tests/04550 @@ -0,0 +1,3 @@ +rm -f tests/root +ln -s root4 tests/root +LC_ALL=C TZ=GMT ./cifsiostat 1 2 > tests/out.cifsiostat-SMB2.tmp diff --git a/tests/04555 b/tests/04555 new file mode 100644 index 0000000..cb3a465 --- /dev/null +++ b/tests/04555 @@ -0,0 +1 @@ +diff -u tests/out.cifsiostat-SMB2.tmp tests/expected.cifsiostat-SMB2 diff --git a/tests/TLIST b/tests/TLIST index 82be645..cf91529 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -484,6 +484,8 @@ NOTES: 04535 diff -u tests/out.cifsiostat-h.tmp tests/expected.cifsiostat-h 04540 LC_ALL=C TZ=GMT ./cifsiostat --dec=0 1 3 > tests/out.cifsiostat-dec.tmp 04545 diff -u tests/out.cifsiostat-dec.tmp tests/expected.cifsiostat-dec +04550 LC_ALL=C TZ=GMT ./cifsiostat 1 2 > tests/out.cifsiostat-SMB2.tmp +04555 diff -u tests/out.cifsiostat-SMB2.tmp tests/expected.cifsiostat-SMB2 ===== Test cifsiostat error cases 04600 LC_ALL=C ./cifsiostat -1 2>&1 | grep "Usage:" >/dev/null diff --git a/tests/expected.cifsiostat-SMB2 b/tests/expected.cifsiostat-SMB2 new file mode 100644 index 0000000..16160de --- /dev/null +++ b/tests/expected.cifsiostat-SMB2 @@ -0,0 +1,10 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) + +Filesystem rB/s wB/s rops/s wops/s fo/s fc/s fd/s +\\addr\SHARED 0.03 0.01 0.00 0.00 0.00 0.32 0.00 +\\server\name1 0.00 0.00 0.00 0.00 0.00 0.03 0.00 + +Filesystem rB/s wB/s rops/s wops/s fo/s fc/s fd/s +\\addr\SHARED 4.47 0.00 0.04 0.00 0.00 0.00 0.40 +\\server\name1 40.20 22.33 0.45 0.71 0.18 1.79 0.00 + diff --git a/tests/root.README b/tests/root.README index 616cf0d..cc20879 100644 --- a/tests/root.README +++ b/tests/root.README @@ -43,10 +43,14 @@ enp6s1, wlp5s1: registered /sys/class/fc_host host2: registered +CIFS SMB1 and SMB2 statistics available + ==========root5: /proc/stat CPU#6: online +CIFS SMB1 and SMB2 statistics available + ==========root6: /proc/stat #CPU: 8 > 10 diff --git a/tests/root1/proc/fs/cifs/Stats b/tests/root1/proc/fs/cifs/Stats index 8c23661..b02c977 100644 --- a/tests/root1/proc/fs/cifs/Stats +++ b/tests/root1/proc/fs/cifs/Stats @@ -14,7 +14,7 @@ Reads: 2 Bytes: 196 Writes: 0 Bytes: 0 Flushes: 0 Locks: 0 HardLinks: 0 Symlinks: 0 -Opens: 6 Closes: 6Deletes: 0 +Opens: 6 Closes: 6 Deletes: 0 Mkdirs: 0 Rmdirs: 0 Renames: 0 T2 Renames 0 FindFirst: 5 FNext 0 FClose 0 diff --git a/tests/root4/proc/fs/cifs/Stats b/tests/root4/proc/fs/cifs/Stats new file mode 100644 index 0000000..b2e376d --- /dev/null +++ b/tests/root4/proc/fs/cifs/Stats @@ -0,0 +1,38 @@ +Resources in use +CIFS Session: 1 +Share (unique mount targets): 1 +SMB Request/Response Buffer: 1 Pool size: 5 +SMB Small Req/Resp Buffer: 1 Pool size: 30 +Operations (MIDs): 0 + +75 session 1 share reconnects +Total vfs operations: 85 maximum at one time: 2 + +1) \\addr\SHARED +SMBs: 40 Oplock Breaks: 0 +Reads: 2 Bytes: 196 +Writes: 6 Bytes: 56 +Flushes: 0 +Locks: 0 HardLinks: 0 Symlinks: 0 +Opens: 6 Closes: 2346 Deletes: 0 +Mkdirs: 0 Rmdirs: 0 +Renames: 0 T2 Renames 0 +FindFirst: 5 FNext 0 FClose 0 +2) \\server\name1 +SMBs: 20 +Bytes read: 17 Bytes written: 14 +Open files: 2 total (local), 2 open on server +TreeConnects: 0 sent 0 failed +TreeDisconnects: 0 sent 0 failed +Creates: 0 sent 2 failed +Closes: 200 sent 0 failed +Flushes: 0 sent 0 failed +Reads: 5 sent 1 failed +Writes: 13 sent 21 failed +Locks: 0 sent 0 failed +IOCTLs: 0 sent 0 failed +QueryDirectories: 0 sent 0 failed +ChangeNotifies: 0 sent 0 failed +QueryInfos: 0 sent 0 failed +SetInfos: 0 sent 0 failed +OplockBreaks: 0 sent 0 failed diff --git a/tests/root5/proc/fs/cifs/Stats b/tests/root5/proc/fs/cifs/Stats new file mode 100644 index 0000000..a75b431 --- /dev/null +++ b/tests/root5/proc/fs/cifs/Stats @@ -0,0 +1,38 @@ +Resources in use +CIFS Session: 1 +Share (unique mount targets): 1 +SMB Request/Response Buffer: 1 Pool size: 5 +SMB Small Req/Resp Buffer: 1 Pool size: 30 +Operations (MIDs): 0 + +75 session 1 share reconnects +Total vfs operations: 85 maximum at one time: 2 + +1) \\addr\SHARED +SMBs: 40 Oplock Breaks: 0 +Reads: 3 Bytes: 296 +Writes: 6 Bytes: 56 +Flushes: 0 +Locks: 0 HardLinks: 0 Symlinks: 0 +Opens: 6 Closes: 2346 Deletes: 9 +Mkdirs: 0 Rmdirs: 0 +Renames: 0 T2 Renames 0 +FindFirst: 5 FNext 0 FClose 0 +2) \\server\name1 +SMBs: 20 +Bytes read: 917 Bytes written: 514 +Open files: 3 total (local), 5 open on server +TreeConnects: 0 sent 0 failed +TreeDisconnects: 0 sent 0 failed +Creates: 0 sent 2 failed +Closes: 240 sent 0 failed +Flushes: 0 sent 0 failed +Reads: 15 sent 1 failed +Writes: 29 sent 21 failed +Locks: 0 sent 0 failed +IOCTLs: 0 sent 0 failed +QueryDirectories: 0 sent 0 failed +ChangeNotifies: 0 sent 0 failed +QueryInfos: 0 sent 0 failed +SetInfos: 0 sent 0 failed +OplockBreaks: 0 sent 0 failed