1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00
Zdenek Kabelac 8e5305f630 tests: correct usage of pipe
This is somewhat tricky - for test suite we keep using
'set -e -o pipefail'  - the effect here is - we get error report
from any 'failing' command in whole pipeline - thus when something
like this:   'lvs | head -1'  is used - and  'head' finishes before
lead 'lvs' is done - it recieves SIGPIPE and exits with error,
and somewhat misleading gets occasionally reported depending
of speed of commands.

For this case we have to avoid using standard pipes and rather
switch to using streamed results with temporary output file.
This is all nicely handled with bash feature '< <()'.

For more info:
https://stackoverflow.com/questions/41516177/bash-zcat-head-causes-pipefail
2018-02-19 16:45:10 +01:00
..
2017-07-11 16:26:12 +02:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00
2018-02-19 16:45:10 +01:00
2016-01-21 12:11:37 +01:00
2017-07-10 14:23:53 +02:00
2016-07-04 17:40:25 +02:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00
2017-11-11 01:00:35 +01:00