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

File chmod test failing on RTEMS #685

Closed
jphickey opened this issue Dec 11, 2020 · 3 comments · Fixed by #749 or #767
Closed

File chmod test failing on RTEMS #685

jphickey opened this issue Dec 11, 2020 · 3 comments · Fixed by #749 or #767
Assignees
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 11, 2020

Describe the bug
When running unit tests against the latest baseline, there is a new failure on RTEMS:

[BEGIN] 04 TestChmod
OS_FileOpen_Impl():111:open(/RAM/Filename1): Invalid argument
[ FAIL] 04.001 file-api-test.c:257 - status after creat = -1
[ FAIL] 04.002 file-api-test.c:259 - status after close = -16

To Reproduce
Build with unit tests and execute on RTEMS 4.11 + pc686 + QEMU as documented in README. The chmod test fails.

Expected behavior
Test should pass.

System observed on:
RTEMS 4.11.3, pc686 BSP, running in QEMU

Additional context
Appears to be introduced in PR #665

Reinforces need (again) for CI script that runs the RTEMS build.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey
Copy link
Contributor Author

I took a quick look, I think the issue is related to the way the test file is initally created:

status = OS_OpenCreate(&fd, filename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE, OS_READ_ONLY);

It doesn't make sense to use OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE in combination with OS_READ_ONLY ... I believe the OS is probably catching this as invalid.

@zanzaben
Copy link
Contributor

Also dug into it and the FileOpen_Impl has a comment saying the same thing about read only. I can change the test to start with Read Write instead if you think that will fix the problem.

@zanzaben zanzaben self-assigned this Dec 21, 2020
@skliper skliper added the bug label Jan 4, 2021
@skliper
Copy link
Contributor

skliper commented Jan 4, 2021

What's the status here? Can we get a fix in this round?

@skliper skliper added this to the 6.0.0 milestone Jan 4, 2021
@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Jan 4, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Jan 5, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Jan 11, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Jan 13, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Jan 14, 2021
astrogeco added a commit that referenced this issue Jan 25, 2021
Fix #685 change file create to use read write
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
4 participants