From f542c8878de8d2a4a3560321af9f836d276c5bc3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 30 Sep 2021 12:32:49 -0700 Subject: [PATCH] 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 Run-TryBot: Ian Lance Taylor Reviewed-by: Tobias Klauser --- unix/sysvshm_unix_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/sysvshm_unix_test.go b/unix/sysvshm_unix_test.go index 61c7b8d6..c1eff8dd 100644 --- a/unix/sysvshm_unix_test.go +++ b/unix/sysvshm_unix_test.go @@ -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) }