Skip to content

Conversation

@oI0ck
Copy link
Member

@oI0ck oI0ck commented Jan 29, 2026

JIRA: RTOS-1088

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?

  • Tested by hand on: ia32-generic-qemu

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.

@oI0ck oI0ck requested a review from Darchiv January 29, 2026 18:07
@gemini-code-assist
Copy link

Summary of Changes

Hello @oI0ck, 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 new set of unit tests for POSIX named semaphores, enhancing the robustness and compliance of the system's POSIX implementation. It establishes a dedicated framework for POSIX unit tests and includes comprehensive test cases to validate various semaphore operations and behaviors.

Highlights

  • Integration of POSIX unit tests: The build system (Makefile.host) has been updated to include a new category of tests, POSIX_UNIT_TESTS, ensuring they are part of the default build process.
  • New POSIX test infrastructure: A dedicated 'posix/Makefile' and 'posix/test.yaml' have been introduced to manage and define POSIX-specific unit tests, providing a structured approach for future POSIX test additions.
  • Comprehensive semaphore testing: A new test suite ('posix/sem/main.c' and 'posix/sem/named.c') has been added to thoroughly validate POSIX named semaphore functionalities, including 'sem_wait', 'sem_trywait', 'sem_timedwait', semaphore fairness, handling of nonexistent semaphores, and semaphore reopening.
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.

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 suite of POSIX semaphore tests. The structure and test cases are a good starting point. However, I've identified several issues within the test implementations in posix/sem/named.c. These include a missing header, incorrect usage of sem_timedwait which could lead to test failures, a race condition in the fairness test making it unreliable, and incorrect checking of errno on successful function calls. Addressing these points will improve the correctness and robustness of the new tests.

@oI0ck oI0ck marked this pull request as draft January 29, 2026 18:36
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