fix sem_close regression test
authorÉrico Nogueira <ericonr@disroot.org>
Tue, 27 Apr 2021 20:46:17 +0000 (17:46 -0300)
committerSzabolcs Nagy <nsz@port70.net>
Tue, 27 Apr 2021 20:51:38 +0000 (20:51 +0000)
commita0c28c7673121dcb9305d1ea21aa5a42a5d9929d
treef7559e0f73b55d93f9cae3eed0ddf9960b6731b2
parent036d732af6e34bfffc5158d24b8ef29eb6063a79
fix sem_close regression test

sem_close with O_CREAT takes 4 parameters, not 3. The last parameter,
the initial value for the semaphore, had an arbitrary value from
whatever was on the stack, and lead to spurious failures with EINVAL
when it happened to be greater than SEM_VALUE_MAX. Since there isn't
error checking in this test, this lead to a segfault in the first
sem_post call.
src/regression/sem_close-unmap.c