From aaad97c1f820696db5b1d2c01b6afeb68d24f191 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 23 Jun 2019 14:27:51 +0200 Subject: [PATCH] simtest: Add more iostat non regression tests Signed-off-by: Sebastien GODARD --- ioconf.c | 2 +- systest.c | 32 +++++++++++++++++++++---- systest.h | 9 +++++-- tests/02610 | 3 +++ tests/02615 | 1 + tests/02620 | 3 +++ tests/02625 | 1 + tests/02630 | 3 +++ tests/02635 | 1 + tests/02640 | 3 +++ tests/02645 | 1 + tests/TLIST | 8 +++++++ tests/expected.iostat-ALL | 1 + tests/expected.iostat-ALL-p-ALL | 1 + tests/expected.iostat-N | 24 +++++++++++++++++++ tests/expected.iostat-h | 24 +++++++++++++++++++ tests/expected.iostat-human | 10 ++++++++ tests/expected.iostat-jID | 1 + tests/expected.iostat-jLABEL | 1 + tests/expected.iostat-jPARTUUID | 1 + tests/expected.iostat-jPATH | 1 + tests/expected.iostat-kz | 28 ++++++++++++++++++++++ tests/expected.iostat-p-ALL | 1 + tests/expected.iostat-s-ALL | 1 + tests/expected.iostat-s-ALL-p-ALL | 1 + tests/expected.iostat-s-list-p | 1 + tests/expected.iostat-x-ALL | 1 + tests/expected.iostat-x-ALL-p-ALL | 1 + tests/expected.iostat-x-p-ALL | 1 + tests/expected.sadf-H | 2 +- tests/expected.sadf-r | 10 ++++---- tests/root.README | 2 ++ tests/root1/dev/dm-2 | 0 tests/root1/dev/mapper/virtualhd | 1 + tests/root1/proc/diskstats | 1 + tests/root1/sys/block/dm-2/device/_void | 0 36 files changed, 168 insertions(+), 14 deletions(-) create mode 100644 tests/02610 create mode 100644 tests/02615 create mode 100644 tests/02620 create mode 100644 tests/02625 create mode 100644 tests/02630 create mode 100644 tests/02635 create mode 100644 tests/02640 create mode 100644 tests/02645 create mode 100644 tests/expected.iostat-N create mode 100644 tests/expected.iostat-h create mode 100644 tests/expected.iostat-human create mode 100644 tests/expected.iostat-kz create mode 100644 tests/root1/dev/dm-2 create mode 120000 tests/root1/dev/mapper/virtualhd create mode 100644 tests/root1/sys/block/dm-2/device/_void diff --git a/ioconf.c b/ioconf.c index 940b0c5..58b1206 100644 --- 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); diff --git a/systest.c b/systest.c index 9b1a6ed..bfb44f1 100644 --- a/systest.c +++ b/systest.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -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 */ diff --git a/systest.h b/systest.h index 0fa1a45..b9b2f77 100644 --- a/systest.h +++ b/systest.h @@ -16,14 +16,16 @@ #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 @@ -31,10 +33,11 @@ #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 index 0000000..c54de91 --- /dev/null +++ b/tests/02610 @@ -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 index 0000000..d2e3cbd --- /dev/null +++ b/tests/02615 @@ -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 index 0000000..8036803 --- /dev/null +++ b/tests/02620 @@ -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 index 0000000..b17f2cd --- /dev/null +++ b/tests/02625 @@ -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 index 0000000..a1e5ab6 --- /dev/null +++ b/tests/02630 @@ -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 index 0000000..3bb25ca --- /dev/null +++ b/tests/02635 @@ -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 index 0000000..f9e738b --- /dev/null +++ b/tests/02640 @@ -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 index 0000000..f8b914c --- /dev/null +++ b/tests/02645 @@ -0,0 +1 @@ +diff -u tests/out.iostat-N.tmp tests/expected.iostat-N diff --git a/tests/TLIST b/tests/TLIST index 867d52c..2948e31 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -282,3 +282,11 @@ ===== 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 diff --git a/tests/expected.iostat-ALL b/tests/expected.iostat-ALL index 78266bd..46d79c3 100644 --- a/tests/expected.iostat-ALL +++ b/tests/expected.iostat-ALL @@ -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 diff --git a/tests/expected.iostat-ALL-p-ALL b/tests/expected.iostat-ALL-p-ALL index fe054ef..148ed85 100644 --- a/tests/expected.iostat-ALL-p-ALL +++ b/tests/expected.iostat-ALL-p-ALL @@ -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 index 0000000..ebf5c49 --- /dev/null +++ b/tests/expected.iostat-N @@ -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 index 0000000..ddcc07b --- /dev/null +++ b/tests/expected.iostat-h @@ -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 index 0000000..290d7c4 --- /dev/null +++ b/tests/expected.iostat-human @@ -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 + + diff --git a/tests/expected.iostat-jID b/tests/expected.iostat-jID index 65bd5b8..618c7fd 100644 --- a/tests/expected.iostat-jID +++ b/tests/expected.iostat-jID @@ -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 diff --git a/tests/expected.iostat-jLABEL b/tests/expected.iostat-jLABEL index 220b662..5988b8c 100644 --- a/tests/expected.iostat-jLABEL +++ b/tests/expected.iostat-jLABEL @@ -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 diff --git a/tests/expected.iostat-jPARTUUID b/tests/expected.iostat-jPARTUUID index c1875a8..81d9615 100644 --- a/tests/expected.iostat-jPARTUUID +++ b/tests/expected.iostat-jPARTUUID @@ -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 diff --git a/tests/expected.iostat-jPATH b/tests/expected.iostat-jPATH index ef7d4a9..53ac74b 100644 --- a/tests/expected.iostat-jPATH +++ b/tests/expected.iostat-jPATH @@ -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 index 0000000..d975a84 --- /dev/null +++ b/tests/expected.iostat-kz @@ -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 + + diff --git a/tests/expected.iostat-p-ALL b/tests/expected.iostat-p-ALL index fe054ef..148ed85 100644 --- a/tests/expected.iostat-p-ALL +++ b/tests/expected.iostat-p-ALL @@ -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-s-ALL b/tests/expected.iostat-s-ALL index a4faf65..6a6cf01 100644 --- a/tests/expected.iostat-s-ALL +++ b/tests/expected.iostat-s-ALL @@ -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 diff --git a/tests/expected.iostat-s-ALL-p-ALL b/tests/expected.iostat-s-ALL-p-ALL index a5c7622..7c3451c 100644 --- a/tests/expected.iostat-s-ALL-p-ALL +++ b/tests/expected.iostat-s-ALL-p-ALL @@ -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 diff --git a/tests/expected.iostat-s-list-p b/tests/expected.iostat-s-list-p index a5c7622..7c3451c 100644 --- a/tests/expected.iostat-s-list-p +++ b/tests/expected.iostat-s-list-p @@ -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 diff --git a/tests/expected.iostat-x-ALL b/tests/expected.iostat-x-ALL index b261d46..0f8e3a9 100644 --- a/tests/expected.iostat-x-ALL +++ b/tests/expected.iostat-x-ALL @@ -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 diff --git a/tests/expected.iostat-x-ALL-p-ALL b/tests/expected.iostat-x-ALL-p-ALL index b740c8d..bf98960 100644 --- a/tests/expected.iostat-x-ALL-p-ALL +++ b/tests/expected.iostat-x-ALL-p-ALL @@ -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 diff --git a/tests/expected.iostat-x-p-ALL b/tests/expected.iostat-x-p-ALL index a7c4563..0129a0e 100644 --- a/tests/expected.iostat-x-p-ALL +++ b/tests/expected.iostat-x-p-ALL @@ -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 diff --git a/tests/expected.sadf-H b/tests/expected.sadf-H index cabdbaa..e9f87b7 100644 --- a/tests/expected.sadf-H +++ b/tests/expected.sadf-H @@ -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) diff --git a/tests/expected.sadf-r b/tests/expected.sadf-r index 89e017b..4cb8cba 100644 --- a/tests/expected.sadf-r +++ b/tests/expected.sadf-r @@ -2082,7 +2082,7 @@ # 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; @@ -2097,7 +2097,7 @@ 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; @@ -2112,7 +2112,7 @@ 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; @@ -2128,7 +2128,7 @@ 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; @@ -2960,7 +2960,7 @@ # 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; diff --git a/tests/root.README b/tests/root.README index ff0a2dc..28abee5 100644 --- a/tests/root.README +++ b/tests/root.README @@ -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 index 0000000..e69de29 diff --git a/tests/root1/dev/mapper/virtualhd b/tests/root1/dev/mapper/virtualhd new file mode 120000 index 0000000..aeed79b --- /dev/null +++ b/tests/root1/dev/mapper/virtualhd @@ -0,0 +1 @@ +../dm-2 \ No newline at end of file diff --git a/tests/root1/proc/diskstats b/tests/root1/proc/diskstats index 882c2d1..2edfcab 100644 --- a/tests/root1/proc/diskstats +++ b/tests/root1/proc/diskstats @@ -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 index 0000000..e69de29 -- 2.40.0