]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/encoding/check-generated.sh: run loop in the same shell
authorKefu Chai <kchai@redhat.com>
Sun, 25 Aug 2019 04:09:24 +0000 (12:09 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 27 Aug 2019 05:00:41 +0000 (13:00 +0800)
commit2c5e59c1fb8064078343e1e8b8b491751bcd9245
tree043eaa94ef7d4f8e34ace081ef437bd251c2672e
parentc1b47b62e4a2f66f8669f50f4b54087099d06f61
test/encoding/check-generated.sh: run loop in the same shell

set parent scope variables in the same shell.

foo | while read ....

in the above statement, `while read ...` is executed in a subshell. so
it cannot change the bash variables in its parent shell.

in this change, the output of `foo` is redirected to the stdin of `while
read` statement. so we can capture the test failures.

before this change, the test always succeed, even if there are failures.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/encoding/check-generated.sh