Race conditions with the cmd-sync changes can cause fail status codes to
be different than originally expected. New test parameter fail_tolerant
allows a trivial fail-code mismatches to "Pass" while also warning that
the status wasn't exactly as expected.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
bool expect_sc_key;
bool force_power_off;
bool addr_type_avail;
+ bool fail_tolerant;
uint8_t addr_type;
bool set_adv;
const uint8_t *adv_data;
.force_power_off = true,
.expect_status = MGMT_STATUS_NOT_POWERED,
.expect_func = get_conn_info_expect_param_power_off_func,
+ .fail_tolerant = true,
};
static const uint8_t load_conn_param_nval_1[16] = { 0x12, 0x11 };
test->send_opcode, mgmt_errstr(status), status);
if (status != test->expect_status) {
- tester_test_abort();
- return;
+ if (!test->fail_tolerant || !!status != !!test->expect_status) {
+ tester_test_abort();
+ return;
+ }
+
+ tester_warn("Unexpected status got %d expected %d",
+ status, test->expect_status);
}
if (!test->expect_ignore_param) {