Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qemu enhancements for extra_args #1560

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

a3f
Copy link
Contributor

@a3f a3f commented Jan 6, 2025

Description

  • what do you use the feature for?

The barebox test suite uses Labgrid in CI for QEMU and these are some quality of life improvements around QEMUDriver extra_args:

  • Allow extra_args to be empty

  • Show QEMU stderr for malformed extra_args

  • Allow extra_args to list display devices and have them shown if requested

  • how did you verify the feature works?

Manually by editing the YAML and running Labgrid with QEMUDriver:

  • by removing extra_args
  • adding an unknown option in extra_args
  • adding -device ramfb in extra_args and setting display to qemu-default

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • [x ] PR has been tested

a3f added 2 commits January 6, 2025 10:59
extra_args can already be left empty if there are no extra arguments that
should be added to the QEMU command line.

Allow it to be omitted in such a case, so it doesn't needlessly clutter
the YAML.

Signed-off-by: Ahmad Fatoum <[email protected]>
When starting QEMU fails, e.g. because of a wrong command line option,
its stderr is not printed by default.

Fix this to make debugging startup issues easier.

Signed-off-by: Ahmad Fatoum <[email protected]>
@a3f a3f changed the title Qemu enchancements for extra_args Qemu enhancements for extra_args Jan 6, 2025
Copy link
Member

@Emantor Emantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit in the last commit message: replace last now with not. Otherwise looks good.

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.2%. Comparing base (587a872) to head (bd60c1c).
Report is 4 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/qemudriver.py 33.3% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1560     +/-   ##
========================================
- Coverage    56.2%   56.2%   -0.1%     
========================================
  Files         170     170             
  Lines       13247   13248      +1     
========================================
  Hits         7449    7449             
- Misses       5798    5799      +1     
Flag Coverage Δ
3.10 56.2% <33.3%> (-0.1%) ⬇️
3.11 56.2% <33.3%> (-0.1%) ⬇️
3.12 56.2% <33.3%> (-0.1%) ⬇️
3.13 56.1% <33.3%> (-0.1%) ⬇️
3.9 56.2% <33.3%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The barebox test suite adds an --interactive option to pytest, which
allows starting QEMU interactively with the Labgrid Environment YAML to
allow manual testing.

So far, it wasn't possible to use this with an interactive graphic output,
because Labgrid allowed only headless displays or none.

none is the default and will configure QEMU with -nographic, which
can not be overridden later on and -display also has no default value.

To support this use case, add a qemu-default option, which instructs
Labgrid to not touch -nographic and -display at all.

Signed-off-by: Ahmad Fatoum <[email protected]>
@a3f a3f force-pushed the qemu-enchancements branch from 812ee75 to bd60c1c Compare January 7, 2025 14:01
@a3f a3f requested a review from Emantor January 7, 2025 14:22
@Emantor Emantor merged commit 3818269 into labgrid-project:master Jan 7, 2025
9 of 11 checks passed
@a3f a3f deleted the qemu-enchancements branch January 7, 2025 14:30
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.

2 participants