Add find_good_commit() with exponential search#16
Open
coiby wants to merge 15 commits intorhkdump:mainfrom
Open
Add find_good_commit() with exponential search#16coiby wants to merge 15 commits intorhkdump:mainfrom
coiby wants to merge 15 commits intorhkdump:mainfrom
Conversation
f357f07 to
e09b439
Compare
e09b439 to
d95ba79
Compare
433c4c8 to
124474c
Compare
d82cd88 to
1db5433
Compare
75b8caa to
77a9584
Compare
1db5433 to
0674d68
Compare
0674d68 to
3a83da9
Compare
3a83da9 to
d861fc0
Compare
bc5b9db to
2bd9a58
Compare
2bd9a58 to
b667619
Compare
Instead of comparing hardcoded /boot paths, use ORIGINAL_KERNEL_RELEASE to verify if the kernel being removed is the original one. This allows proper identification even if kernels are installed to unusual paths like /boot/boot/ (e.g. when using guestmount, chroot and dnf install).
If the program aborts after the running test kernel get removed, the program can fail to build the kernel next time because "make localmodconfig" will fail. So always reboot to the original kernel. And add a trap so when the program aborts it will be rebooted to the original kernel.
When GOOD_COMMIT is omitted, the tool will use exponential search (doubling steps backwards through history) to find a good commit automatically, in both git source and RPM modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Six tasks covering: _rpm_releases array, find_good_commit() function, tests for all modes, initialize() integration, verify skip, and docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Populates an ordered array of kernel releases during RPM list processing, needed for index-based traversal in auto-discovery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Walks backward through history with doubling steps to auto-discover a good commit when GOOD_COMMIT is not specified. Supports both git and RPM modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test for git mode when no good commit is found (aborts with error) - Add tests for RPM mode: success case and BAD_COMMIT validation - Fix exponential search to test index 0/root commit as final fallback when the exponential steps skip over the earliest commit - Add *.swp to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When GOOD_COMMIT is not specified, initialize() now only validates BAD_COMMIT in RPM mode and leaves GOOD_REF empty. The auto-discovery happens later in verify_intial_commits(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorders verify_intial_commits() to check the bad commit first. If it's not actually bad, there's no point searching for a good commit. When GOOD_REF is empty, calls find_good_commit() after verifying bad. When GOOD_REF is set, verifies it normally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated bisect.conf to clarify that GOOD_COMMIT is optional and describe the auto-discovery behavior using exponential search backward through history. Updated README.md to mark GOOD_COMMIT as optional in both Git Mode and RPM Mode configuration tables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
So the feature that users only need to specify GOOD_COMMIT can be tested.
… without crashkernel When the to-be-tested kernel is already installed but doesn't have the kernel crashkernel set up, the ssh_auto test plan will fail. Because kdump-utils will only set up crashkernel parameter when a kernel is freshly installed. Thus it won't work for already installed kernel. Call "kdumpctl reset-crashkernel --kernel=ALL" unconditionally to address this corner case. Also optimize the code that enables kdump.serive.
b667619 to
4084faf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #1
Walks backward through history with doubling steps to auto-discover
a good commit when GOOD_COMMIT is not specified. Supports both git
and RPM modes.