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>
diff --git a/unix/sysvshm_unix_test.go b/unix/sysvshm_unix_test.go
index 61c7b8d..c1eff8d 100644
--- a/unix/sysvshm_unix_test.go
+++ b/unix/sysvshm_unix_test.go
@@ -26,6 +26,11 @@
 		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)
 	}