Skip to content

Conversation

@vojtechtrefny
Copy link
Member

MD (de)activation is currently very race-y in both RHEL 9 and 10 and then tests fails often especially when starting and stopping the array multiple times. This introduces a new simple test case that should cover most of the use cases without failing all the time keeping the "full" test case, but marking it as unstable until these issues are resolved in mdadm.

@gemini-code-assist
Copy link

Summary of Changes

Hello @vojtechtrefny, 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 more stable and simplified test case for MD (de)activation functionality, specifically addressing frequent failures in existing tests on RHEL 9 and 10 caused by race conditions within mdadm. By adding test_activate_deactivate_core, the PR ensures core functionality is reliably tested, while the previously unstable, more comprehensive test is now explicitly tagged as such, pending resolution of underlying mdadm issues.

Highlights

  • New MD Activation Test: A new, simpler test case test_activate_deactivate_core has been added to verify basic MD RAID activation and deactivation, designed to be less prone to race conditions.
  • Unstable Test Tag: The original test_activate_deactivate test has been marked with TestTags.UNSTABLE to indicate its current unreliability due to race conditions in mdadm.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@vojtechtrefny
Copy link
Member Author

I don't like this, but having the tests failing all the time is not ideal. In the past I've definitely missed some more serious issues because I got used to seeing the tests "red" all the time. With this we'll get some coverage until the underlying mdadm issues are resolved.

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 simpler, more stable test case for MD RAID activation and deactivation to address flakiness in the existing tests. The new test, test_activate_deactivate_core, performs a basic sequence of creating, deactivating, activating, and deactivating a RAID0 array. The existing, more comprehensive test, test_activate_deactivate, has been marked as unstable. The changes are clear, logical, and effectively address the problem of test instability. The new test is well-implemented and consistent with the existing test suite's structure.

Copy link
Member

@tbzatek tbzatek left a comment

Choose a reason for hiding this comment

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

w00t

MD (de)activation is currently very race-y in both RHEL 9 and 10
and then tests fails often especially when starting and stopping
the array multiple times. This introduces a new simple test case
that should cover most of the use cases without failing all the
time keeping the "full" test case, but marking it as unstable
until these issues are resolved in mdadm.
@vojtechtrefny vojtechtrefny force-pushed the master_md-activate-tests-core branch from 611bfc7 to 703186f Compare November 6, 2025 14:10
@vojtechtrefny vojtechtrefny merged commit f4871bd into storaged-project:master Nov 6, 2025
46 checks 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.

2 participants