Skip to content

Fix RunHostTest console execution and prevent duplicate sysinfo colle…#958

Merged
PraveenPenguin merged 1 commit into
open-power:masterfrom
PraveenPenguin:fixrunhost
Jun 4, 2026
Merged

Fix RunHostTest console execution and prevent duplicate sysinfo colle…#958
PraveenPenguin merged 1 commit into
open-power:masterfrom
PraveenPenguin:fixrunhost

Conversation

@PraveenPenguin

Copy link
Copy Markdown
Collaborator

…ction

This commit addresses multiple issues in the RunHostTest execution flow:

  1. Fixed console prompt mismatch in OpTestUtil.try_command()

    • Use pre-built term_obj.expect_prompt instead of rebuilding
    • Ensures consistency between terminal PS1 and expect pattern
    • Resolves command hangs caused by prompt pattern mismatch
  2. Added use_direct_ssh parameter to OpTestSSH.run_command()

    • Allows console-based execution for session persistence
    • Maintains working directory between command executions
    • Default True for backward compatibility
  3. Updated RunHostTest to use console-based execution

    • Set use_direct_ssh=False for all run_command() calls
    • Skip empty lines and comments in command files
    • Ensures cd commands persist across executions
  4. Fixed false PETITBOOT state detection in OpTestSystem

    • Added console=1 parameter to host_run_command()
    • Prevents unnecessary system reboots during tests
  5. Prevented duplicate OS sysinfo collection in OpTestHMC

    • Added sysinfo_collected flag to track collection state
    • Check flag before collecting in set_system()
    • Eliminates duplicate sysinfo output and improves performance

These changes restore the original console-based execution behavior while maintaining compatibility with the SSH migration.

@PraveenPenguin PraveenPenguin force-pushed the fixrunhost branch 3 times, most recently from 9584f16 to 1c66230 Compare June 4, 2026 02:24
…ction

This commit addresses multiple issues in the RunHostTest execution flow:

1. Fixed console prompt mismatch in OpTestUtil.try_command()
   - Use pre-built term_obj.expect_prompt instead of rebuilding
   - Ensures consistency between terminal PS1 and expect pattern
   - Resolves command hangs caused by prompt pattern mismatch

2. Added use_direct_ssh parameter to OpTestSSH.run_command()
   - Allows console-based execution for session persistence
   - Maintains working directory between command executions
   - Default True for backward compatibility

3. Updated RunHostTest to use console-based execution
   - Set use_direct_ssh=False for all run_command() calls
   - Skip empty lines and comments in command files
   - Ensures cd commands persist across executions

4. Fixed false PETITBOOT state detection in OpTestSystem
   - Added console=1 parameter to host_run_command()
   - Prevents unnecessary system reboots during tests

5. Prevented duplicate OS sysinfo collection in OpTestHMC
   - Added sysinfo_collected flag to track collection state
   - Check flag before collecting in set_system()
   - Eliminates duplicate sysinfo output and improves performance

These changes restore the original console-based execution behavior
while maintaining compatibility with the SSH migration.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
@PraveenPenguin PraveenPenguin merged commit f87119f into open-power:master Jun 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant