Skip to content

scripts: add armv7r5f-zynqmp-qemu-test.sh#1583

Merged
damianloew merged 2 commits intomasterfrom
damianloew/load_apps_on_qemu
Mar 23, 2026
Merged

scripts: add armv7r5f-zynqmp-qemu-test.sh#1583
damianloew merged 2 commits intomasterfrom
damianloew/load_apps_on_qemu

Conversation

@damianloew
Copy link
Contributor

@damianloew damianloew commented Mar 20, 2026

Description

Motivation and Context

scripts: add armv7r5f-zynqmp-qemu-test.sh

Base script extended with GDB TCP port exposure
for uploading test binaries to the image.
On dummyfs targets the most convenient way of providing test binaries
is dynamically loading them before system startup.

scripts: modify armv7r5f-zynqmp-qemu.sh to allow sourcing

This allows scripts with slightly different configuration
to source this file and extend, reuse or modify QEMU_ARGS
without duplicating the basic configuration.

Needed for phoenix-rtos/phoenix-rtos-tests#465

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a dedicated test script for the armv7r5f-zynqmp-qemu platform, enhancing the testing workflow. The script is designed to streamline the process of uploading test binaries dynamically via GDB, which is essential for environments where direct file system access might be limited, such as dummyfs targets.

Highlights

  • New Test Script Added: A new shell script, armv7r5f-zynqmp-qemu-test.sh, has been introduced to facilitate running Phoenix-RTOS on the armv7r5f-zynqmp-qemu target for testing purposes.
  • GDB TCP Port Exposure: The new test script includes the -gdb tcp::2024 option, exposing a GDB TCP port. This enables dynamic loading of test binaries to the QEMU image before system startup, which is particularly useful for dummyfs targets.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new test script for running Phoenix-RTOS on QEMU with GDB enabled. The new script is a near-exact copy of an existing script, which introduces significant code duplication. My review provides a detailed suggestion on how to refactor the scripts to eliminate this duplication, improving long-term maintainability.

@damianloew damianloew force-pushed the damianloew/load_apps_on_qemu branch from 5918134 to d9aaad4 Compare March 20, 2026 12:55
This allows scripts with slightly different configuration
to source this file and extend, reuse or modify QEMU_ARGS
without duplicating the basic configuration.

JIRA: CI-652
@damianloew damianloew force-pushed the damianloew/load_apps_on_qemu branch from d9aaad4 to ae9b7d7 Compare March 20, 2026 13:01
@damianloew
Copy link
Contributor Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the armv7r5f-zynqmp-qemu.sh script to be sourceable, allowing its QEMU arguments to be reused, and introduces a new armv7r5f-zynqmp-qemu-test.sh script which leverages this to add a GDB server for testing. The refactoring is well-executed. My feedback focuses on improving the robustness of the scripts by adding error handling for the source command and ensuring file paths in QEMU arguments can handle spaces correctly.

@damianloew damianloew force-pushed the damianloew/load_apps_on_qemu branch from ae9b7d7 to 9fc1e75 Compare March 20, 2026 13:20
@damianloew
Copy link
Contributor Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new test script armv7r5f-zynqmp-qemu-test.sh which enables a GDB server for debugging, and refactors the existing armv7r5f-zynqmp-qemu.sh script to be sourceable, improving modularity and reuse. The changes are well-structured and improve the scripting infrastructure. I have one suggestion to make the GDB port in the new test script configurable for better flexibility.

@damianloew damianloew marked this pull request as ready for review March 20, 2026 13:28
@damianloew damianloew marked this pull request as draft March 20, 2026 13:29
@github-actions
Copy link

github-actions bot commented Mar 20, 2026

Unit Test Results

9 553 tests  ±0   8 961 ✅ ±0   53m 20s ⏱️ +7s
  591 suites ±0     592 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 1acbe36. ± Comparison against base commit a146ee9.

♻️ This comment has been updated with latest results.

@damianloew damianloew marked this pull request as ready for review March 20, 2026 14:17
Base script extended with GDB TCP port exposure
for uploading test binaries to the image.
On dummyfs targets the most convenient way of providing test binaries
is dynamically loading them before system startup.

JIRA: CI-652
@damianloew damianloew force-pushed the damianloew/load_apps_on_qemu branch from 9fc1e75 to 1acbe36 Compare March 20, 2026 14:31
Copy link
Member

@mateusz-bloch mateusz-bloch left a comment

Choose a reason for hiding this comment

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

LGTM, avoiding script duplication is good idea, and we could consider apply this to other test scripts.

Not directly related to this PR, just something that came to mind, if want to handle adding qemu arguments that are already defined in base script. Does qemu follow someting like last argument is only valid, or would we need to explicitly remove the original options from the base script.

@damianloew
Copy link
Contributor Author

Not directly related to this PR, just something that came to mind, if want to handle adding qemu arguments that are already defined in base script. Does qemu follow someting like last argument is only valid, or would we need to explicitly remove the original options from the base script.

Probably depends on the specific argument

@damianloew damianloew merged commit 1c0b759 into master Mar 23, 2026
43 checks passed
@damianloew damianloew deleted the damianloew/load_apps_on_qemu branch March 23, 2026 10:07
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