diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2024-03-20 12:30:19 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2024-03-30 15:59:57 +0000 |
| commit | e62162d010fc7d6374067964ced3ac227b0440b2 (patch) | |
| tree | 145c472dc6c6c9b6833f54bc3f54f74132365bac /test/integration | |
| parent | 0185347265671d0101b0e9c03fcc4e638d660705 (diff) | |
Ignore umask of leftover diff_Index in failed pdiff test
We don't store .diff_Index files anymore and so libapt cares even less
about these purposefully leftover files from the testcases than it did
previously. On a successful apt run they would just be deleted, but as
we are testing a failed run they are not touched at all.
Testing the file access bits then means we check with whatever umask
they were created which might very well be different to what apt decides
these files to have if it had touched them, so for this test we just
delete them. For the other case we set it completely wrong just in case,
but they will (hopefully) be non-existent anyhow as tested first.
References: afcdbcf895284efd76903b2b3ba5cc849059ce50
Diffstat (limited to 'test/integration')
| -rwxr-xr-x | test/integration/test-pdiff-usage | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index cf3a2f2d9..0261df69f 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -245,7 +245,7 @@ SHA256-Download: rm -rf rootdir/var/lib/apt/lists cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists cp Packages-future aptarchive/Packages - rm -f rootdir/var/lib/apt/lists/*_Contents-* + rm -f rootdir/var/lib/apt/lists/*_Contents-* rootdir/var/lib/apt/lists/*.diff_Index* webserverconfig 'aptwebserver::overwrite::.*Contents-.*::filename' '/hacked-i386.gz' testfailure apt update "$@" cp rootdir/tmp/testfailure.output patchdownload.output @@ -387,9 +387,12 @@ generatepartialleftovers() { for f in "$@"; do cat "${PKGFILE}" "${PKGFILE}" > "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_${PREFIX}${f}" printf '\n\nInvalid\nStanza: yes\n\n' >> "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_${PREFIX}${f}" + chmod 777 "rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_${PREFIX}${f}" done - printf '\n\nInvalid\nStanza: yes\n\n' >> "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index" - printf '\n\nInvalid\nStanza: yes\n\n' >> "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index.xz" + printf '\n\nInvalid\nStanza: yes\n\n' > "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index" + chmod 777 "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index" + printf '\n\nInvalid\nStanza: yes\n\n' > "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index.xz" + chmod 777 "rootdir/var/lib/apt/lists-bak/localhost:${APTHTTPPORT}_${PREFIX}Packages.diff_Index.xz" } partialleftovers() { generatepartialleftovers '' 'Packages' 'Packages-patched'; } |
