Whamcloud - gitweb
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.
Test-Parameters: trivial
Test-Parameters: clientdistro=sles12sp2 testlist=sanity
Test-Parameters: clientdistro=sles12sp3 testlist=sanity
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Change-Id: I83ec659874ffe702c68f94f828827ff93325db72
Reviewed-on: https://review.whamcloud.com/30005
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>