From 7fef83a2506ef6673a98a24976bc4a38a222fa12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 18 Mar 2024 12:34:22 +0100 Subject: [PATCH] tools/bisect/README.md: added section about bisecting crashes / triage_version.py: skip some bogus commit hashes and version encountered in my bisect archive (#6145) --- tools/bisect/README.md | 10 ++++++++++ tools/triage_py/triage_version.py | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/tools/bisect/README.md b/tools/bisect/README.md index 49d79838d73..79faa951cdc 100644 --- a/tools/bisect/README.md +++ b/tools/bisect/README.md @@ -93,6 +93,16 @@ To bisect these kinds of regressions you currently need to adjust the `bisect.sh `1` - find the commit which started the hang
`2` - find the commit which resolved the hang
+# Bisecting crashes + +To bisect when a crash was introduced just do the same as you would for a regular error. + +But if you want to find the commit which fixes a crash you need to add `-j2` to the options so the crash will generate an error instead of terminating the process and check for the expected string `crashed`. + +``` +./bisect.sh " -j2" "crashed" +``` + ### General notes As we are currently using the process exitcode to pass the elapsed time to the script it will not work properly with vey long runtime (>= 255 seconds) as it will overflow. diff --git a/tools/triage_py/triage_version.py b/tools/triage_py/triage_version.py index 5841c6268cb..c3d6c29ee32 100644 --- a/tools/triage_py/triage_version.py +++ b/tools/triage_py/triage_version.py @@ -89,6 +89,17 @@ def sort_commit_hashes(commits): # this is the commit hash for the 2.9 release tag. it does not exist in the main branch so the version for it cannot be determined if versions.count('aca3f6fef'): versions.remove('aca3f6fef') + # 2.8 tags + if versions.count('61f846073'): + versions.remove('61f846073') + if versions.count('f998703a5'): + versions.remove('f998703a5') + # ??? + if versions.count('d4505827b'): + versions.remove('d4505827b') + # 2.6 tag + if versions.count('d873b8e77'): + versions.remove('d873b8e77') len_in = len(versions) versions = sort_commit_hashes(versions) if len(versions) != len_in: @@ -124,6 +135,9 @@ def sort_commit_hashes(commits): # sanitize version version = version.replace('Cppcheck ', '').replace(' dev', '') + if version == 'CPPCHECK_MAJOR.CPPCHECK_DEVMINOR': + continue + cmd = [exe] if do_compare and not args.no_quiet: cmd.append('-q')