Skip to content

Commit 2bbbf83

Browse files
tagrawal03meta-codesync[bot]
authored andcommitted
Remove duplicate KatranOptionalTestFixtures.h
Summary: The KatranOptionalTestFixtures.h file was redundant because: Tests 1-2 (ICMP Too Big) → Already exist in KatranIcmpTooBigTestFixtures.h Tests 3-10 (LPM source lookup) → Already exist in KatranLpmSrcLookupTestFixtures.h Tests 11-16 (Inline decap) → Similar tests exist in KatranXPopDecapTestFixtures.h Test 17 (Local delivery) → Can be added to a dedicated fixture file if needed later Reviewed By: p-shah256 Differential Revision: D87907608 fbshipit-source-id: f5713be560b781df7f04978fe3fd71e7ae4c2460
1 parent 35f4425 commit 2bbbf83

3 files changed

Lines changed: 11 additions & 174 deletions

File tree

katran/lib/testing/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ add_library(bpftester STATIC
4545
fixtures/KatranHCTestFixtures.h
4646
fixtures/KatranGueTestFixtures.h
4747
fixtures/KatranTPRTestFixtures.h
48-
fixtures/KatranOptionalTestFixtures.h
4948
fixtures/KatranIcmpTooBigTestFixtures.h
5049
fixtures/KatranLpmSrcLookupTestFixtures.h
5150
fixtures/KatranUdpFlowMigrationTestFixtures.h

katran/lib/testing/fixtures/KatranOptionalTestFixtures.h

Lines changed: 0 additions & 170 deletions
This file was deleted.

katran/lib/testing/framework/katran_tester.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "katran/lib/MonitoringStructs.h"
2828
#include "katran/lib/testing/fixtures/KatranHCTestFixtures.h"
2929
#include "katran/lib/testing/fixtures/KatranIcmpTooBigTestFixtures.h"
30-
#include "katran/lib/testing/fixtures/KatranOptionalTestFixtures.h"
30+
#include "katran/lib/testing/fixtures/KatranLpmSrcLookupTestFixtures.h"
3131
#include "katran/lib/testing/fixtures/KatranUdpFlowMigrationTestFixtures.h"
3232
#include "katran/lib/testing/fixtures/KatranUdpStableRtTestFixtures.h"
3333
#include "katran/lib/testing/fixtures/KatranXPopDecapTestFixtures.h"
@@ -152,12 +152,20 @@ void runTestsFromFixture(
152152
prepareOptionalLbData(lb);
153153
LOG(INFO) << "Running optional tests. they could fail if requirements "
154154
<< "are not satisfied";
155+
// Run ICMP Too Big tests (requires ICMP_TOOBIG_GENERATION and kernel 4.17+)
155156
if (FLAGS_gue) {
156-
tester.resetTestFixtures(katran::testing::icmpTooBigTestFixtures);
157+
LOG(INFO) << "Running ICMP Too Big tests for Origin GUE";
158+
tester.resetTestFixtures(
159+
katran::testing::originGueIcmpTooBigTestFixtures);
157160
} else {
158-
tester.resetTestFixtures(katran::testing::optionalTestFixtures);
161+
LOG(INFO) << "Running ICMP Too Big tests";
162+
tester.resetTestFixtures(katran::testing::icmpTooBigTestFixtures);
159163
}
160164
tester.testFromFixture();
165+
// Run LPM source lookup tests (requires LPM_SRC_LOOKUP)
166+
LOG(INFO) << "Running LPM source lookup tests";
167+
tester.resetTestFixtures(katran::testing::lpmSrcLookupTestFixtures);
168+
tester.testFromFixture();
161169
testOptionalLbCounters(lb, testParam);
162170
}
163171
if (FLAGS_stable_rt) {

0 commit comments

Comments
 (0)