diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2021-03-06 19:55:09 +0100 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2021-03-07 02:55:07 +0100 |
| commit | 246f66561e23911b9615bd337b3b6f6f25b6cd31 (patch) | |
| tree | a5b45b46dbe5c51d661841b072c14eb27883436b /test/integration/test-pdiff-usage | |
| parent | 9bd27033c4786fa89cebc9d090ad2c6e8f47b598 (diff) | |
Rename pdiff merge patches only after they are all downloaded
The rred method expects the patches to have a certain name, which we
have to rename the file to before calling the method, but by delaying
the rename we ensure that if the download of one of them fails and a
successful fallback occurs they are all properly cleaned up as no longer
useful while in the error case the next apt run can potentially pick
them up as already downloaded.
Our test-pdiff-usage test was encountering this every other run, but did
not fail as the check for unaccounted files in partial/ was wrapped
in a subshell so that the failure produced failing output, but did not
change the exit code.
Diffstat (limited to 'test/integration/test-pdiff-usage')
| -rwxr-xr-x | test/integration/test-pdiff-usage | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index c5726dd08..5844619b8 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -254,7 +254,7 @@ SHA256-Download: # This should work in at least 4% of the cases... for i in $(seq 25); do testfailure apt update "$@" - if ! grep 'rred:600' rootdir/tmp/testfailure.output; then + if ! grep -q 'rred:600' rootdir/tmp/testfailure.output; then break fi done @@ -281,7 +281,8 @@ SHA256-Download: rm "${PATCHFILE}.gz" testsuccess apt update "$@" cp rootdir/tmp/testsuccess.output patchdownload.output - testsuccess grep '^Falling back to normal index file acquire' patchdownload.output + # it should be anchored on line start, but multiple processes on the same output stream… + testsuccess grep 'Falling back to normal index file acquire' patchdownload.output testnopackage oldstuff testsuccessequal "$(cat Packages-future) " aptcache show apt newstuff futurestuff |
