MFC r328896, r329236
Fix and enable SysV IPC tests.
Don't declare some types that FreeBSD incorrectly declares.
Fix an incorrect call to open() (missing mode).
Enable SysV message queue, semaphore, and shared memory tests.
With exception of the workaround for union semun, these fixes have been
committed to NetBSD.
Reviewed by: asomers
Approved by: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13471
Fix Coverity CIDs in the sys/kern/sysv_test tests
CID 979810: strcpy => strlcpy
CID 1193367: don't leak a file descriptor
CID 1299856: Check the return value of read(2)
Reported by: Coverity
Coverity CID: 978910 1193367 1299856
Sponsored by: Spectra Logic Corp