mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-14 04:59:00 +03:00
tests: Handle EPIPE failures when head terminates
When using musl, it appears that the default is line buffered output, so when `head -1` reads from a pipe we have to handle the source end of the pipe getting EPIPE. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
This commit is contained in:
parent
4d17cd917f
commit
fb519f0361
@ -177,7 +177,7 @@ if ! skip_one_without_user_xattrs; then
|
||||
${CMD_PREFIX} ostree --repo=cacherepo pull-local ostree-srv/gnomerepo main
|
||||
rev=$(ostree --repo=cacherepo rev-parse main)
|
||||
${CMD_PREFIX} ostree --repo=cacherepo ls -R -C main > ls.txt
|
||||
regfile_hash=$(grep -E -e '^-0' ls.txt | head -1 | awk '{ print $5 }')
|
||||
regfile_hash=$((grep -E -e '^-0' ls.txt || true) | head -1 | awk '{ print $5 }')
|
||||
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false corruptrepo $(cat httpd-address)/ostree/corruptrepo
|
||||
# Make this a loop so in the future we can add more object types like commit etc.
|
||||
for object in ${regfile_hash}.file; do
|
||||
|
@ -47,12 +47,12 @@ setup_mirror content_mirror3
|
||||
|
||||
# Let's delete a file from 1 so that it falls back on 2
|
||||
cd ${test_tmpdir}/content_mirror1/ostree/gnomerepo
|
||||
filez=$(find objects/ -name '*.filez' | head -n 1)
|
||||
filez=$((find objects/ -name '*.filez' || true) | head -n 1)
|
||||
rm ${filez}
|
||||
|
||||
# Let's delete a file from 1 and 2 so that it falls back on 3
|
||||
cd ${test_tmpdir}/content_mirror1/ostree/gnomerepo
|
||||
filez=$(find objects/ -name '*.filez' | head -n 1)
|
||||
filez=$((find objects/ -name '*.filez' || true) | head -n 1)
|
||||
rm ${filez}
|
||||
cd ${test_tmpdir}/content_mirror2/ostree/gnomerepo
|
||||
rm ${filez}
|
||||
|
Loading…
x
Reference in New Issue
Block a user