From 16ccaaf2de86772220ca6c9fb4595405c8d8e196 Mon Sep 17 00:00:00 2001 From: Thomas Vegas Date: Thu, 13 Jun 2024 09:55:58 +0300 Subject: [PATCH] GO/TESTS: Use serialized thread mode --- bindings/go/src/ucx/ucs_constants.go | 5 +++-- bindings/go/tests/endpoint_test.go | 2 +- bindings/go/tests/listener_test.go | 2 +- bindings/go/tests/worker_test.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bindings/go/src/ucx/ucs_constants.go b/bindings/go/src/ucx/ucs_constants.go index 483e8935203..eab44f336d6 100644 --- a/bindings/go/src/ucx/ucs_constants.go +++ b/bindings/go/src/ucx/ucs_constants.go @@ -14,8 +14,9 @@ import "C" type UcsThreadMode int const ( - UCS_THREAD_MODE_SINGLE UcsThreadMode = C.UCS_THREAD_MODE_SINGLE - UCS_THREAD_MODE_MULTI UcsThreadMode = C.UCS_THREAD_MODE_MULTI + UCS_THREAD_MODE_SINGLE UcsThreadMode = C.UCS_THREAD_MODE_SINGLE + UCS_THREAD_MODE_SERIALIZED UcsThreadMode = C.UCS_THREAD_MODE_SERIALIZED + UCS_THREAD_MODE_MULTI UcsThreadMode = C.UCS_THREAD_MODE_MULTI ) type UcsMemoryType int diff --git a/bindings/go/tests/endpoint_test.go b/bindings/go/tests/endpoint_test.go index f8190d3b644..8050dd479f4 100644 --- a/bindings/go/tests/endpoint_test.go +++ b/bindings/go/tests/endpoint_test.go @@ -112,7 +112,7 @@ func TestUcpEpTag(t *testing.T) { receiver := prepareContext(t, nil) t.Logf("Testing tag %v -> %v", memType.senderMemType, memType.recvMemType) - ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SINGLE) + ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SERIALIZED) ucpWorkerParams.WakeupTagSend().WakeupTagRecv() receiver.worker, _ = receiver.context.NewWorker(ucpWorkerParams) diff --git a/bindings/go/tests/listener_test.go b/bindings/go/tests/listener_test.go index b348d743e4a..cf318a7e559 100644 --- a/bindings/go/tests/listener_test.go +++ b/bindings/go/tests/listener_test.go @@ -19,7 +19,7 @@ func TestUcpListener(t *testing.T) { ucpParams := (&UcpParams{}).EnableTag() - ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SINGLE) + ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SERIALIZED) listenerParams := &UcpListenerParams{} listenerParams.SetSocketAddress(addr) diff --git a/bindings/go/tests/worker_test.go b/bindings/go/tests/worker_test.go index 2c1ecad408a..757df6f169d 100644 --- a/bindings/go/tests/worker_test.go +++ b/bindings/go/tests/worker_test.go @@ -17,7 +17,7 @@ func TestUcpWorkerEfd(t *testing.T) { ucpContext, _ := NewUcpContext((&UcpParams{}).EnableTag().EnableWakeup()) defer ucpContext.Close() ucpWorkerParams := &UcpWorkerParams{} - ucpWorkerParams.SetThreadMode(UCS_THREAD_MODE_SINGLE) + ucpWorkerParams.SetThreadMode(UCS_THREAD_MODE_SERIALIZED) ucpWorkerParams.WakeupEdge() ucpWorker, err := ucpContext.NewWorker(ucpWorkerParams)