From e02123e508368efd27c975f38646baeb4acf7978 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 4 Sep 2018 17:57:50 +0300 Subject: [PATCH] fixtures: update to 61185fe4b8762118fe9ee318539683b47cb04ed6 Rolls forwards up to 2018-03-01. Break in `RevertInCreateInInit.json` determined by `git bisect run`. The test is marked `xfail` to expicitly highlight the fact. --- fixtures | 2 +- tests/json-fixtures/test_blockchain.py | 18 +++++++++++++++++- tests/json-fixtures/test_state.py | 6 ++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/fixtures b/fixtures index 9b1f07c58a..61185fe4b8 160000 --- a/fixtures +++ b/fixtures @@ -1 +1 @@ -Subproject commit 9b1f07c58a70d1b17c4489c49eb9bebf4a27d290 +Subproject commit 61185fe4b8762118fe9ee318539683b47cb04ed6 diff --git a/tests/json-fixtures/test_blockchain.py b/tests/json-fixtures/test_blockchain.py index 5d0de5382a..ce72ba1ca7 100644 --- a/tests/json-fixtures/test_blockchain.py +++ b/tests/json-fixtures/test_blockchain.py @@ -32,17 +32,33 @@ BASE_FIXTURE_PATH = os.path.join(ROOT_PROJECT_DIR, 'fixtures', 'BlockchainTests') +# These are tests that are thought to be incorrect or buggy upstream, +# at the commit currently checked out in submodule `fixtures`. +# Ideally, this list should be empty. +# WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION! +INCORRECT_UPSTREAM_TESTS = { + # The test considers a "synthetic" scenario (the state described there can't + # be arrived at using regular consensus rules). + # * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512 + # The result is in conflict with the yellow-paper: + # * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369 + ('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501 +} + + def blockchain_fixture_mark_fn(fixture_path, fixture_name): if fixture_path.startswith('bcExploitTest'): return pytest.mark.skip("Exploit tests are slow") elif fixture_path == 'bcWalletTest/walletReorganizeOwners.json': return pytest.mark.skip("Wallet owner reorganization tests are slow") + elif (fixture_path, fixture_name) in INCORRECT_UPSTREAM_TESTS: + return pytest.mark.xfail(reason="Listed in INCORRECT_UPSTREAM_TESTS.") def blockchain_fixture_ignore_fn(fixture_path, fixture_name): if fixture_path.startswith('GeneralStateTests'): # General state tests are also exported as blockchain tests. We - # skip them here so we don't run them twice" + # skip them here so we don't run them twice return True diff --git a/tests/json-fixtures/test_state.py b/tests/json-fixtures/test_state.py index 71d0ee0159..91b0ab468e 100644 --- a/tests/json-fixtures/test_state.py +++ b/tests/json-fixtures/test_state.py @@ -138,6 +138,12 @@ def expand_fixtures_forks(all_fixtures): # Ideally, this list should be empty. # WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION! INCORRECT_UPSTREAM_TESTS = { + # The test considers a "synthetic" scenario (the state described there can't + # be arrived at using regular consensus rules). + # * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512 + # The result is in conflict with the yellow-paper: + # * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369 + ('stRevertTest/RevertInCreateInInit.json', 'RevertInCreateInInit', 'Byzantium', 0), }