From 14b460c6524deb05e910c5b3e734b191e8336ae5 Mon Sep 17 00:00:00 2001 From: HuijingHei Date: Wed, 29 Nov 2023 15:07:47 +0800 Subject: [PATCH] tests: update scripts as adding `deduplicate_tmpfiles_entries` --- tests/compose/test-basic-unified.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/compose/test-basic-unified.sh b/tests/compose/test-basic-unified.sh index 93740768ec..8fe9ca45cd 100755 --- a/tests/compose/test-basic-unified.sh +++ b/tests/compose/test-basic-unified.sh @@ -119,20 +119,24 @@ echo "ok no cachedir" basic_test # This one is done by postprocessing /var -ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-filesystem.conf > autovar.txt +ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-rpm-ostree-autovar.conf > autovar.txt # Picked this one at random as an example of something that won't likely be # converted to tmpfiles.d upstream. But if it is, we can change this test. -assert_file_has_content_literal autovar.txt 'd /var/cache 0755 root root - -' -ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-chrony.conf > autovar.txt +# duplication in var.conf +assert_not_file_has_content autovar.txt 'd /var/cache ' # And this one has a non-root uid assert_file_has_content_literal autovar.txt 'd /var/lib/chrony 0750 chrony chrony - -' # see rpmostree-importer.c -if ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-rpm.conf > rpm.txt 2>/dev/null; then - assert_not_file_has_content rpm.txt 'd /var/lib/rpm' -fi -ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-pam.conf > autovar.txt -# Verify translating /var/run -> /run -assert_file_has_content_literal autovar.txt 'd /run/console' +assert_not_file_has_content autovar.txt 'd /var/lib/rpm' +# duplication in pam.conf +assert_not_file_has_content autovar.txt 'd /run/console' +# duplication in tmp.conf +assert_not_file_has_content autovar.txt 'd /var/tmp' + +# Verify pkg-filesystem.conf is removed +ostree --repo="${repo}" ls "${treeref}" /usr/lib/tmpfiles.d > autovar.txt +assert_not_file_has_content autovar.txt "pkg-filesystem.conf" + echo "ok autovar" rpm-ostree db list --repo="${repo}" "${treeref}" --advisories > db-list-adv.txt