From 2250246a25d924fb715ae6eba4a9794c3246b6dc Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 23 Jun 2019 16:24:56 +0200 Subject: [PATCH] simtest: Improve iostat non regression tests Signed-off-by: Sebastien GODARD --- iostat.c | 14 +++---- sar.c | 2 +- systest.c | 72 ++++++++++++++++++++++++++++++++- systest.h | 15 +++++++ tests/expected.iostat-p-sda | 54 ++++++++++++------------- tests/expected.iostat-x-p-sda | 36 ++++++++--------- tests/expected.iostat-xs-p-sda | 54 ++++++++++++------------- tests/root1/sys/block/_list | 9 +++++ tests/root1/sys/block/sda/_list | 16 ++++++++ tests/root1/sys/block/sdb/_list | 6 +++ tests/root1/sys/block/sdc/_list | 4 ++ tests/root1/sys/block/sdd/_list | 4 ++ tests/root1/sys/block/sde/_list | 3 ++ tests/root1/sys/block/sr0/_list | 3 ++ tests/root2/sys/block/_list | 8 ++++ tests/root2/sys/block/sda/_list | 16 ++++++++ tests/root2/sys/block/sdb/_list | 6 +++ tests/root2/sys/block/sdc/_list | 4 ++ tests/root2/sys/block/sdd/_list | 4 ++ tests/root2/sys/block/sde/_list | 3 ++ tests/root2/sys/block/sr0/_list | 3 ++ tests/root3/sys/block/_list | 8 ++++ tests/root3/sys/block/sda/_list | 16 ++++++++ tests/root3/sys/block/sdb/_list | 6 +++ tests/root3/sys/block/sdc/_list | 4 ++ tests/root3/sys/block/sdd/_list | 4 ++ tests/root3/sys/block/sde/_list | 3 ++ tests/root3/sys/block/sr0/_list | 3 ++ tests/root4/sys/block/_list | 9 +++++ tests/root4/sys/block/sda/_list | 3 ++ tests/root4/sys/block/sdc/_list | 3 ++ tests/root4/sys/block/sdd/_list | 3 ++ tests/root4/sys/block/sde/_list | 3 ++ tests/root4/sys/block/sdf/_list | 3 ++ tests/root4/sys/block/sdg/_list | 3 ++ tests/root4/sys/block/sr0/_list | 3 ++ tests/root5/sys/block/_list | 8 ++++ tests/root5/sys/block/sda/_list | 3 ++ tests/root5/sys/block/sdb/_list | 3 ++ tests/root5/sys/block/sdc/_list | 3 ++ tests/root5/sys/block/sdd/_list | 3 ++ tests/root5/sys/block/sde/_list | 3 ++ tests/root5/sys/block/sr0/_list | 3 ++ tests/root6/sys/block/_list | 8 ++++ tests/root6/sys/block/sda/_list | 3 ++ tests/root6/sys/block/sdb/_list | 3 ++ tests/root6/sys/block/sdc/_list | 3 ++ tests/root6/sys/block/sdd/_list | 3 ++ tests/root6/sys/block/sde/_list | 3 ++ tests/root6/sys/block/sr0/_list | 3 ++ tests/root7/sys/block/_list | 8 ++++ tests/root7/sys/block/sda/_list | 3 ++ tests/root7/sys/block/sdb/_list | 3 ++ tests/root7/sys/block/sdc/_list | 3 ++ tests/root7/sys/block/sdd/_list | 3 ++ tests/root7/sys/block/sde/_list | 3 ++ tests/root7/sys/block/sr0/_list | 3 ++ 57 files changed, 407 insertions(+), 81 deletions(-) create mode 100644 tests/root1/sys/block/_list create mode 100644 tests/root1/sys/block/sda/_list create mode 100644 tests/root1/sys/block/sdb/_list create mode 100644 tests/root1/sys/block/sdc/_list create mode 100644 tests/root1/sys/block/sdd/_list create mode 100644 tests/root1/sys/block/sde/_list create mode 100644 tests/root1/sys/block/sr0/_list create mode 100644 tests/root2/sys/block/_list create mode 100644 tests/root2/sys/block/sda/_list create mode 100644 tests/root2/sys/block/sdb/_list create mode 100644 tests/root2/sys/block/sdc/_list create mode 100644 tests/root2/sys/block/sdd/_list create mode 100644 tests/root2/sys/block/sde/_list create mode 100644 tests/root2/sys/block/sr0/_list create mode 100644 tests/root3/sys/block/_list create mode 100644 tests/root3/sys/block/sda/_list create mode 100644 tests/root3/sys/block/sdb/_list create mode 100644 tests/root3/sys/block/sdc/_list create mode 100644 tests/root3/sys/block/sdd/_list create mode 100644 tests/root3/sys/block/sde/_list create mode 100644 tests/root3/sys/block/sr0/_list create mode 100644 tests/root4/sys/block/_list create mode 100644 tests/root4/sys/block/sda/_list create mode 100644 tests/root4/sys/block/sdc/_list create mode 100644 tests/root4/sys/block/sdd/_list create mode 100644 tests/root4/sys/block/sde/_list create mode 100644 tests/root4/sys/block/sdf/_list create mode 100644 tests/root4/sys/block/sdg/_list create mode 100644 tests/root4/sys/block/sr0/_list create mode 100644 tests/root5/sys/block/_list create mode 100644 tests/root5/sys/block/sda/_list create mode 100644 tests/root5/sys/block/sdb/_list create mode 100644 tests/root5/sys/block/sdc/_list create mode 100644 tests/root5/sys/block/sdd/_list create mode 100644 tests/root5/sys/block/sde/_list create mode 100644 tests/root5/sys/block/sr0/_list create mode 100644 tests/root6/sys/block/_list create mode 100644 tests/root6/sys/block/sda/_list create mode 100644 tests/root6/sys/block/sdb/_list create mode 100644 tests/root6/sys/block/sdc/_list create mode 100644 tests/root6/sys/block/sdd/_list create mode 100644 tests/root6/sys/block/sde/_list create mode 100644 tests/root6/sys/block/sr0/_list create mode 100644 tests/root7/sys/block/_list create mode 100644 tests/root7/sys/block/sda/_list create mode 100644 tests/root7/sys/block/sdb/_list create mode 100644 tests/root7/sys/block/sdc/_list create mode 100644 tests/root7/sys/block/sdd/_list create mode 100644 tests/root7/sys/block/sde/_list create mode 100644 tests/root7/sys/block/sr0/_list diff --git a/iostat.c b/iostat.c index debfd25..d1fc70b 100644 --- a/iostat.c +++ b/iostat.c @@ -586,7 +586,7 @@ int read_sysfs_file_stat(int curr, char *filename, char *dev_name, int iodev_nr) * IN: * @curr Index in array for current sample statistics. * @dev_name Device name. - * @iodev_nr Number of devices and partitions. + * @iodev_nr Number of devices and partitions. *************************************************************************** */ void read_sysfs_dlist_part_stat(int curr, char *dev_name, int iodev_nr) @@ -599,11 +599,11 @@ void read_sysfs_dlist_part_stat(int curr, char *dev_name, int iodev_nr) dfile[sizeof(dfile) - 1] = '\0'; /* Open current device directory in /sys/block */ - if ((dir = opendir(dfile)) == NULL) + if ((dir = __opendir(dfile)) == NULL) return; /* Get current entry */ - while ((drd = readdir(dir)) != NULL) { + while ((drd = __readdir(dir)) != NULL) { if (!strcmp(drd->d_name, ".") || !strcmp(drd->d_name, "..")) continue; snprintf(filename, sizeof(filename), "%s/%s/%s", dfile, drd->d_name, S_STAT); @@ -614,7 +614,7 @@ void read_sysfs_dlist_part_stat(int curr, char *dev_name, int iodev_nr) } /* Close device directory */ - closedir(dir); + __closedir(dir); } /* @@ -683,10 +683,10 @@ void read_sysfs_stat(int curr, int iodev_nr) set_entries_unregistered(iodev_nr, st_hdr_iodev); /* Open /sys/block directory */ - if ((dir = opendir(SYSFS_BLOCK)) != NULL) { + if ((dir = __opendir(SYSFS_BLOCK)) != NULL) { /* Get current entry */ - while ((drd = readdir(dir)) != NULL) { + while ((drd = __readdir(dir)) != NULL) { if (!strcmp(drd->d_name, ".") || !strcmp(drd->d_name, "..")) continue; snprintf(filename, MAX_PF_NAME, "%s/%s/%s", @@ -706,7 +706,7 @@ void read_sysfs_stat(int curr, int iodev_nr) } /* Close /sys/block directory */ - closedir(dir); + __closedir(dir); } /* Free structures corresponding to unregistered devices */ diff --git a/sar.c b/sar.c index 94dd5e9..276b177 100644 --- a/sar.c +++ b/sar.c @@ -1598,7 +1598,7 @@ int main(int argc, char **argv) #ifdef TEST if (__unix_time) { - sprintf(ltemp, "--unix_time=%llu", __unix_time); + sprintf(ltemp, "--unix_time=%ld", __unix_time); salloc(args_idx++, ltemp); } #endif diff --git a/systest.c b/systest.c index bfb44f1..21573d3 100644 --- a/systest.c +++ b/systest.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -126,7 +127,7 @@ void next_time_step(void) sprintf(rootf, "%s%d", ROOTFILE, ++root_nr); sprintf(testf, "%s/%s", TESTDIR, rootf); if (access(testf, F_OK) < 0) { - if (errno = ENOENT) { + if (errno == ENOENT) { /* No more kernel directories: Simulate a Ctrl/C */ int_handler(0); return ; @@ -165,5 +166,74 @@ int virtual_stat(const char *name, struct stat *statbuf) return 1; } +/* + *************************************************************************** + * Open a "_list" file containing a list of files enumerated in a known + * order contained in current directory. + * + * IN: + * @name Pathname to directory containing the "_list" file. + * + * RETURNS: + * A pointer on current "_list" file. + *************************************************************************** + */ +DIR *open_list(const char *name) +{ + FILE *fp; + char filename[1024]; + + snprintf(filename, sizeof(filename), "%s/%s", name, _LIST); + filename[sizeof(filename) - 1] = '\0'; + + if ((fp = fopen(filename, "r")) == NULL) + return NULL; + + return (DIR *) fp; +} + +/* + *************************************************************************** + * Read next file name contained in a "_list" file. + * + * IN: + * @dir Pointer on current "_list" file. + * + * RETURNS: + * A structure containing the name of the next file to read. + *************************************************************************** + */ +struct dirent *read_list(DIR *dir) +{ + FILE *fp = (FILE *) dir; + static struct dirent drd; + char line[1024]; + + + if ((fgets(line, sizeof(line), fp) != NULL) && (strlen(line) > 1) && + (strlen(line) < sizeof(drd.d_name))) { + strcpy(drd.d_name, line); + drd.d_name[strlen(line) - 1] = '\0'; + return &drd; + } + + return NULL; +} + +/* + *************************************************************************** + * Close a "_list" file. + * + * IN: + * @dir Pointer on "_list" file to close. + *************************************************************************** + */ +void close_list(DIR *dir) +{ + FILE *fp = (FILE *) dir; + + fclose(fp); +} + #endif /* TEST */ diff --git a/systest.h b/systest.h index b9b2f77..eb70224 100644 --- a/systest.h +++ b/systest.h @@ -7,8 +7,10 @@ #define _SYSTEST_H #include +#include #include #include +#include /* Test mode: Use alternate files and syscalls */ #ifdef TEST @@ -21,11 +23,15 @@ #define __alarm(m) #define __pause() next_time_step() #define __stat(m,n) virtual_stat(m,n) +#define __opendir(m) open_list(m) +#define __readdir(m) read_list(m) +#define __closedir(m) close_list(m) #define ROOTDIR "./tests/root" #define ROOTFILE "root" #define TESTDIR "./tests" #define VIRTUALHD "./tests/root/dev/mapper/virtualhd" +#define _LIST "_list" #else @@ -38,6 +44,9 @@ #define __alarm(m) alarm(m) #define __pause() pause() #define __stat(m,n) stat(m,n) +#define __opendir(m) opendir(m) +#define __readdir(m) readdir(m) +#define __closedir(m) closedir(m) #endif @@ -48,6 +57,8 @@ *************************************************************************** */ #ifdef TEST +void close_list + (DIR *); char *get_env_value (char *); int get_fs_stat @@ -58,6 +69,10 @@ void get_unix_time (time_t *); void next_time_step (void); +DIR *open_list + (const char *); +struct dirent *read_list + (DIR *); int virtual_stat (const char *, struct stat *); diff --git a/tests/expected.iostat-p-sda b/tests/expected.iostat-p-sda index 9acae1c..3337003 100644 --- a/tests/expected.iostat-p-sda +++ b/tests/expected.iostat-p-sda @@ -5,18 +5,18 @@ avg-cpu: %user %nice %system %iowait %steal %idle 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 +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 +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 -sda7 0.02 0.62 0.00 0.00 4437 12 0 -sda9 6.60 193.17 19.89 0.00 1389369 143040 0 sda5 0.01 0.31 0.00 0.00 2252 0 0 -sda8 0.01 0.34 0.00 0.00 2444 0 0 sda6 0.02 0.62 0.00 0.00 4424 12 0 -sda12 1.88 25.28 37.19 0.00 181825 267480 0 -sda3 0.01 0.29 0.00 0.00 2100 0 0 -sda10 0.01 0.31 0.00 0.00 2220 0 0 -sda2 0.01 0.29 0.00 0.00 2092 0 0 -sda1 0.01 0.29 0.00 0.00 2108 0 0 -sda11 0.01 0.31 0.00 0.00 2252 0 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 avg-cpu: %user %nice %system %iowait %steal %idle @@ -24,18 +24,18 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 0.00 0.00 0.00 0.00 0 0 0 +sda1 0.00 0.00 0.00 0.00 0 0 0 +sda10 0.00 0.00 0.00 0.00 0 0 0 +sda11 0.00 0.00 0.00 0.00 0 0 0 +sda12 0.00 0.00 0.00 0.00 0 0 0 +sda2 0.00 0.00 0.00 0.00 0 0 0 +sda3 0.00 0.00 0.00 0.00 0 0 0 sda4 0.00 0.00 0.00 0.00 0 0 0 -sda7 0.00 0.00 0.00 0.00 0 0 0 -sda9 0.00 0.00 0.00 0.00 0 0 0 sda5 0.00 0.00 0.00 0.00 0 0 0 -sda8 0.00 0.00 0.00 0.00 0 0 0 sda6 0.00 0.00 0.00 0.00 0 0 0 -sda12 0.00 0.00 0.00 0.00 0 0 0 -sda3 0.00 0.00 0.00 0.00 0 0 0 -sda10 0.00 0.00 0.00 0.00 0 0 0 -sda2 0.00 0.00 0.00 0.00 0 0 0 -sda1 0.00 0.00 0.00 0.00 0 0 0 -sda11 0.00 0.00 0.00 0.00 0 0 0 +sda7 0.00 0.00 0.00 0.00 0 0 0 +sda8 0.00 0.00 0.00 0.00 0 0 0 +sda9 0.00 0.00 0.00 0.00 0 0 0 avg-cpu: %user %nice %system %iowait %steal %idle @@ -43,17 +43,17 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 6.40 1.60 1.60 0.00 50 50 0 +sda1 6.40 1.60 1.60 0.00 50 50 0 +sda10 0.00 0.00 0.00 0.00 0 0 0 +sda11 0.00 0.00 0.00 0.00 0 0 0 +sda12 0.00 0.00 0.00 0.00 0 0 0 +sda2 0.00 0.00 0.00 0.00 0 0 0 +sda3 0.00 0.00 0.00 0.00 0 0 0 sda4 0.00 0.00 0.00 0.00 0 0 0 -sda7 0.00 0.00 0.00 0.00 0 0 0 -sda9 0.00 0.00 0.00 0.00 0 0 0 sda5 0.00 0.00 0.00 0.00 0 0 0 -sda8 0.00 0.00 0.00 0.00 0 0 0 sda6 0.00 0.00 0.00 0.00 0 0 0 -sda12 0.00 0.00 0.00 0.00 0 0 0 -sda3 0.00 0.00 0.00 0.00 0 0 0 -sda10 0.00 0.00 0.00 0.00 0 0 0 -sda2 0.00 0.00 0.00 0.00 0 0 0 -sda1 6.40 1.60 1.60 0.00 50 50 0 -sda11 0.00 0.00 0.00 0.00 0 0 0 +sda7 0.00 0.00 0.00 0.00 0 0 0 +sda8 0.00 0.00 0.00 0.00 0 0 0 +sda9 0.00 0.00 0.00 0.00 0 0 0 diff --git a/tests/expected.iostat-x-p-sda b/tests/expected.iostat-x-p-sda index 958ae80..edad9b8 100644 --- a/tests/expected.iostat-x-p-sda +++ b/tests/expected.iostat-x-p-sda @@ -5,18 +5,18 @@ avg-cpu: %user %nice %system %iowait %steal %idle 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 sda 6.90 222.14 0.39 5.38 12.58 32.21 1.69 57.08 1.36 44.55 9.61 33.71 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.46 +sda1 0.01 0.29 0.00 0.00 60.92 41.33 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 +sda10 0.01 0.31 0.00 0.00 27.10 46.25 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 +sda11 0.01 0.31 0.00 0.00 38.25 39.51 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 +sda12 1.22 25.28 0.10 7.28 14.27 20.78 0.66 37.19 1.06 61.37 12.47 55.96 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.10 +sda2 0.01 0.29 0.00 0.00 62.51 44.51 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 +sda3 0.01 0.29 0.00 0.00 57.78 42.86 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 sda4 0.00 0.00 0.00 0.00 258.80 2.80 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 -sda7 0.02 0.62 0.00 0.00 23.53 39.97 0.00 0.00 0.00 0.00 20.00 4.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda9 5.58 193.17 0.30 5.04 11.56 34.60 1.02 19.89 0.30 23.01 7.63 19.51 0.00 0.00 0.00 0.00 0.00 0.00 0.07 0.37 sda5 0.01 0.31 0.00 0.00 209.25 39.51 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 -sda8 0.01 0.34 0.00 3.33 43.28 42.14 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 sda6 0.02 0.62 0.00 0.91 25.06 40.59 0.00 0.00 0.00 0.00 13.33 4.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda12 1.22 25.28 0.10 7.28 14.27 20.78 0.66 37.19 1.06 61.37 12.47 55.96 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.10 -sda3 0.01 0.29 0.00 0.00 57.78 42.86 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 -sda10 0.01 0.31 0.00 0.00 27.10 46.25 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 -sda2 0.01 0.29 0.00 0.00 62.51 44.51 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 -sda1 0.01 0.29 0.00 0.00 60.92 41.33 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 -sda11 0.01 0.31 0.00 0.00 38.25 39.51 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 +sda7 0.02 0.62 0.00 0.00 23.53 39.97 0.00 0.00 0.00 0.00 20.00 4.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda8 0.01 0.34 0.00 3.33 43.28 42.14 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 +sda9 5.58 193.17 0.30 5.04 11.56 34.60 1.02 19.89 0.30 23.01 7.63 19.51 0.00 0.00 0.00 0.00 0.00 0.00 0.07 0.37 avg-cpu: %user %nice %system %iowait %steal %idle @@ -24,17 +24,17 @@ avg-cpu: %user %nice %system %iowait %steal %idle 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 sda 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 +sda1 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 +sda10 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 +sda11 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 +sda12 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 +sda2 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 +sda3 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 sda4 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 -sda7 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 -sda9 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 sda5 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 -sda8 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 sda6 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 -sda12 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 -sda3 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 -sda10 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 -sda2 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 -sda1 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 -sda11 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 +sda7 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 +sda8 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 +sda9 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 diff --git a/tests/expected.iostat-xs-p-sda b/tests/expected.iostat-xs-p-sda index e0f816a..9565c81 100644 --- a/tests/expected.iostat-xs-p-sda +++ b/tests/expected.iostat-xs-p-sda @@ -2,49 +2,49 @@ Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) Device tps kB/s rqm/s await areq-sz aqu-sz %util sda 8.59 279.22 1.75 12.00 32.51 0.10 0.46 +sda1 0.01 0.29 0.00 60.92 41.33 0.00 0.00 +sda10 0.01 0.31 0.00 27.10 46.25 0.00 0.00 +sda11 0.01 0.31 0.00 38.25 39.51 0.00 0.00 +sda12 1.88 62.47 1.15 13.63 33.21 0.02 0.10 +sda2 0.01 0.29 0.00 62.51 44.51 0.00 0.00 +sda3 0.01 0.29 0.00 57.78 42.86 0.00 0.00 sda4 0.00 0.00 0.00 258.80 2.80 0.00 0.00 -sda7 0.02 0.62 0.00 23.44 39.03 0.00 0.00 -sda9 6.60 213.06 0.60 10.95 32.27 0.07 0.37 sda5 0.01 0.31 0.00 209.25 39.51 0.00 0.00 -sda8 0.01 0.34 0.00 43.28 42.14 0.00 0.00 sda6 0.02 0.62 0.00 24.75 39.61 0.00 0.00 -sda12 1.88 62.47 1.15 13.63 33.21 0.02 0.10 -sda3 0.01 0.29 0.00 57.78 42.86 0.00 0.00 -sda10 0.01 0.31 0.00 27.10 46.25 0.00 0.00 -sda2 0.01 0.29 0.00 62.51 44.51 0.00 0.00 -sda1 0.01 0.29 0.00 60.92 41.33 0.00 0.00 -sda11 0.01 0.31 0.00 38.25 39.51 0.00 0.00 +sda7 0.02 0.62 0.00 23.44 39.03 0.00 0.00 +sda8 0.01 0.34 0.00 43.28 42.14 0.00 0.00 +sda9 6.60 213.06 0.60 10.95 32.27 0.07 0.37 Device tps kB/s rqm/s await areq-sz aqu-sz %util sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda9 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda9 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Device tps kB/s rqm/s await areq-sz aqu-sz %util sda 6.40 3.20 6.40 1.00 0.50 0.00 0.32 +sda1 6.40 3.20 6.40 1.00 0.50 0.00 0.32 +sda10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda9 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -sda1 6.40 3.20 6.40 1.00 0.50 0.00 0.32 -sda11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda9 0.00 0.00 0.00 0.00 0.00 0.00 0.00 diff --git a/tests/root1/sys/block/_list b/tests/root1/sys/block/_list new file mode 100644 index 0000000..bea5d08 --- /dev/null +++ b/tests/root1/sys/block/_list @@ -0,0 +1,9 @@ +. +.. +dm-2 +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root1/sys/block/sda/_list b/tests/root1/sys/block/sda/_list new file mode 100644 index 0000000..cb32e1d --- /dev/null +++ b/tests/root1/sys/block/sda/_list @@ -0,0 +1,16 @@ +. +.. +device +sda1 +sda10 +sda11 +sda12 +sda2 +sda3 +sda4 +sda5 +sda6 +sda7 +sda8 +sda9 +stat diff --git a/tests/root1/sys/block/sdb/_list b/tests/root1/sys/block/sdb/_list new file mode 100644 index 0000000..654c7e9 --- /dev/null +++ b/tests/root1/sys/block/sdb/_list @@ -0,0 +1,6 @@ +. +.. +device +sdb1 +sdb2 +stat diff --git a/tests/root1/sys/block/sdc/_list b/tests/root1/sys/block/sdc/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root1/sys/block/sdc/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root1/sys/block/sdd/_list b/tests/root1/sys/block/sdd/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root1/sys/block/sdd/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root1/sys/block/sde/_list b/tests/root1/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root1/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root1/sys/block/sr0/_list b/tests/root1/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root1/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root2/sys/block/_list b/tests/root2/sys/block/_list new file mode 100644 index 0000000..b6de75b --- /dev/null +++ b/tests/root2/sys/block/_list @@ -0,0 +1,8 @@ +. +.. +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root2/sys/block/sda/_list b/tests/root2/sys/block/sda/_list new file mode 100644 index 0000000..cb32e1d --- /dev/null +++ b/tests/root2/sys/block/sda/_list @@ -0,0 +1,16 @@ +. +.. +device +sda1 +sda10 +sda11 +sda12 +sda2 +sda3 +sda4 +sda5 +sda6 +sda7 +sda8 +sda9 +stat diff --git a/tests/root2/sys/block/sdb/_list b/tests/root2/sys/block/sdb/_list new file mode 100644 index 0000000..654c7e9 --- /dev/null +++ b/tests/root2/sys/block/sdb/_list @@ -0,0 +1,6 @@ +. +.. +device +sdb1 +sdb2 +stat diff --git a/tests/root2/sys/block/sdc/_list b/tests/root2/sys/block/sdc/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root2/sys/block/sdc/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root2/sys/block/sdd/_list b/tests/root2/sys/block/sdd/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root2/sys/block/sdd/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root2/sys/block/sde/_list b/tests/root2/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root2/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root2/sys/block/sr0/_list b/tests/root2/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root2/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root3/sys/block/_list b/tests/root3/sys/block/_list new file mode 100644 index 0000000..b6de75b --- /dev/null +++ b/tests/root3/sys/block/_list @@ -0,0 +1,8 @@ +. +.. +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root3/sys/block/sda/_list b/tests/root3/sys/block/sda/_list new file mode 100644 index 0000000..cb32e1d --- /dev/null +++ b/tests/root3/sys/block/sda/_list @@ -0,0 +1,16 @@ +. +.. +device +sda1 +sda10 +sda11 +sda12 +sda2 +sda3 +sda4 +sda5 +sda6 +sda7 +sda8 +sda9 +stat diff --git a/tests/root3/sys/block/sdb/_list b/tests/root3/sys/block/sdb/_list new file mode 100644 index 0000000..654c7e9 --- /dev/null +++ b/tests/root3/sys/block/sdb/_list @@ -0,0 +1,6 @@ +. +.. +device +sdb1 +sdb2 +stat diff --git a/tests/root3/sys/block/sdc/_list b/tests/root3/sys/block/sdc/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root3/sys/block/sdc/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root3/sys/block/sdd/_list b/tests/root3/sys/block/sdd/_list new file mode 100644 index 0000000..d3dabc2 --- /dev/null +++ b/tests/root3/sys/block/sdd/_list @@ -0,0 +1,4 @@ +. +.. +device +stat diff --git a/tests/root3/sys/block/sde/_list b/tests/root3/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root3/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root3/sys/block/sr0/_list b/tests/root3/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root3/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/_list b/tests/root4/sys/block/_list new file mode 100644 index 0000000..68fa6fb --- /dev/null +++ b/tests/root4/sys/block/_list @@ -0,0 +1,9 @@ +. +.. +sda +sdc +sdd +sde +sdf +sdg +sr0 diff --git a/tests/root4/sys/block/sda/_list b/tests/root4/sys/block/sda/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sda/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sdc/_list b/tests/root4/sys/block/sdc/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sdc/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sdd/_list b/tests/root4/sys/block/sdd/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sdd/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sde/_list b/tests/root4/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sdf/_list b/tests/root4/sys/block/sdf/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sdf/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sdg/_list b/tests/root4/sys/block/sdg/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sdg/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root4/sys/block/sr0/_list b/tests/root4/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root4/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/_list b/tests/root5/sys/block/_list new file mode 100644 index 0000000..b6de75b --- /dev/null +++ b/tests/root5/sys/block/_list @@ -0,0 +1,8 @@ +. +.. +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root5/sys/block/sda/_list b/tests/root5/sys/block/sda/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sda/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/sdb/_list b/tests/root5/sys/block/sdb/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sdb/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/sdc/_list b/tests/root5/sys/block/sdc/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sdc/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/sdd/_list b/tests/root5/sys/block/sdd/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sdd/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/sde/_list b/tests/root5/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root5/sys/block/sr0/_list b/tests/root5/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root5/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/_list b/tests/root6/sys/block/_list new file mode 100644 index 0000000..b6de75b --- /dev/null +++ b/tests/root6/sys/block/_list @@ -0,0 +1,8 @@ +. +.. +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root6/sys/block/sda/_list b/tests/root6/sys/block/sda/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sda/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/sdb/_list b/tests/root6/sys/block/sdb/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sdb/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/sdc/_list b/tests/root6/sys/block/sdc/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sdc/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/sdd/_list b/tests/root6/sys/block/sdd/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sdd/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/sde/_list b/tests/root6/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root6/sys/block/sr0/_list b/tests/root6/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root6/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/_list b/tests/root7/sys/block/_list new file mode 100644 index 0000000..b6de75b --- /dev/null +++ b/tests/root7/sys/block/_list @@ -0,0 +1,8 @@ +. +.. +sda +sdb +sdc +sdd +sde +sr0 diff --git a/tests/root7/sys/block/sda/_list b/tests/root7/sys/block/sda/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sda/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/sdb/_list b/tests/root7/sys/block/sdb/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sdb/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/sdc/_list b/tests/root7/sys/block/sdc/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sdc/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/sdd/_list b/tests/root7/sys/block/sdd/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sdd/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/sde/_list b/tests/root7/sys/block/sde/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sde/_list @@ -0,0 +1,3 @@ +. +.. +device diff --git a/tests/root7/sys/block/sr0/_list b/tests/root7/sys/block/sr0/_list new file mode 100644 index 0000000..1ccc5e2 --- /dev/null +++ b/tests/root7/sys/block/sr0/_list @@ -0,0 +1,3 @@ +. +.. +device -- 2.40.0