Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf_conformance_runner strips new-lines from error output #279

Open
Alan-Jowett opened this issue Jul 9, 2024 · 0 comments
Open

bpf_conformance_runner strips new-lines from error output #279

Alan-Jowett opened this issue Jul 9, 2024 · 0 comments

Comments

@Alan-Jowett
Copy link
Owner

Output looks like this:

alanjo@alanjo-dev2:~/bpf_conformance$ cat test.data
# test: exit.data
# Test for EXIT instruction with no prior operations
-- asm
exit
-- result
0x0"
alanjo@alanjo-dev2:~/bpf_conformance$ sudo build/bin/bpf_conformance_runner --test_file_path ./test.data --debug true  --plugin_path build/bin/libbpf_plugin --plugin_options "--debug"
Test file: "./test.data"
Input memory:
Expected return value: 0
Expected error string:
Byte code: 95  00  00  00  00  00  00  00
Test:"./test.data"FAILPlugin returned error code 1 and output Failed to load program: 0: (85) call pc+4caller: R10=fp0callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp05: (95) exitreturning from callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0to caller at 1: R10=fp0from 5 to 1: R10=fp01: (18) r1 = 0xffff9546ef55a3103: (7b) *(u64 *)(r1 +0) = r0R0 !read_okprocessed 4 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
Test "./test.data" error: Plugin returned error code 1 and output Failed to load program: 0: (85) call pc+4caller: R10=fp0callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp05: (95) exitreturning from callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0to caller at 1: R10=fp0from 5 to 1: R10=fp01: (18) r1 = 0xffff9546ef55a3103: (7b) *(u64 *)(r1 +0) = r0R0 !read_okprocessed 4 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
Test results:
ERROR: "./test.data" Plugin returned error code 1 and output Failed to load program: 0: (85) call pc+4caller: R10=fp0callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp05: (95) exitreturning from callee: frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0to caller at 1: R10=fp0from 5 to 1: R10=fp01: (18) r1 = 0xffff9546ef55a3103: (7b) *(u64 *)(r1 +0) = r0R0 !read_okprocessed 4 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
Passed 0 out of 1 tests.

When it should look like this:

alanjo@alanjo-dev2:~/bpf_conformance$ sudo build/bin/bpf_conformance_runner --test_file_path ./test.data --plugin_path build/bin/libbpf_plugin --plugin_options "--debug"
Test "./test.data" error: Plugin returned error code 1 and output Failed to load program: 0: (85) call pc+4
caller:
 R10=fp0
callee:
 frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0
5: (95) exit
returning from callee:
 frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0
to caller at 1:
 R10=fp0

from 5 to 1: R10=fp0
1: (18) r1 = 0xffff954402881510
3: (7b) *(u64 *)(r1 +0) = r0
R0 !read_ok
processed 4 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0


Test results:
ERROR: "./test.data" Plugin returned error code 1 and output Failed to load program: 0: (85) call pc+4
caller:
 R10=fp0
callee:
 frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0
5: (95) exit
returning from callee:
 frame1: R1=ctx(id=0,off=0,imm=0) R10=fp0
to caller at 1:
 R10=fp0

from 5 to 1: R10=fp0
1: (18) r1 = 0xffff954402881510
3: (7b) *(u64 *)(r1 +0) = r0
R0 !read_ok
processed 4 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0


Passed 0 out of 1 tests.
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

No branches or pull requests

1 participant