]> granicus.if.org Git - sysstat/commitdiff
cifsiostat: Add SMB2 non regression test
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 6 Dec 2019 15:44:19 +0000 (16:44 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 6 Dec 2019 15:44:19 +0000 (16:44 +0100)
Test cifsiostat output using /proc/fs/cifs/Stats file with SMB2 format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/04550 [new file with mode: 0644]
tests/04555 [new file with mode: 0644]
tests/TLIST
tests/expected.cifsiostat-SMB2 [new file with mode: 0644]
tests/root.README
tests/root1/proc/fs/cifs/Stats
tests/root4/proc/fs/cifs/Stats [new file with mode: 0644]
tests/root5/proc/fs/cifs/Stats [new file with mode: 0644]

diff --git a/tests/04550 b/tests/04550
new file mode 100644 (file)
index 0000000..0b60ed4
--- /dev/null
@@ -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 (file)
index 0000000..cb3a465
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.cifsiostat-SMB2.tmp tests/expected.cifsiostat-SMB2
index 82be645ebc37419cd50bc424692e40c1d6eff6c5..cf9152993dd68fee5499146ed497ac7be07b4173 100644 (file)
@@ -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 (file)
index 0000000..16160de
--- /dev/null
@@ -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
+
index 616cf0d45f0a100c893b52561f0fad098a68190a..cc208796f31cb40ec20734f108a5b20ee1ea5f95 100644 (file)
@@ -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
index 8c23661e24f4672f3c595509d7b06494fa151e79..b02c97715d78dcf4dc7299ca703a49601ff77594 100644 (file)
@@ -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 (file)
index 0000000..b2e376d
--- /dev/null
@@ -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 (file)
index 0000000..a75b431
--- /dev/null
@@ -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