ofiwg / libfabric

Open Fabric Interfaces
http://libfabric.org/
Other
555 stars 376 forks source link

prov/efa/test: Disable shm via fi_setopt #10406

Closed shijin-aws closed 1 week ago

shijin-aws commented 1 week ago

Currently, all unit tests disable shm transfer by closing the shm ep directly, which is a hacky shortcut. This hack can cause trouble when more procedure is needed for shm closure. This patch fixes this issue by disabling shm via the public fi_setopt API with FI_OPT_SHARED_MEMORY_PERMITTED as false.

A common utility function efa_unit_test_resource_construct_rdm_shm_disabled() is introduced and all test functions that need to disable shm should use this common function instead.