Loading
test/nvme/cuse: Simplify read from /dev/urandom
It's been noticed that the current solution may fail (i.e. block indefinitely) in case one of the processes misses to handle SIGPIPE properly. In particular, if fold fails to notice that head already closed its end (and terminated), tr will constantly feed fold the data which will then try to pass it down the pipe (but there won't be anything to read that data anymore). Instead of feeding infinite stream of bytes from /dev/urandom to piped processes, simply read needed amount of bytes from it and then use it to compare it byte by byte after the write/read operation. Change-Id: Icc915d7689d41af0894ba5fcac3a36d3ba08e42b Signed-off-by:Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20541 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>