Skip to content

Commit 6d58c64

Browse files
konstantin-s-bogomgvisor-bot
authored andcommitted
Run nftable tests on buildkite.
PiperOrigin-RevId: 825239624
1 parent 9095071 commit 6d58c64

File tree

7 files changed

+493
-507
lines changed

7 files changed

+493
-507
lines changed

.buildkite/pipeline.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,15 @@ steps:
483483
<<: *ubuntu_agents
484484
# This test is flaky on old agents.
485485
cgroup: "v2"
486+
- <<: *common
487+
<<: *source_test
488+
label: ":table: Native NFTable Syscall tests"
489+
command: make nftables-syscall-tests
490+
agents:
491+
<<: *ubuntu_agents
492+
# Test is only validated to run on newer agents, older kernels have
493+
# different implementation behaviour.
494+
cgroup: "v2"
486495

487496
# Runtime tests.
488497
- <<: *common

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,12 @@ nftables-tests: load-nftables $(RUNTIME_BIN)
435435
@$(call test_runtime,$(RUNTIME),--test_env=TEST_NET_RAW=true //test/nftables:nftables_test)
436436
.PHONY: nftables-tests
437437

438+
nftables-syscall-tests: load-basic
439+
@sudo modprobe nfnetlink
440+
@sudo modprobe nf_tables
441+
@$(call sudo,test,--runtime=runc //test/syscalls/linux:socket_netlink_netfilter_test)
442+
.PHONY: nftables-syscall-tests
443+
438444
packetdrill-tests: load-packetdrill $(RUNTIME_BIN)
439445
@$(call install_runtime,$(RUNTIME),) # Clear flags.
440446
@$(call test_runtime,$(RUNTIME),//test/packetdrill:all_tests)

test/syscalls/linux/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,6 +3544,7 @@ cc_binary(
35443544
"//test/util:socket_util",
35453545
"//test/util:test_main",
35463546
"//test/util:test_util",
3547+
"@com_google_absl//absl/strings",
35473548
"@com_google_absl//absl/strings:str_format",
35483549
],
35493550
)
@@ -3729,7 +3730,10 @@ cc_library(
37293730
":socket_netlink_util",
37303731
"//test/util:file_descriptor",
37313732
"//test/util:posix_error",
3733+
"//test/util:save_util",
3734+
"//test/util:test_util",
37323735
"@com_google_absl//absl/log",
3736+
"@com_google_absl//absl/strings:string_view",
37333737
],
37343738
)
37353739

0 commit comments

Comments
 (0)