HomeFreeBSD

Fix t_spawnattr test for attributes handling by posix_spawn(3).

Description

Fix t_spawnattr test for attributes handling by posix_spawn(3).
Connect it to the build.

The code assumed that SCHED_* constants form a contiguous set of
numbers, remove the assumption by using schedulers[] array in
get_different_scheduler(). This is no-op on FreeBSD, but improves
code portability.

The selection of different priority used the min/max priority range of
the current scheduler class, instead of the priority to be changed to.
The bug caused the test failure.

Remove duplication of POSIX_SPAWN_SETSIGDEF flag and now unused
duplications of MIN/MAX definitions.

Reviewed by: jilles, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3533

Details

Provenance
kibAuthored on
Reviewer
jilles
Differential Revision
D3533: Fix posix_spawn attributes test and add it to the build
Parents
rS287359: Added a "out of VM" test scenario.
Branches
Unknown
Tags
Unknown