Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTEST/IB: Don't fatal if an SL is blocked #10197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/gtest/common/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,16 @@ test_base::wrap_errors_logger(const char *file, unsigned line,
function, level, comp_conf, message, ap);
}

ucs_log_func_rc_t
test_base::wrap_fatal_logger(const char *file, unsigned line,
const char *function, ucs_log_level_t level,
const ucs_log_component_config_t *comp_conf,
const char *message, va_list ap)
{
return common_logger(UCS_LOG_LEVEL_FATAL, true, m_errors, 1000, file, line,
function, level, comp_conf, message, ap);
}

ucs_log_func_rc_t
test_base::wrap_warns_logger(const char *file, unsigned line,
const char *function, ucs_log_level_t level,
Expand Down
6 changes: 6 additions & 0 deletions test/gtest/common/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ class test_base {
const ucs_log_component_config_t *comp_conf,
const char *message, va_list ap);

static ucs_log_func_rc_t
wrap_fatal_logger(const char *file, unsigned line, const char *function,
ucs_log_level_t level,
const ucs_log_component_config_t *comp_conf,
const char *message, va_list ap);

static ucs_log_func_rc_t
wrap_warns_logger(const char *file, unsigned line, const char *function,
ucs_log_level_t level,
Expand Down
5 changes: 3 additions & 2 deletions test/gtest/uct/ib/test_ib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ void test_uct_ib::send_recv_short() {
EXPECT_TRUE((status == UCS_OK) || (status == UCS_INPROGRESS));

flush();
wait_for_value(&test_uct_ib::m_ib_am_handler_counter,
start_am_counter + 1, true);
wait_for_value(&test_uct_ib::m_ib_am_handler_counter, start_am_counter + 1,
true, 2);

ASSERT_EQ(sizeof(send_data), recv_buffer->length);
EXPECT_EQ(send_data, *(uint64_t*)(recv_buffer+1));
Expand Down Expand Up @@ -446,6 +446,7 @@ class test_uct_ib_sl : public test_uct_ib_with_specific_port {
UCS_TEST_P(test_uct_ib_sl, check_ib_sl_config) {
// go over all SLs, check UCTs could be initialized on a specific SL
// and able to send/recv traffic
scoped_log_handler log_handler(wrap_fatal_logger);
for (uint8_t sl = 0; sl < UCT_IB_SL_NUM; ++sl) {
if (!has_transport("rc_verbs") && !has_transport("ud_verbs")) {
// if AR is configured on the given SL, set AR_ENABLE to "y",
Expand Down
Loading