From da7fab51882775cac60484744cb8f35c63710a77 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 28 Mar 2023 11:47:30 -0400 Subject: [PATCH] Ef test version update (#4142) * Revert "revert change to ef_tests" This reverts commit 1093ba1a2717c21496de171db01669ae0e6d40dd. * Revert "Revert "Use consensus-spec-tests `v1.3.0-rc.3` (#4021)"" This reverts commit 20be7024e149e41c928fe7f0426724a68e5baff1. * update tests --- testing/ef_tests/Makefile | 2 +- testing/ef_tests/check_all_files_accessed.py | 5 ++++- .../src/cases/merkle_proof_validity.rs | 5 ----- testing/ef_tests/src/handler.rs | 19 +++++++++---------- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/testing/ef_tests/Makefile b/testing/ef_tests/Makefile index e663ead1a..38b863b9f 100644 --- a/testing/ef_tests/Makefile +++ b/testing/ef_tests/Makefile @@ -1,4 +1,4 @@ -TESTS_TAG :=v1.3.0-rc.5 +TESTS_TAG := v1.3.0-rc.5 TESTS = general minimal mainnet TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS)) diff --git a/testing/ef_tests/check_all_files_accessed.py b/testing/ef_tests/check_all_files_accessed.py index e1944aaf4..60db5125f 100755 --- a/testing/ef_tests/check_all_files_accessed.py +++ b/testing/ef_tests/check_all_files_accessed.py @@ -57,9 +57,11 @@ excluded_paths = [ "tests/general/deneb/kzg" ] + def normalize_path(path): return path.split("consensus-spec-tests/")[1] + # Determine the list of filenames which were accessed during tests. passed = set() for line in open(accessed_files_filename, 'r').readlines(): @@ -92,4 +94,5 @@ for root, dirs, files in os.walk(tests_dir_filename): # Exit with an error if there were any files missed. assert len(missed) == 0, "{} missed files".format(len(missed)) -print("Accessed {} files ({} intentionally excluded)".format(accessed_files, excluded_files)) +print("Accessed {} files ({} intentionally excluded)".format( + accessed_files, excluded_files)) diff --git a/testing/ef_tests/src/cases/merkle_proof_validity.rs b/testing/ef_tests/src/cases/merkle_proof_validity.rs index cdcdaaf9b..c180774bb 100644 --- a/testing/ef_tests/src/cases/merkle_proof_validity.rs +++ b/testing/ef_tests/src/cases/merkle_proof_validity.rs @@ -28,11 +28,6 @@ pub struct MerkleProofValidity { impl LoadCase for MerkleProofValidity { fn load_from_dir(path: &Path, fork_name: ForkName) -> Result { - //FIXME(sean) - if path.ends_with("execution_merkle_proof") { - return Err(Error::SkippedKnownFailure); - } - let spec = &testing_spec::(fork_name); let state = ssz_decode_state(&path.join("object.ssz_snappy"), spec)?; let merkle_proof = yaml_decode_file(&path.join("proof.yaml"))?; diff --git a/testing/ef_tests/src/handler.rs b/testing/ef_tests/src/handler.rs index 23fb20cf2..e6ca6aeaa 100644 --- a/testing/ef_tests/src/handler.rs +++ b/testing/ef_tests/src/handler.rs @@ -1,6 +1,6 @@ use crate::cases::{self, Case, Cases, EpochTransition, LoadCase, Operation}; +use crate::type_name; use crate::type_name::TypeName; -use crate::{type_name, Error}; use derivative::Derivative; use std::fs::{self, DirEntry}; use std::marker::PhantomData; @@ -57,17 +57,11 @@ pub trait Handler { .filter_map(as_directory) .flat_map(|suite| fs::read_dir(suite.path()).expect("suite dir exists")) .filter_map(as_directory) - .filter_map(|test_case_dir| { + .map(|test_case_dir| { let path = test_case_dir.path(); - let case_result = Self::Case::load_from_dir(&path, fork_name); - - if let Err(Error::SkippedKnownFailure) = case_result.as_ref() { - return None; - } - - let case = case_result.expect("test should load"); - Some((path, case)) + let case = Self::Case::load_from_dir(&path, fork_name).expect("test should load"); + (path, case) }) .collect(); @@ -664,6 +658,11 @@ impl Handler for MerkleProofValidityHandler { fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool { fork_name != ForkName::Base + // Test is skipped due to some changes in the Capella light client + // spec. + // + // https://github.com/sigp/lighthouse/issues/4022 + && fork_name != ForkName::Capella && fork_name != ForkName::Deneb } }