Page MenuHomeFreeBSD

Fix posix_spawn attributes test and add it to the build
ClosedPublic

Authored by kib on Aug 30 2015, 6:12 PM.
Tags
None
Referenced Files
F105952837: D3533.diff
Mon, Dec 23, 1:19 AM
Unknown Object (File)
Fri, Dec 6, 3:55 AM
Unknown Object (File)
Oct 14 2024, 8:18 AM
Unknown Object (File)
Oct 1 2024, 3:40 PM
Unknown Object (File)
Sep 24 2024, 8:57 AM
Unknown Object (File)
Sep 22 2024, 5:58 AM
Unknown Object (File)
Sep 16 2024, 12:48 AM
Unknown Object (File)
Sep 11 2024, 2:26 AM
Subscribers

Details

Summary

The posix_spawn attributes test is disabled. It indeed has two large issues.

One is that it assumes that SCHED_* constants are contiguous, which is not neccessary.
Another, which causes test failures, is that the test assumes that the priority ranges for all types of schedulers are same, which is not true on FreeBSD.

Patch changes test to use explicit array of SCHED_* policies constants, order of elements of the array is used to select next scheduler. The get_different_priority() is modified to work with the prio range for the new scheduler, instead of the current one.

Also, fixed several cosmetics, like double flag specification, unused MIN/MAX, use if K&R definitions etc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib retitled this revision from to Fix posix_spawn attributes test and add it to the build.
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: tests, pho, jilles.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
pho edited edge metadata.

Tested OK.

lib/libc/tests/gen/posix_spawn/Makefile
15

"spawnattr_test"?

This revision is now accepted and ready to land.Aug 30 2015, 6:51 PM
jilles edited edge metadata.

Looks OK apart from minor style issues.

contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c
49

This can be const.

74

The upstream code style appears not to add redundant parentheses around return values.

96

Likewise, please no parentheses.

kib marked 4 inline comments as done.Aug 30 2015, 9:07 PM
kib edited edge metadata.

Handled pho and jilles notes.

This revision now requires review to proceed.Aug 30 2015, 9:09 PM
jilles edited edge metadata.
This revision is now accepted and ready to land.Aug 30 2015, 9:10 PM
This revision was automatically updated to reflect the committed changes.