From e62162d010fc7d6374067964ced3ac227b0440b2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 20 Mar 2024 12:30:19 +0000 Subject: 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 --- test/integration/test-pdiff-usage | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') 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'; } -- cgit v1.2.3-70-g09d2