Whamcloud - gitweb
LU-10217 test: Make sanity 248 work with newer dds 44/30144/2
authorNikolay Borisov <nborisov@suse.com>
Thu, 9 Nov 2017 10:39:19 +0000 (12:39 +0200)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 19 Dec 2017 18:29:10 +0000 (18:29 +0000)
commit0e8d207cfebc14d7263a8e13dca27b8c69ad2bb5
treed3a6f58f825481e68f6da7da87a2e668e774802d
parent7faa2fec32b9d8a8f9dd646ca0b418c754cd8d0a
LU-10217 test: Make sanity 248 work with newer dds

This patch fixes 2 problems when working with value from dd.

Firstly, extraction of the readings from dd rely on them always
being in field number 6. However, that's not true for newer dd
versions where the output has changed and the time reading is now in
field number 10. So to make the code more generic and work with both
old and new outputs switch to using an egrep regular expression to
extract the correct field.

Secondly, dd can output its time in scientific notation, with
decimal and floating point portion being separated by a comma rather
than a dot:
   4096 bytes (4,1 kB, 4,0 KiB) copied, 9,1229e-05 s, 44,9 MB/s

Unforuntately this is not understood by bc so it needs to be
processed by substituting the comma for a dot and also expanding
the scientific notation to multiplication of 10 to the correct power.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Change-Id: I83ec659874ffe702c68f94f828827ff93325db72
Reviewed-on: https://review.whamcloud.com/30144
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/tests/sanity.sh