]> granicus.if.org Git - sysstat/commitdiff
simtest: Add more iostat non regression tests
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 23 Jun 2019 12:27:51 +0000 (14:27 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 23 Jun 2019 12:27:51 +0000 (14:27 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
36 files changed:
ioconf.c
systest.c
systest.h
tests/02610 [new file with mode: 0644]
tests/02615 [new file with mode: 0644]
tests/02620 [new file with mode: 0644]
tests/02625 [new file with mode: 0644]
tests/02630 [new file with mode: 0644]
tests/02635 [new file with mode: 0644]
tests/02640 [new file with mode: 0644]
tests/02645 [new file with mode: 0644]
tests/TLIST
tests/expected.iostat-ALL
tests/expected.iostat-ALL-p-ALL
tests/expected.iostat-N [new file with mode: 0644]
tests/expected.iostat-h [new file with mode: 0644]
tests/expected.iostat-human [new file with mode: 0644]
tests/expected.iostat-jID
tests/expected.iostat-jLABEL
tests/expected.iostat-jPARTUUID
tests/expected.iostat-jPATH
tests/expected.iostat-kz [new file with mode: 0644]
tests/expected.iostat-p-ALL
tests/expected.iostat-s-ALL
tests/expected.iostat-s-ALL-p-ALL
tests/expected.iostat-s-list-p
tests/expected.iostat-x-ALL
tests/expected.iostat-x-ALL-p-ALL
tests/expected.iostat-x-p-ALL
tests/expected.sadf-H
tests/expected.sadf-r
tests/root.README
tests/root1/dev/dm-2 [new file with mode: 0644]
tests/root1/dev/mapper/virtualhd [new symlink]
tests/root1/proc/diskstats
tests/root1/sys/block/dm-2/device/_void [new file with mode: 0644]

index 940b0c58dc72a8c71b92c867d9cbe215cacd1fc3..58b12065799b3b83803cda7e8358af670686ebf6 100644 (file)
--- a/ioconf.c
+++ b/ioconf.c
@@ -513,7 +513,7 @@ char *transform_devmapname(unsigned int major, unsigned int minor)
                snprintf(filen, MAX_FILE_LEN, "%s/%s", DEVMAP_DIR, dp->d_name);
                filen[MAX_FILE_LEN - 1] = '\0';
 
-               if (stat(filen, &aux) == 0) {
+               if (__stat(filen, &aux) == 0) {
                        /* Get its minor and major numbers */
 
                        dm_major = major(aux.st_rdev);
index 9b1a6edefedeba9c91b02d26ea3e7f00d7b7764f..bfb44f1ea401b84b9de5902d22e0ba40d9feebe1 100644 (file)
--- a/systest.c
+++ b/systest.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
+#include <sys/stat.h>
 #include <sys/utsname.h>
 #include <sys/statvfs.h>
 
@@ -45,7 +46,6 @@ extern int sigint_caught;
  * @t  Number of seconds since the epoch, as given on the command line.
  ***************************************************************************
  */
-
 void get_unix_time(time_t *t)
 {
        *t = __unix_time;
@@ -59,7 +59,6 @@ void get_unix_time(time_t *t)
  * @h  Structure with kernel information.
  ***************************************************************************
  */
-
 void get_uname(struct utsname *h)
 {
        strcpy(h->sysname, "Linux");
@@ -76,7 +75,6 @@ void get_uname(struct utsname *h)
  * @buf        Structure with filesystem information.
  ***************************************************************************
  */
-
 int get_fs_stat(char *c, struct statvfs *buf)
 {
        static int p = 0;
@@ -103,7 +101,6 @@ int get_fs_stat(char *c, struct statvfs *buf)
  * Test mode: Ignore environment variable value.
  ***************************************************************************
  */
-
 char *get_env_value(char *c)
 {
        return NULL;
@@ -114,7 +111,6 @@ char *get_env_value(char *c)
  * Test mode: Go to next time period.
  ***************************************************************************
  */
-
 void next_time_step(void)
 {
        static int root_nr = 1;
@@ -143,5 +139,31 @@ void next_time_step(void)
        }
 }
 
+/*
+ ***************************************************************************
+ * If current file is considered as a virtual one ("virtualhd"), then set
+ * its device ID (major 253, minor 2, corresponding here to dm-2) in the
+ * stat structure normally filled by the stat() system call.
+ *
+ * IN:
+ * @name       Pathname to file.
+ *
+ * OUT:
+ * @statbuf    Structure containing device ID.
+ *
+ * RETURNS:
+ * 0 if it actually was the virtual device, 1 otherwise.
+ ***************************************************************************
+ */
+int virtual_stat(const char *name, struct stat *statbuf)
+{
+       if (!strcmp(name, VIRTUALHD)) {
+               statbuf->st_rdev = (253 << 8) + 2;
+               return 0;
+       }
+
+       return 1;
+}
+
 #endif /* TEST */
 
index 0fa1a45a6e56a5bd05be363cb223082999e69110..b9b2f77b94dc756bd35a7953b42a74c6a03b8536 100644 (file)
--- a/systest.h
+++ b/systest.h
 #define PRE            "./tests/root"
 #define __time(m)      get_unix_time(m)
 #define __uname(m)     get_uname(m)
-#define __statvfs(m, n)        get_fs_stat(m, n)
+#define __statvfs(m,n) get_fs_stat(m,n)
 #define __getenv(m)    get_env_value(m)
 #define __alarm(m)
 #define __pause()      next_time_step()
+#define __stat(m,n)    virtual_stat(m,n)
 
 #define ROOTDIR                "./tests/root"
 #define ROOTFILE       "root"
 #define TESTDIR                "./tests"
+#define VIRTUALHD      "./tests/root/dev/mapper/virtualhd"
 
 #else
 
 
 #define __time(m)      time(m)
 #define __uname(m)     uname(m)
-#define __statvfs(m, n)        statvfs(m, n)
+#define __statvfs(m,n) statvfs(m,n)
 #define __getenv(m)    getenv(m)
 #define __alarm(m)     alarm(m)
 #define __pause()      pause()
+#define __stat(m,n)    stat(m,n)
 
 #endif
 
@@ -55,6 +58,8 @@ void get_unix_time
        (time_t *);
 void next_time_step
        (void);
+int virtual_stat
+       (const char *, struct stat *);
 
 void int_handler
        (int);
diff --git a/tests/02610 b/tests/02610
new file mode 100644 (file)
index 0000000..c54de91
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C ./iostat --human > tests/out.iostat-human.tmp
diff --git a/tests/02615 b/tests/02615
new file mode 100644 (file)
index 0000000..d2e3cbd
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.iostat-human.tmp tests/expected.iostat-human
diff --git a/tests/02620 b/tests/02620
new file mode 100644 (file)
index 0000000..8036803
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C ./iostat -dh -p ALL > tests/out.iostat-h.tmp
diff --git a/tests/02625 b/tests/02625
new file mode 100644 (file)
index 0000000..b17f2cd
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.iostat-h.tmp tests/expected.iostat-h
diff --git a/tests/02630 b/tests/02630
new file mode 100644 (file)
index 0000000..a1e5ab6
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C ./iostat -kz -p ALL 1 2 > tests/out.iostat-kz.tmp
diff --git a/tests/02635 b/tests/02635
new file mode 100644 (file)
index 0000000..3bb25ca
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.iostat-kz.tmp tests/expected.iostat-kz
diff --git a/tests/02640 b/tests/02640
new file mode 100644 (file)
index 0000000..f9e738b
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C ./iostat -dN -p ALL > tests/out.iostat-N.tmp
diff --git a/tests/02645 b/tests/02645
new file mode 100644 (file)
index 0000000..f8b914c
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.iostat-N.tmp tests/expected.iostat-N
index 867d52c306a81d5ebe7f49d81dff54bec40084a6..2948e313e753580a554b5cf12459eddfdae0cc24 100644 (file)
 =====  Playing again with iostat
 02600  LC_ALL=C ./iostat -ym 1 2 > tests/out.iostat-ym.tmp
 02605  diff -u tests/out.iostat-ym.tmp tests/expected.iostat-ym
+02610  LC_ALL=C ./iostat --human > tests/out.iostat-human.tmp
+02615  diff -u tests/out.iostat-human.tmp tests/expected.iostat-human
+02620  LC_ALL=C ./iostat -dh -p ALL > tests/out.iostat-h.tmp
+02625  diff -u tests/out.iostat-h.tmp tests/expected.iostat-h
+02630  LC_ALL=C ./iostat -kz -p ALL 1 2 > tests/out.iostat-kz.tmp
+02635  diff -u tests/out.iostat-kz.tmp tests/expected.iostat-kz
+02640  LC_ALL=C ./iostat -dN -p ALL > tests/out.iostat-N.tmp
+02645  diff -u tests/out.iostat-N.tmp tests/expected.iostat-N
index 78266bd364e9fb5770808c6cf780a9a3da6bec4a..46d79c33990507551be5ad5b6c15ec46b003d2ed 100644 (file)
@@ -10,6 +10,7 @@ sdb               0.01         0.29         0.00         0.00       2108
 sde               0.00         0.00         0.00         0.00          0          0          0
 sdc               0.00         0.00         0.00         0.00          0          0          0
 sdd               0.00         0.00         0.00         0.00          0          0          0
+dm-2              0.00         0.00         0.00         0.00          0          0          0
 
 
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
index fe054ef17763b1207ea40c2fd09b4b88adeba036..148ed8596e3141e62eea883f5cd1e9fdfbb9343b 100644 (file)
@@ -19,6 +19,7 @@ sdb               0.01         0.29         0.00         0.00       2108
 sde               0.00         0.00         0.00         0.00          0          0          0
 sdc               0.00         0.00         0.00         0.00          0          0          0
 sdd               0.00         0.00         0.00         0.00          0          0          0
+dm-2              0.00         0.00         0.00         0.00          0          0          0
 
 
 Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
diff --git a/tests/expected.iostat-N b/tests/expected.iostat-N
new file mode 100644 (file)
index 0000000..ebf5c49
--- /dev/null
@@ -0,0 +1,24 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (8 CPU)
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+sda               8.59       222.14        57.08         0.00    1597749     410544          0
+sda1              0.01         0.29         0.00         0.00       2108          0          0
+sda2              0.01         0.29         0.00         0.00       2092          0          0
+sda3              0.01         0.29         0.00         0.00       2100          0          0
+sda4              0.00         0.00         0.00         0.00         14          0          0
+sda5              0.01         0.31         0.00         0.00       2252          0          0
+sda6              0.02         0.62         0.00         0.00       4424         12          0
+sda7              0.02         0.62         0.00         0.00       4437         12          0
+sda8              0.01         0.34         0.00         0.00       2444          0          0
+sda9              6.60       193.17        19.89         0.00    1389369     143040          0
+sda10             0.01         0.31         0.00         0.00       2220          0          0
+sda11             0.01         0.31         0.00         0.00       2252          0          0
+sda12             1.88        25.28        37.19         0.00     181825     267480          0
+scd0              0.00         0.00         0.00         0.00          0          0          0
+sdb               0.01         0.29         0.00         0.00       2108          0          0
+sde               0.00         0.00         0.00         0.00          0          0          0
+sdc               0.00         0.00         0.00         0.00          0          0          0
+sdd               0.00         0.00         0.00         0.00          0          0          0
+virtualhd         0.00         0.00         0.00         0.00          0          0          0
+
+
diff --git a/tests/expected.iostat-h b/tests/expected.iostat-h
new file mode 100644 (file)
index 0000000..ddcc07b
--- /dev/null
@@ -0,0 +1,24 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (8 CPU)
+
+      tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd Device
+     8.59       222.1k        57.1k         0.0k       1.5G     400.9M       0.0k sda
+     0.01         0.3k         0.0k         0.0k       2.1M       0.0k       0.0k sda1
+     0.01         0.3k         0.0k         0.0k       2.0M       0.0k       0.0k sda2
+     0.01         0.3k         0.0k         0.0k       2.1M       0.0k       0.0k sda3
+     0.00         0.0k         0.0k         0.0k      14.0k       0.0k       0.0k sda4
+     0.01         0.3k         0.0k         0.0k       2.2M       0.0k       0.0k sda5
+     0.02         0.6k         0.0k         0.0k       4.3M      12.0k       0.0k sda6
+     0.02         0.6k         0.0k         0.0k       4.3M      12.0k       0.0k sda7
+     0.01         0.3k         0.0k         0.0k       2.4M       0.0k       0.0k sda8
+     6.60       193.2k        19.9k         0.0k       1.3G     139.7M       0.0k sda9
+     0.01         0.3k         0.0k         0.0k       2.2M       0.0k       0.0k sda10
+     0.01         0.3k         0.0k         0.0k       2.2M       0.0k       0.0k sda11
+     1.88        25.3k        37.2k         0.0k     177.6M     261.2M       0.0k sda12
+     0.00         0.0k         0.0k         0.0k       0.0k       0.0k       0.0k scd0
+     0.01         0.3k         0.0k         0.0k       2.1M       0.0k       0.0k sdb
+     0.00         0.0k         0.0k         0.0k       0.0k       0.0k       0.0k sde
+     0.00         0.0k         0.0k         0.0k       0.0k       0.0k       0.0k sdc
+     0.00         0.0k         0.0k         0.0k       0.0k       0.0k       0.0k sdd
+     0.00         0.0k         0.0k         0.0k       0.0k       0.0k       0.0k dm-2
+
+
diff --git a/tests/expected.iostat-human b/tests/expected.iostat-human
new file mode 100644 (file)
index 0000000..290d7c4
--- /dev/null
@@ -0,0 +1,10 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (8 CPU)
+
+avg-cpu:  %user   %nice %system %iowait  %steal   %idle
+           1.6%   44.9%    1.8%    1.0%    0.0%   50.6%
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+sda               8.59       222.1k        57.1k         0.0k       1.5G     400.9M       0.0k
+sdb               0.01         0.3k         0.0k         0.0k       2.1M       0.0k       0.0k
+
+
index 65bd5b85a08cda5a4c611c943bdd1d9929595287..618c7fd42f4bead8c3b1608c8a02480425394a95 100644 (file)
@@ -19,5 +19,6 @@ Linux 1.2.3-TEST (SYSSTAT.TEST)       01/01/70        _x86_64_        (8 CPU)
      0.00         0.00         0.00         0.00          0          0          0 usb-Generic-_MS_MS-Pro_058F63626476-0:3
      0.00         0.00         0.00         0.00          0          0          0 usb-Generic-_Compact_Flash_058F63626476-0:1
      0.00         0.00         0.00         0.00          0          0          0 usb-Generic-_SM_xD-Picture_058F63626476-0:2
+     0.00         0.00         0.00         0.00          0          0          0 dm-2
 
 
index 220b662afdf40a693cd41f2f68bdca8f6ab8f1e8..5988b8c489947efdff1c045283960018888a416c 100644 (file)
@@ -19,5 +19,6 @@ Linux 1.2.3-TEST (SYSSTAT.TEST)       01/01/70        _x86_64_        (8 CPU)
      0.00         0.00         0.00         0.00          0          0          0 sde
      0.00         0.00         0.00         0.00          0          0          0 sdc
      0.00         0.00         0.00         0.00          0          0          0 sdd
+     0.00         0.00         0.00         0.00          0          0          0 dm-2
 
 
index c1875a8cdd422132eda9bf75c18e1029901dacb7..81d961539b1870462a1eaec02a24fbeb0eca5b51 100644 (file)
@@ -19,5 +19,6 @@ Linux 1.2.3-TEST (SYSSTAT.TEST)       01/01/70        _x86_64_        (8 CPU)
      0.00         0.00         0.00         0.00          0          0          0 sde
      0.00         0.00         0.00         0.00          0          0          0 sdc
      0.00         0.00         0.00         0.00          0          0          0 sdd
+     0.00         0.00         0.00         0.00          0          0          0 dm-2
 
 
index ef7d4a99f1b04348cea4fe69e903f8f6a31ba655..53ac74b67cbdbf6fc11bc25ba8aebf40b6ba95c7 100644 (file)
@@ -19,5 +19,6 @@ Linux 1.2.3-TEST (SYSSTAT.TEST)       01/01/70        _x86_64_        (8 CPU)
      0.00         0.00         0.00         0.00          0          0          0 pci-0000:00:1d.0-usb-0:1.7:1.0-scsi-0:0:0:3
      0.00         0.00         0.00         0.00          0          0          0 pci-0000:00:1d.0-usb-0:1.7:1.0-scsi-0:0:0:1
      0.00         0.00         0.00         0.00          0          0          0 pci-0000:00:1d.0-usb-0:1.7:1.0-scsi-0:0:0:2
+     0.00         0.00         0.00         0.00          0          0          0 dm-2
 
 
diff --git a/tests/expected.iostat-kz b/tests/expected.iostat-kz
new file mode 100644 (file)
index 0000000..d975a84
--- /dev/null
@@ -0,0 +1,28 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (8 CPU)
+
+avg-cpu:  %user   %nice %system %iowait  %steal   %idle
+           1.65   44.90    1.84    1.01    0.00   50.60
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+sda               8.59       222.14        57.08         0.00    1597749     410544          0
+sda1              0.01         0.29         0.00         0.00       2108          0          0
+sda2              0.01         0.29         0.00         0.00       2092          0          0
+sda3              0.01         0.29         0.00         0.00       2100          0          0
+sda4              0.00         0.00         0.00         0.00         14          0          0
+sda5              0.01         0.31         0.00         0.00       2252          0          0
+sda6              0.02         0.62         0.00         0.00       4424         12          0
+sda7              0.02         0.62         0.00         0.00       4437         12          0
+sda8              0.01         0.34         0.00         0.00       2444          0          0
+sda9              6.60       193.17        19.89         0.00    1389369     143040          0
+sda10             0.01         0.31         0.00         0.00       2220          0          0
+sda11             0.01         0.31         0.00         0.00       2252          0          0
+sda12             1.88        25.28        37.19         0.00     181825     267480          0
+sdb               0.01         0.29         0.00         0.00       2108          0          0
+
+
+avg-cpu:  %user   %nice %system %iowait  %steal   %idle
+           2.15   12.50    2.35    0.12    0.00   82.89
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+
+
index fe054ef17763b1207ea40c2fd09b4b88adeba036..148ed8596e3141e62eea883f5cd1e9fdfbb9343b 100644 (file)
@@ -19,6 +19,7 @@ sdb               0.01         0.29         0.00         0.00       2108
 sde               0.00         0.00         0.00         0.00          0          0          0
 sdc               0.00         0.00         0.00         0.00          0          0          0
 sdd               0.00         0.00         0.00         0.00          0          0          0
+dm-2              0.00         0.00         0.00         0.00          0          0          0
 
 
 Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
index a4faf65f3f38a151fadc0d728d80cfa06bcda67b..6a6cf01ede1164f9f95cc2d08c8bd0bd56bbdf93 100644 (file)
@@ -7,6 +7,7 @@ sdb               0.01         0.29         0.00       2108          0
 sde               0.00         0.00         0.00          0          0
 sdc               0.00         0.00         0.00          0          0
 sdd               0.00         0.00         0.00          0          0
+dm-2              0.00         0.00         0.00          0          0
 
 
 Device             tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d
index a5c76229fc8f6312672b1cd79c74aad460d7bf94..7c3451c240a54709c11b979c46397b3c664b1ae4 100644 (file)
@@ -22,6 +22,7 @@ sdb               0.01         0.29         0.00       2108          0
 sde               0.00         0.00         0.00          0          0
 sdc               0.00         0.00         0.00          0          0
 sdd               0.00         0.00         0.00          0          0
+dm-2              0.00         0.00         0.00          0          0
 
 
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
index a5c76229fc8f6312672b1cd79c74aad460d7bf94..7c3451c240a54709c11b979c46397b3c664b1ae4 100644 (file)
@@ -22,6 +22,7 @@ sdb               0.01         0.29         0.00       2108          0
 sde               0.00         0.00         0.00          0          0
 sdc               0.00         0.00         0.00          0          0
 sdd               0.00         0.00         0.00          0          0
+dm-2              0.00         0.00         0.00          0          0
 
 
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
index b261d4690d20ac45408a6090c7538f87aae34b21..0f8e3a99a20959d539eaf3e15051e7c7527e6472 100644 (file)
@@ -10,6 +10,7 @@ sdb              0.01      0.29     0.00   0.00   60.92    41.33    0.00      0.
 sde              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdc              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdd              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
+dm-2             0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 
 
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
index b740c8d8c05caf1f497db54d1e78b151c612403a..bf98960372f92a448767134630b43d37b1b4d7f9 100644 (file)
@@ -19,6 +19,7 @@ sdb              0.01      0.29     0.00   0.00   60.92    41.33    0.00      0.
 sde              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdc              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdd              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
+dm-2             0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 
 
 Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
index a7c45632b170d9bf86473a4ea1b6170428192455..0129a0ef1268c3d3d6b43013b4da4ee2631541b5 100644 (file)
@@ -22,6 +22,7 @@ sdb              0.01      0.29     0.00   0.00   60.92    41.33    0.00      0.
 sde              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdc              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 sdd              0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
+dm-2             0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00   0.00
 
 
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
index cabdbaa4f33873d93fdeb9aaedc2d9ad0e962bcb..e9f87b7fc0ce1e70039aee9f4222dbef5a9988af 100644 (file)
@@ -20,7 +20,7 @@ List of activities:
 08: [8b] A_KTABLES            N:   1   (4,0,0)
 09: [8c] A_QUEUE              N:   1   (3,0,3)
 10: [8b] A_SERIAL             Y:   2   (0,0,7)
-11: [8c] A_DISK               Y:  18   (1,3,7)
+11: [8c] A_DISK               Y:  19   (1,3,7)
 12: [8d] A_NET_DEV            Y:   5   (7,0,1)
 13: [8c] A_NET_EDEV           Y:   5   (9,0,0)
 14: [8a] A_NET_NFS            N:   1   (0,0,6)
index 89e017b3f2e2c5d70121750471c4d753b2480fd8..4cb8cba481464d26fead5051654566006c1731b3 100644 (file)
 # A_SERIAL: 2/2 (2)
 13:20:49 UTC; TTY; 0; rcvin/s; 32543; 32543; txmtin/s; 14323; 14323; framerr/s; 123; 123; prtyerr/s; 123; 123; brk/s; 42; 42; ovrun/s; 13; 13;
 13:20:49 UTC; TTY; 1; rcvin/s; 0; 0; txmtin/s; 0; 0; framerr/s; 0; 0; prtyerr/s; 0; 0; brk/s; 0; 0; ovrun/s; 0; 0;
-# A_DISK: 14/18 (18)
+# A_DISK: 14/19 (19)
 13:20:19 UTC; major; 8; minor; 0; DEV; dev8-0; tps; 61781; 61781; rkB/s; 3195498; 3195498; wkB/s; 821088; 821088; dkB/s; 0; 0; rd_ticks; 623970; 623970; wr_ticks; 117109; 117109; dc_ticks; 0; 0; tot_ticks; 32862; 32862; aqu-sz; 714408; 714408;
 13:20:19 UTC; major; 8; minor; 1; DEV; dev8-1; tps; 51; 51; rkB/s; 4216; 4216; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 3107; 3107; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 41; 41; aqu-sz; 3086; 3086;
 13:20:19 UTC; major; 8; minor; 2; DEV; dev8-2; tps; 47; 47; rkB/s; 4184; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2938; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 33; 33; aqu-sz; 2917; 2917;
 13:20:19 UTC; major; 8; minor; 11; DEV; dev8-11; tps; 57; 57; rkB/s; 4504; 4504; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2180; 2180; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 53; 53; aqu-sz; 2155; 2155;
 13:20:19 UTC; major; 8; minor; 12; DEV; dev8-12; tps; 13528; 13528; rkB/s; 363650; 363650; wkB/s; 534960; 534960; dkB/s; 0; 0; rd_ticks; 124848; 124848; wr_ticks; 59590; 59590; dc_ticks; 0; 0; tot_ticks; 7316; 7316; aqu-sz; 178474; 178474;
 13:20:19 UTC; major; 8; minor; 16; DEV; dev8-16; tps; 51; 51; rkB/s; 4216; 4216; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 3107; 3107; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 41; 41; aqu-sz; 3086; 3086;
-# A_DISK: 14/18 (18)
+# A_DISK: 14/19 (19)
 13:20:29 UTC; major; 8; minor; 0; DEV; dev8-0; tps; 61781; 61981; rkB/s; 3195498; 3195598; wkB/s; 821088; 821188; dkB/s; 0; 0; rd_ticks; 623970; 624070; wr_ticks; 117109; 117209; dc_ticks; 0; 0; tot_ticks; 32862; 32962; aqu-sz; 714408; 714508;
 13:20:29 UTC; major; 8; minor; 1; DEV; dev8-1; tps; 51; 251; rkB/s; 4216; 4316; wkB/s; 0; 100; dkB/s; 0; 0; rd_ticks; 3107; 3207; wr_ticks; 0; 100; dc_ticks; 0; 0; tot_ticks; 41; 141; aqu-sz; 3086; 3186;
 13:20:29 UTC; major; 8; minor; 2; DEV; dev8-2; tps; 47; 47; rkB/s; 4184; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2938; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 33; 33; aqu-sz; 2917; 2917;
 13:20:29 UTC; major; 8; minor; 11; DEV; dev8-11; tps; 57; 57; rkB/s; 4504; 4504; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2180; 2180; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 53; 53; aqu-sz; 2155; 2155;
 13:20:29 UTC; major; 8; minor; 12; DEV; dev8-12; tps; 13528; 13528; rkB/s; 363650; 363650; wkB/s; 534960; 534960; dkB/s; 0; 0; rd_ticks; 124848; 124848; wr_ticks; 59590; 59590; dc_ticks; 0; 0; tot_ticks; 7316; 7316; aqu-sz; 178474; 178474;
 13:20:29 UTC; major; 8; minor; 16; DEV [BCK]; dev8-16; tps; 0; 21; rkB/s; 0; 1412; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 0; 987; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 0; 17; aqu-sz; 0; 3000;
-# A_DISK: 15/18 (18)
+# A_DISK: 15/19 (19)
 13:20:39 UTC; major; 8; minor; 0; DEV [BCK]; dev8-0; tps; 0; 61781; rkB/s; 0; 3195498; wkB/s; 0; 821088; dkB/s; 0; 0; rd_ticks; 0; 623970; wr_ticks; 0; 117109; dc_ticks; 0; 0; tot_ticks; 0; 32862; aqu-sz; 0; 714408;
 13:20:39 UTC; major; 8; minor; 1; DEV [BCK]; dev8-1; tps; 0; 51; rkB/s; 0; 4216; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 0; 3107; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 0; 41; aqu-sz; 0; 3086;
 13:20:39 UTC; major; 8; minor; 2; DEV; dev8-2; tps; 47; 47; rkB/s; 4184; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2938; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 33; 33; aqu-sz; 2917; 2917;
 13:20:39 UTC; major; 8; minor; 12; DEV; dev8-12; tps; 13528; 13528; rkB/s; 363650; 363650; wkB/s; 534960; 534960; dkB/s; 0; 0; rd_ticks; 124848; 124848; wr_ticks; 59590; 59590; dc_ticks; 0; 0; tot_ticks; 7316; 7316; aqu-sz; 178474; 178474;
 13:20:39 UTC; major; 8; minor; 80; DEV [NEW]; dev8-80; tps; 0; 47; rkB/s; 0; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 0; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 0; 33; aqu-sz; 0; 2917;
 13:20:39 UTC; major; 8; minor; 96; DEV [NEW]; dev8-96; tps; 0; 112; rkB/s; 0; 8848; wkB/s; 0; 24; dkB/s; 0; 0; rd_ticks; 0; 2732; wr_ticks; 0; 40; dc_ticks; 0; 0; tot_ticks; 0; 73; aqu-sz; 0; 2724;
-# A_DISK: 15/18 (18)
+# A_DISK: 15/19 (19)
 13:20:49 UTC; major; 8; minor; 0; DEV; dev8-0; tps; 61781; 61781; rkB/s; 3195498; 3195498; wkB/s; 821088; 821088; dkB/s; 0; 0; rd_ticks; 623970; 623970; wr_ticks; 117109; 117109; dc_ticks; 0; 0; tot_ticks; 32862; 32862; aqu-sz; 714408; 714408;
 13:20:49 UTC; major; 8; minor; 1; DEV; dev8-1; tps; 51; 51; rkB/s; 4216; 4216; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 3107; 3107; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 41; 41; aqu-sz; 3086; 3086;
 13:20:49 UTC; major; 8; minor; 2; DEV; dev8-2; tps; 47; 47; rkB/s; 4184; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2938; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 33; 33; aqu-sz; 2917; 2917;
 # A_SERIAL: 2/2 (2)
 13:54:35 UTC; TTY; 0; rcvin/s; 32543; 32543; txmtin/s; 14323; 14323; framerr/s; 123; 123; prtyerr/s; 123; 123; brk/s; 42; 42; ovrun/s; 13; 13;
 13:54:35 UTC; TTY; 1; rcvin/s; 0; 0; txmtin/s; 0; 0; framerr/s; 0; 0; prtyerr/s; 0; 0; brk/s; 0; 0; ovrun/s; 0; 0;
-# A_DISK: 10/18 (18)
+# A_DISK: 10/19 (19)
 13:54:35 UTC; major; 8; minor; 0; DEV; dev8-0; tps; 61881; 61931; rkB/s; 3195498; 3195498; wkB/s; 821088; 821088; dkB/s; 100; 150; rd_ticks; 623970; 623970; wr_ticks; 117109; 117109; dc_ticks; 100; 150; tot_ticks; 32862; 32862; aqu-sz; 714408; 714408;
 13:54:35 UTC; major; 8; minor; 1; DEV; dev8-1; tps; 151; 201; rkB/s; 4216; 4216; wkB/s; 0; 0; dkB/s; 100; 150; rd_ticks; 3107; 3107; wr_ticks; 0; 0; dc_ticks; 100; 150; tot_ticks; 41; 41; aqu-sz; 3086; 3086;
 13:54:35 UTC; major; 8; minor; 2; DEV; dev8-2; tps; 47; 47; rkB/s; 4184; 4184; wkB/s; 0; 0; dkB/s; 0; 0; rd_ticks; 2938; 2938; wr_ticks; 0; 0; dc_ticks; 0; 0; tot_ticks; 33; 33; aqu-sz; 2917; 2917;
index ff0a2dc2be99df9d5d11a9b0aae91e6c2ebae1b7..28abee5a4bf448ad4de8c58755af52f73ecad685 100644 (file)
@@ -1,4 +1,6 @@
 ==========root1:
+/proc/diskstats
+dm-2 virtual device present
 
 ==========root2:
 
diff --git a/tests/root1/dev/dm-2 b/tests/root1/dev/dm-2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/root1/dev/mapper/virtualhd b/tests/root1/dev/mapper/virtualhd
new file mode 120000 (symlink)
index 0000000..aeed79b
--- /dev/null
@@ -0,0 +1 @@
+../dm-2
\ No newline at end of file
index 882c2d116fa489047b739a3ffb57d1ef74fe3c12..2edfcabe063a8f381386047d1e4ac77cb67bea30 100644 (file)
@@ -16,3 +16,4 @@
    8      64 sde 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    8      32 sdc 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    8      48 sdd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 253       2 dm-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/tests/root1/sys/block/dm-2/device/_void b/tests/root1/sys/block/dm-2/device/_void
new file mode 100644 (file)
index 0000000..e69de29