[guest os booting]fix bootmenu msg#6799
Conversation
update the check_prompt for ovmf cases to make them compatible with both the old and new versions Signed-off-by: zhentang-tz <zhetang@redhat.com>
WalkthroughThe changes update boot menu validation logic in test configurations and source code. A configuration file modifies the boot menu prompt pattern from matching a specific boot entry ("Boot0000" UiApp) to a more flexible regex pattern that matches Boot entries with dynamic indices and allows either UiApp or BootManagerMenuApp. Simultaneously, the Python source code adds a length validation check, requiring the check_not_prompt list to contain at least 3 elements before executing boot menu output parsing logic. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
Test name |
| [check_prompt], timeout=30, internal_timeout=0.5 | ||
| ) | ||
| if check_not_prompt: | ||
| if check_not_prompt and len(check_not_prompt) >= 3: |
There was a problem hiding this comment.
I'm curious why we need to have the condition len(check_not_prompt) >= 3. I found in cfg file it only has one check_not_prompt with check_not_prompt = LOADPARM=.2,s390-ccw Enumerated Boot Menu,.*Linux version.
There was a problem hiding this comment.
The code hardcodes access to the 3rd element (check_not_prompt[2]). If the config is empty or missing, .split(",") returns [''] (length 1), causing the IndexError I observed. Since s390 is not our focus here, I added this condition as a non-intrusive way to bypass the crash in other variants. It ensures the script only enters the s390-specific exclusion logic when all required markers are provided.
update the check_prompt for ovmf cases to make them compatible with both the old and new versions
Summary by CodeRabbit
Release Notes