From e86f3d875a48987a026f79aa4e19eeda4ad01b3b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 11 Feb 2025 17:02:00 +0100 Subject: test: Fix 7 test cases for 3.0 solver, annotate others Fix the test cases we can fix directly; add annotations where we know what work is needed, next we'll look at the other bugs. --- test/integration/solver3.broken | 27 +++++-------- test/integration/test-apt-install-file-reltag | 29 +++++++------ test/integration/test-bug-611729-mark-as-manual | 1 + .../test-bug-745046-candidate-propagation-fails | 16 +++++++- test/integration/test-bug-961266-hold-means-hold | 47 ++++++++++++++++++++-- .../test-external-dependency-solver-protocol | 1 + test/integration/test-parse-all-archs-into-cache | 1 + test/integration/test-release-candidate-switching | 24 +++++++++-- ...t-ubuntu-bug-1304403-obsolete-priority-standard | 1 + test/integration/test-ubuntu-bug-614993 | 1 + 10 files changed, 112 insertions(+), 36 deletions(-) (limited to 'test/integration') diff --git a/test/integration/solver3.broken b/test/integration/solver3.broken index 74507b25f..adddeb9d2 100644 --- a/test/integration/solver3.broken +++ b/test/integration/solver3.broken @@ -1,24 +1,17 @@ -test-allow-scores-for-all-dependency-types -test-apt-get-upgrade-by-source -test-apt-install-file-reltag -test-apt-install-order-matters-a-bit -test-apt-move-and-forget-manual-sections +test-allow-scores-for-all-dependency-types # TBD: We are lacking single-sided conflicts preferences +test-apt-get-upgrade-by-source # TBD: Upgrading by source is not supported yet, mostly same issue as above +test-apt-install-order-matters-a-bit # Wontfix: Cannot fix, the order is not recorded in the depcache +test-apt-move-and-forget-manual-sections # TBD: Moving the auto bit is not implemented test-bug-470115-new-and-tighten-recommends test-bug-602412-dequote-redirect -test-bug-611729-mark-as-manual -test-bug-745046-candidate-propagation-fails -test-bug-961266-hold-means-hold -test-dont-forget-conflicts-via-unknown-architectures +test-dont-forget-conflicts-via-unknown-architectures # TBD: `apt upgrade` is not allowed to remove packages at all with 3.0 test-explore-or-groups-in-markinstall -test-external-dependency-solver-protocol -test-parse-all-archs-into-cache -test-phased-updates-new-depends -test-phased-updates-upgrade +test-phased-updates-new-depends # TBD: Phasing is not implemented +test-phased-updates-upgrade # TBD: Phasing is not implemented test-prevent-markinstall-multiarch-same-versionscrew -test-release-candidate-switching test-resolve-by-keep-new-recommends test-resolve-by-keep-obsolete-removals -test-ubuntu-bug-1304403-obsolete-priority-standard -test-ubuntu-bug-1990586 -test-ubuntu-bug-2025462-phased-dist-upgrade +test-ubuntu-bug-1304403-obsolete-priority-standard # TBD: Solver3 here happily removes 10 deps to upgrade a package +test-ubuntu-bug-1990586 # TBD: Phasing is not implemented +test-ubuntu-bug-2025462-phased-dist-upgrade # TBD: Phasing is not implemented test-ubuntu-bug-614993 diff --git a/test/integration/test-apt-install-file-reltag b/test/integration/test-apt-install-file-reltag index afbf9bef9..0637c5472 100755 --- a/test/integration/test-apt-install-file-reltag +++ b/test/integration/test-apt-install-file-reltag @@ -29,15 +29,20 @@ Standards-Version: 4.1.3 EOF buildsimplenativepackage 'foobar2' 'all' '1' 'unstable' 'Depends: foo (= 5), baz' +testunsat() { + testfailure "$@" + testsuccess grep -E "^E: (Unable to correct problems,|Conflict:)" "${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" +} + ln -s "$(readlink -f ./incoming/foobar2_1_all.deb)" foobar.deb mkdir -p foobar -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep "$(readlink -f ./foobar.dsc)" -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install "$(readlink -f ./foobar.deb)" -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep ./foobar.dsc -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install ./foobar.deb -s +testunsat apt build-dep "$(readlink -f ./foobar.dsc)" -s +testunsat apt install "$(readlink -f ./foobar.deb)" -s +testunsat apt build-dep ./foobar.dsc -s +testunsat apt install ./foobar.deb -s cd foobar -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep ../foobar.dsc -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install ../foobar.deb -s +testunsat apt build-dep ../foobar.dsc -s +testunsat apt install ../foobar.deb -s cd .. SUCCESSDSC='The following NEW packages will be installed: @@ -84,11 +89,11 @@ $SUCCESSDEB" apt install "../foobar.deb/experimental" -s cd .. msgmsg 'fail with' 'incorrect release' -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep "$(readlink -f ./foobar.dsc)/stable" -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install "$(readlink -f ./foobar.deb)/stable" -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep ./foobar.dsc/stable -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install ./foobar.deb/stable -s +testunsat apt build-dep "$(readlink -f ./foobar.dsc)/stable" -s +testunsat apt install "$(readlink -f ./foobar.deb)/stable" -s +testunsat apt build-dep ./foobar.dsc/stable -s +testunsat apt install ./foobar.deb/stable -s cd foobar -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt build-dep ../foobar.dsc/stable -s -testfailuremsg 'E: Unable to correct problems, you have held broken packages.' apt install ../foobar.deb/stable -s +testunsat apt build-dep ../foobar.dsc/stable -s +testunsat apt install ../foobar.deb/stable -s cd .. diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual index bd9af32b6..026ede385 100755 --- a/test/integration/test-bug-611729-mark-as-manual +++ b/test/integration/test-bug-611729-mark-as-manual @@ -5,6 +5,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment configarchitecture "i386" +allowremovemanual buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable" diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails index 64aaa6ac8..a8ee50124 100755 --- a/test/integration/test-bug-745046-candidate-propagation-fails +++ b/test/integration/test-bug-745046-candidate-propagation-fails @@ -25,7 +25,21 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: gedit : Depends: common (>= 2) but it is not installable -E: Unable to correct problems, you have held broken packages." aptget install gedit/experimental -sq=0 +E: Unable to correct problems, you have held broken packages." aptget install gedit/experimental -sq=0 --solver internal + +testfailureequal "Reading package lists... +Building dependency tree... +Selected version '2' (experimental [amd64]) for 'gedit' +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + gedit : Depends: common (>= 2) but it is not installable +E: Unsatisfiable dependency group gedit:amd64=2 -> common:amd64" aptget install gedit/experimental -sq=0 --solver 3.0 insertinstalledpackage 'common' 'amd64' '2' diff --git a/test/integration/test-bug-961266-hold-means-hold b/test/integration/test-bug-961266-hold-means-hold index 89c18ba85..7713760d6 100755 --- a/test/integration/test-bug-961266-hold-means-hold +++ b/test/integration/test-bug-961266-hold-means-hold @@ -75,7 +75,21 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: git-ng : Depends: git (> 1:2.26.2) -E: Unable to correct problems, you have held broken packages.' apt install git-ng -s +E: Unable to correct problems, you have held broken packages.' apt install git-ng -s --solver internal + + +testfailureequal 'Reading package lists... +Building dependency tree... +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + git-ng : Depends: git (> 1:2.26.2) +E: Conflict: git:amd64=1:2.25.1-1 -> not git:amd64=1:2.26.2-1 -> not git-ng:amd64=1:2.26.2-1 but git-ng:amd64=1:2.26.2-1' apt install git-ng -s --solver 3.0 msgmsg 'Now mix it up by' 'holding git-cvs' @@ -98,7 +112,21 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: git-cvs : Depends: git (< 1:2.25.1-.) -E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.' apt install git-ng -s +E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.' apt install git-ng -s --solver internal + + +testfailureequal 'Reading package lists... +Building dependency tree... +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + git-ng : Depends: git (> 1:2.26.2) +E: Conflict: git-cvs:amd64=1:2.25.1-1 -> git:amd64=1:2.25.1-1 -> not git:amd64=1:2.26.2-1 -> not git-ng:amd64=1:2.26.2-1 but git-ng:amd64=1:2.26.2-1' apt install git-ng -s --solver 3.0 msgmsg 'Now mix it up by' 'holding both' @@ -121,4 +149,17 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: git-ng : Depends: git (> 1:2.26.2) -E: Unable to correct problems, you have held broken packages.' apt install git-ng -s +E: Unable to correct problems, you have held broken packages.' apt install git-ng -s --solver internal + +testfailureequal 'Reading package lists... +Building dependency tree... +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + git-ng : Depends: git (> 1:2.26.2) +E: Conflict: git:amd64=1:2.25.1-1 -> not git:amd64=1:2.26.2-1 -> not git-ng:amd64=1:2.26.2-1 but git-ng:amd64=1:2.26.2-1' apt install git-ng -s --solver 3.0 diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index 75fc75b92..81204fc19 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -5,6 +5,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' 'i386' +allowremovemanual insertinstalledpackage 'cool' 'all' '1' insertinstalledpackage 'stuff' 'all' '1' diff --git a/test/integration/test-parse-all-archs-into-cache b/test/integration/test-parse-all-archs-into-cache index 7485431db..b1992e726 100755 --- a/test/integration/test-parse-all-archs-into-cache +++ b/test/integration/test-parse-all-archs-into-cache @@ -5,6 +5,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment configarchitecture 'i386' +allowremovemanual insertpackage 'unstable' 'bar' 'i386' '1' 'Depends: foo' insertpackage 'unstable' 'foo' 'i386' '1' 'Multi-Arch: foreign diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index 5233dec06..dfd59584f 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -117,6 +117,8 @@ Need to get 0 B/252 B of archives. After this operation, 258 kB of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental --trivial-only -V +phonon_backend_default="phonon-backend-null (4:4.20.0+sid)" +[ "$APT_SOLVER" != "3.0" ] || phonon_backend_default="phonon-backend-xine (4:4.6.0really4.4.2-1+sid)" testfailureequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' @@ -127,14 +129,14 @@ The following additional packages will be installed: amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) - phonon-backend-null (4:4.20.0+sid) + $phonon_backend_default The following NEW packages will be installed: amarok-common (2.3.2-2+exp) amarok-null (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) - phonon-backend-null (4:4.20.0+sid) + $phonon_backend_default 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/252 B of archives. After this operation, 258 kB of additional disk space will be used. @@ -431,7 +433,23 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: uninstallablepkg : Depends: libmtp8 (>= 10:0.20.1) but it is not going to be installed Depends: amarok-utils (= 2.3.2-2+exp) but 2.3.1-1+sid is to be installed -E: Unable to correct problems, you have held broken packages." aptget install uninstallablepkg/experimental --trivial-only -V +E: Unable to correct problems, you have held broken packages." aptget install uninstallablepkg/experimental --trivial-only -V --solver internal + +# if one depends doesn't work, we don't need to look deeper… (solver3 version) +testfailureequal "Reading package lists... +Building dependency tree... +Selected version '1.0' (experimental [all]) for 'uninstallablepkg' +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + uninstallablepkg : Depends: libmtp8 (>= 10:0.20.1) but it is not going to be installed + Depends: amarok-utils (= 2.3.2-2+exp) but it is not going to be installed +E: Unsatisfiable dependency group uninstallablepkg:i386=1.0 -> libmtp8:i386" aptget install uninstallablepkg/experimental --trivial-only -V --solver 3.0 insertinstalledpackage 'libmtp8' 'i386' '1' insertinstalledpackage 'amarok' 'i386' '3' 'Depends: amarok-common (= 3), libmtp8 (>= 1)' diff --git a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard index 82e1d61e8..20d4d0c29 100755 --- a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard +++ b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard @@ -6,6 +6,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture 'i386' +allowremovemanual # Regression test for LP: #1304403 # diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993 index fe830b499..c65c394c8 100755 --- a/test/integration/test-ubuntu-bug-614993 +++ b/test/integration/test-ubuntu-bug-614993 @@ -6,6 +6,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture "amd64" setupaptarchive +allowremovemanual # test success UPGRADE="Reading package lists... -- cgit v1.2.3-70-g09d2