From a9439c2dd3b2ca4cbfae62bc13a10271d748f1d6 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 13 Oct 2023 10:16:16 +0200 Subject: [PATCH 1/2] Merge bitcoin/bitcoin#28644: test: Fuzz merge with -use_value_profile=0 for now faa190b1efbdfdb9b12a7bfa7f732b5471a02e64 test: Fuzz merge with -use_value_profile=0 for now (MarcoFalke) Pull request description: Seems odd that this has to be done, but for now there are (unknown) size limits on the qa-assets repo. Also, a larger size means that cloning and iterating over the files takes a longer time. Not sure how to measure the net impact of this, but with some backups reverting this commit, it can be limited on the downside? ACKs for top commit: dergoegge: ACK faa190b1efbdfdb9b12a7bfa7f732b5471a02e64 Tree-SHA512: 9f8b3f4526f60e4ff6fca97859a725d145a8339c216bd15c92fad7e53f84308745fee47727527de459c0245ef9d474a9dc836fee599ab2b556b519bd900b9a33 --- test/fuzz/test_runner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py index 399d9209e280..f5dd73565078 100755 --- a/test/fuzz/test_runner.py +++ b/test/fuzz/test_runner.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2020 The Bitcoin Core developers +# Copyright (c) 2019-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run fuzz test targets. @@ -249,7 +249,11 @@ def merge_inputs(*, fuzz_pool, corpus, test_list, src_dir, fuzz_bin, merge_dir): # [0] https://github.com/bitcoin-core/qa-assets/issues/130#issuecomment-1761760866 '-shuffle=0', '-prefer_small=1', - '-use_value_profile=1', # Also done by oss-fuzz https://github.com/google/oss-fuzz/issues/1406#issuecomment-387790487 + '-use_value_profile=0', + # use_value_profile is enabled by oss-fuzz [0], but disabled for + # now to avoid bloating the qa-assets git repository [1]. + # [0] https://github.com/google/oss-fuzz/issues/1406#issuecomment-387790487 + # [1] https://github.com/bitcoin-core/qa-assets/issues/130#issuecomment-1749075891 os.path.join(corpus, t), os.path.join(merge_dir, t), ] From 2e439a5214cdd4bb8cba0d3c9b0dc5241ef6b68f Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 2 Oct 2023 11:18:50 +0200 Subject: [PATCH 2/2] Merge bitcoin/bitcoin#28184: lint: fix custom mypy cache dir setting f9047771d642c5887c752872b6ffbbd974603b35 lint: fix custom mypy cache dir setting (Fabian Jahr) Pull request description: fixes #28183 The custom cache dir for `mypy` can only be set via an environment variable, setting the `MYPY_CACHE_DIR` variable in the program is not sufficient. This error was introduced while translating the shell script to python. See also the mypy documentation: https://mypy.readthedocs.io/en/stable/config_file.html#confval-cache_dir ACKs for top commit: MarcoFalke: lgtm ACK f9047771d642c5887c752872b6ffbbd974603b35 Tree-SHA512: 7e8fb0cd06688129bd46d1afb8647262eb53d0f60b1ef6f288fedaa122d906fb62c9855e8bb0d6c6297d41a87a47d3cec7a00df55a7d033947937dfe23d07ba7 --- test/lint/lint-python.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/lint/lint-python.py b/test/lint/lint-python.py index e94c05c7235b..d4c750147e7a 100755 --- a/test/lint/lint-python.py +++ b/test/lint/lint-python.py @@ -9,14 +9,17 @@ """ import os +from pathlib import Path import subprocess import sys from importlib.metadata import metadata, PackageNotFoundError +# Customize mypy cache dir via environment variable +cache_dir = Path(__file__).parent.parent / ".mypy_cache" +os.environ["MYPY_CACHE_DIR"] = str(cache_dir) DEPS = ['flake8', 'lief', 'mypy', 'pyzmq'] -MYPY_CACHE_DIR = f"{os.getenv('BASE_ROOT_DIR', '')}/test/.mypy_cache" FILES_ARGS = ['git', 'ls-files', '--','test/functional/*.py', 'contrib/devtools/*.py', ':(exclude)contrib/devtools/github-merge.py'] EXCLUDE_DIRS = ['src/dashbls/', 'src/immer/']