Loading
bdev_ut: store initialization order of the examine claim test modules
The test `examine_claimed` relies on the examine order of bdev modules. However, bdev modules are registered using GCC constructors, which don't provide any guarantee on the order of execution. As a consequence, the test can result in a segfault if the order is not the one expected by the test. To fix this issue, implement the init functions of the `examine_claimed` modules so that their relative order in the modules list is known by the test. With this change, no change to the actual test is required. This can be simply tested by altering the order of `SPDK_BDEV_MODULE_REGISTER` occurences in the test file. Change-Id: I129ec3cb48f3053ae7cace459d4de73dacf88d2d Signed-off-by:Nathan Claudel <nathan.claudel@kalrayinc.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23635 Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>