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

open_posix_testsuite: RLIMIT_MEMLOCK is not specified in POSIX #96

Closed
wants to merge 1 commit into from

Conversation

rzezeski
Copy link
Contributor

The RLIMIT_MEMLOCK resource is not defined in POSIX.

This is a fix for #95.

The RLIMIT_MEMLOCK resource is not defined in POSIX.
munmap(pa, len);
printf("Test FAILED: Did not get EAGAIN as expected\n");
return PTS_FAIL;
}
Copy link
Member

Choose a reason for hiding this comment

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

It's true that RLIMIT_MEMLOCK is not in POSIX albeit it's commonly available (at least on Linux and BSDs). What about keeping the test but keeping the real test inside #ifdef RLIMIT_MEMLOCK ifdefs and returning PTS_UNTESTED if RLIMIT_MEMLOCK wasn't defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, so it's testing a valid POSIX case, just using a Linux/BSD interface to do so. This POSIX behavior is marked as optional (ML) so I suppose ifdef'ing this and marking unresolved on other platforms is a fine compromise. I don't see any obvious POSIX-compliant method for inducing this behavior. Going to think on it for a little.

ML [EAGAIN] The mapping could not be locked in memory, if required by mlockall ( ), due to
a lack of resources.
</assertion>

<assertion id="19" tag="ref:XSH6:25310:25342">
The mmap( ) function shall fail if:
[EBADF] The fildes argument is not a valid open file descriptor.
Copy link
Member

Choose a reason for hiding this comment

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

There is nothing wrong about this assertion (it does not even mention the rlimit), hence there is no need to remove it.

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.

None yet

2 participants