From 46e52a0bcb8c00cdbc2b60fd6fe0838ffd8de25c Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 16 Dec 2019 21:03:45 -0500 Subject: [PATCH] test/common: Set invalid value to CPU core API stubs This change verifies that all existing unit tests don't care about CPU core configuration. The subsequent patches will mock CPU core operations. Signed-off-by: Shuhei Matsumoto Change-Id: I44cc56908cf8609870625ff19d6100e21036c00f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478152 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris Reviewed-by: Paul Luse Reviewed-by: Ben Walker --- test/common/lib/test_env.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/common/lib/test_env.c b/test/common/lib/test_env.c index 4a7af26f0..d2d103087 100644 --- a/test/common/lib/test_env.c +++ b/test/common/lib/test_env.c @@ -44,11 +44,11 @@ DEFINE_STUB(spdk_memzone_lookup, void *, (const char *name), NULL) DEFINE_STUB(spdk_pci_nvme_get_driver, struct spdk_pci_driver *, (void), NULL) DEFINE_STUB(spdk_pci_ioat_get_driver, struct spdk_pci_driver *, (void), NULL) DEFINE_STUB(spdk_pci_virtio_get_driver, struct spdk_pci_driver *, (void), NULL) -DEFINE_STUB(spdk_env_get_first_core, uint32_t, (void), 0); -DEFINE_STUB(spdk_env_get_next_core, uint32_t, (uint32_t prev_core), 0); -DEFINE_STUB(spdk_env_get_last_core, uint32_t, (void), 1); -DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0); -DEFINE_STUB(spdk_env_get_socket_id, uint32_t, (uint32_t core), 0); +DEFINE_STUB(spdk_env_get_first_core, uint32_t, (void), UINT32_MAX); +DEFINE_STUB(spdk_env_get_next_core, uint32_t, (uint32_t prev_core), UINT32_MAX); +DEFINE_STUB(spdk_env_get_last_core, uint32_t, (void), UINT32_MAX); +DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), UINT32_MAX); +DEFINE_STUB(spdk_env_get_socket_id, uint32_t, (uint32_t core), SPDK_ENV_SOCKET_ID_ANY); /* * These mocks don't use the DEFINE_STUB macros because