Skip to content

selftests/bpf: migrate align.c tests to test_loader framework#11017

Closed
eddyz87 wants to merge 1 commit intokernel-patches:bpf-next_basefrom
eddyz87:migrate-align-tests
Closed

selftests/bpf: migrate align.c tests to test_loader framework#11017
eddyz87 wants to merge 1 commit intokernel-patches:bpf-next_basefrom
eddyz87:migrate-align-tests

Conversation

@eddyz87
Copy link
Collaborator

@eddyz87 eddyz87 commented Feb 11, 2026

While working on pointer tracking changes I found it necessary to update expected log messages in align.c series of tests. As a preliminary step, migrate these tests to test_loader framework.

The tests in question load BPF program and check if expected log is produced, the log is specified as:

.matches = {
	...
	{4, "R3", "32"},
	...
},

Where:

  • '4' is an instruction number (contrary to the field name in struct bpf_reg_match).
  • 'R3' is the name of the register to check.
  • '32' is the value expected for this register.

Mimic the same logic using __msg macro.

@eddyz87 eddyz87 force-pushed the migrate-align-tests branch from d352ae8 to 6418d46 Compare February 11, 2026 04:10
While working on pointer tracking changes I found it necessary to
update expected log messages in align.c series of tests.
As a preliminary step, migrate these tests to test_loader framework.

The tests in question load BPF program and check if expected log is
produced, the log is specified as:

	.matches = {
		...
		{4, "R3", "32"},
		...
	}

Where:
- '4' is an *instruction number* (contrary to the field name in
  struct bpf_reg_match).
- 'R3' is the name of the register to check.
- '32' is the value expected for this register.

Mimic the same logic using __msg macro.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
@eddyz87 eddyz87 force-pushed the migrate-align-tests branch from 6418d46 to 1b32deb Compare February 11, 2026 04:28
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 8 times, most recently from a4a9811 to 2650068 Compare February 13, 2026 22:49
@kernel-patches-daemon-bpf
Copy link

Automatically cleaning up stale PR; feel free to reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant