unix: skip TestSysvSharedMemory on ENOSYS

Whether System V IPC is supported is a kernel configuration.

For golang/go#48708

Change-Id: Id0d23a5ede5f75f70ca6bb0b8abaec773b6adc74
Reviewed-on: https://go-review.googlesource.com/c/sys/+/353392
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Ian Lance Taylor
2021-09-30 12:32:49 -07:00
parent 969570ce7c
commit f542c8878d

View File

@@ -26,6 +26,11 @@ func TestSysvSharedMemory(t *testing.T) {
return
}
// The kernel may have been built without System V IPC support.
if err == unix.ENOSYS {
t.Skip("shmget not supported")
}
if err != nil {
t.Fatalf("SysvShmGet: %v", err)
}