Skip to content

testing/ostest: Test mq_open() with an oversized message size - #4131

Draft
Shanks0224 wants to merge 1 commit into
apache:masterfrom
Shanks0224:ostest-mq-msgsize
Draft

Shanks0224 wants to merge 1 commit into
apache:masterfrom
Shanks0224:ostest-mq-msgsize

Conversation

@Shanks0224

@Shanks0224 Shanks0224 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Summary

At the start of mqueue_test, check that mq_open() fails with EINVAL
when mq_msgsize exceeds CONFIG_MQ_MAXMSGSIZE.

depends-on: apache/nuttx#22293

Impact

New check only. Without apache/nuttx#22293, builds with
CONFIG_DEBUG_ASSERTIONS hit a kernel assertion in this check; builds
without assertions already pass it.

Testing

Build host: Linux x86_64. sim:nsh + CONFIG_TESTING_OSTEST +
CONFIG_DEBUG_ASSERTIONS.

Without apache/nuttx#22293:

mqueue_test: Opening a queue with an oversized message size
dump_assert_info: Assertion failed (!attr || attr->mq_msgsize <= MQ_MAX_BYTES) && pmsgq: at file: mqueue/mq_msgqalloc.c:76 task: ostest process: ostest 0x4008cb71

With it:

mqueue_test: Opening a queue with an oversized message size
mqueue_test: Starting receiver
...
ostest_main: Exiting with status 0

Check that mq_open() fails with EINVAL when mq_msgsize exceeds
CONFIG_MQ_MAXMSGSIZE.  With CONFIG_DEBUG_ASSERTIONS the kernel asserted
on such an attribute before the fix in nuttx.

Signed-off-by: ganjing <ganjing@xiaomi.com>
@github-actions

Copy link
Copy Markdown

⚠️ depends-on could not be parsed

A depends-on: line was found in the PR description, but no valid dependency was parsed. Supported repositories: apache/nuttx, apache/nuttx-apps; the PR id must be numeric.

Expected format:

depends-on: [apache/nuttx/pull/<N> apache/nuttx-apps/pull/<M>]

CI run: https://github.com/apache/nuttx-apps/actions/runs/45538545769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant