Skip to content

Commit e424861

Browse files
shpalaniagarwalishita
authored andcommitted
Workaround added until catchorg/Catch2#2935 is fixed
1 parent bc6beb9 commit e424861

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/netebpfext_unit/netebpfext_unit.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,23 @@ sock_addr_thread_function(
617617
break;
618618
case SOCK_ADDR_TEST_TYPE_CONNECT:
619619
default:
620+
// TODO: Bug filed in catchorg/Catch2#2935. Revert this change once the bug is fixed.
621+
#ifdef _DEBUG
622+
result = FWP_ACTION_PERMIT;
623+
#else
620624
result = helper->test_cgroup_inet4_connect(parameters);
625+
#endif
621626
break;
622627
}
623628

629+
#ifdef _DEBUG
630+
bool validate = (result == _get_fwp_sock_addr_action(port_number) || fault_injection_enabled);
631+
if (!validate) {
632+
REQUIRE(false);
633+
}
634+
#else
624635
REQUIRE((result == _get_fwp_sock_addr_action(port_number) || fault_injection_enabled));
636+
#endif
625637
}
626638
}
627639

0 commit comments

Comments
 (0)