From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8F689138359 for ; Sat, 19 Sep 2020 20:28:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA34FE076B; Sat, 19 Sep 2020 20:28:32 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A566E076B for ; Sat, 19 Sep 2020 20:28:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6D791340C76 for ; Sat, 19 Sep 2020 20:28:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E4AE33A for ; Sat, 19 Sep 2020 20:28:30 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1600546961.302a93e5857ff56d43ee0b9dabee9f00d907a8ad.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/tests/resolver/test_slot_operator_missed_update.py X-VCS-Directories: lib/portage/tests/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 302a93e5857ff56d43ee0b9dabee9f00d907a8ad X-VCS-Branch: master Date: Sat, 19 Sep 2020 20:28:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c6295115-49d2-4280-936d-4b043cc2890f X-Archives-Hash: f483dc217a9cddb78d6552231ae9f3ac commit: 302a93e5857ff56d43ee0b9dabee9f00d907a8ad Author: Zac Medico gentoo org> AuthorDate: Sun Sep 13 01:42:30 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Sep 19 20:22:41 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=302a93e5 Add unit test demonstrating excessive backtracking for bug 743115 Due to excessive backtracking, this test case currently needs at least --backtrack=21 to succeed. Bug: https://bugs.gentoo.org/743115 Signed-off-by: Zac Medico gentoo.org> .../resolver/test_slot_operator_missed_update.py | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/lib/portage/tests/resolver/test_slot_operator_missed_update.py b/lib/portage/tests/resolver/test_slot_operator_missed_update.py new file mode 100644 index 000000000..fce012f62 --- /dev/null +++ b/lib/portage/tests/resolver/test_slot_operator_missed_update.py @@ -0,0 +1,112 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +from portage.tests import TestCase +from portage.tests.resolver.ResolverPlayground import ( + ResolverPlayground, + ResolverPlaygroundTestCase, +) + + +class BacktrackMissedUpdateTestCase(TestCase): + def testBacktrackMissedUpdateTestCase(self): + + ebuilds = { + "dev-lang/python-2.7.18-r2": { + "EAPI": "7", + "SLOT": "2.7", + }, + "dev-python/pypy3-7.3.2_rc2_p37-r1": { + "EAPI": "7", + "SLOT": "0/pypy37-pp73", + }, + "dev-python/pypy3-7.3.1-r3": { + "EAPI": "7", + "SLOT": "0/pypy36-pp73", + }, + "dev-python/setuptools-50.3.0": { + "EAPI": "7", + "IUSE": "python_targets_pypy3", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-python/setuptools-50.2.0": { + "EAPI": "7", + "IUSE": "python_targets_pypy3", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-python/setuptools-50.1.0": { + "EAPI": "7", + "IUSE": "python_targets_pypy3", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-python/setuptools-49.6.0": { + "EAPI": "7", + "IUSE": "python_targets_pypy3", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-python/setuptools-46.4.0-r2": { + "EAPI": "7", + "IUSE": "+python_targets_pypy3 +python_targets_python2_7", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-lang/python-2.7.18-r2": { + "EAPI": "7", + "IUSE": "+python_targets_pypy3 +python_targets_python2_7", + "RDEPEND": "python_targets_pypy3? ( dev-python/pypy3:= )", + }, + "dev-vcs/mercurial-5.5.1": { + "EAPI": "7", + "IUSE": "+python_targets_pypy3 +python_targets_python2_7", + "RDEPEND": "dev-python/setuptools[python_targets_pypy3?,python_targets_python2_7?] python_targets_python2_7? ( dev-lang/python:2.7 ) python_targets_pypy3? ( dev-python/pypy3:= )", + }, + } + + installed = { + "dev-lang/python-2.7.18-r2": { + "EAPI": "7", + "SLOT": "2.7", + }, + "dev-python/pypy3-7.3.1-r3": { + "EAPI": "7", + "SLOT": "0/pypy36-pp73", + }, + "dev-python/setuptools-46.4.0-r2": { + "EAPI": "7", + "IUSE": "+python_targets_pypy3 +python_targets_python2_7", + "USE": "python_targets_pypy3 python_targets_python2_7", + "RDEPEND": "dev-python/pypy3:0/pypy36-pp73=", + }, + "dev-vcs/mercurial-5.5.1": { + "EAPI": "7", + "IUSE": "+python_targets_pypy3 +python_targets_python2_7", + "USE": "python_targets_pypy3 python_targets_python2_7", + "RDEPEND": "dev-python/setuptools[python_targets_pypy3,python_targets_python2_7] dev-python/pypy3:0/pypy36-pp73=", + }, + } + + world = ["dev-vcs/mercurial"] + + test_cases = ( + # Bug 743115: missed updates trigger excessive backtracking + ResolverPlaygroundTestCase( + [">=dev-python/pypy3-7.3.2_rc", "@world"], + options={"--update": True, "--deep": True, "--backtrack": 25}, + success=True, + mergelist=[ + "dev-python/pypy3-7.3.2_rc2_p37-r1", + "dev-python/setuptools-46.4.0-r2", + "dev-vcs/mercurial-5.5.1", + ], + ), + ) + + playground = ResolverPlayground( + ebuilds=ebuilds, installed=installed, world=world, debug=False + ) + try: + for test_case in test_cases: + playground.run_TestCase(test_case) + self.assertEqual(test_case.test_success, True, test_case.fail_msg) + finally: + playground.debug = False + playground.cleanup()