Age | Commit message (Collapse) | Author |
|
Instead of explicit test-mapping config use the host-unit-tests setup
go/a-unit-tests
Change-Id: Iac7920db0dc4f4fa17427c78fa13b496daa01208
Test: presubmit
Bug: 192278266
|
|
Added SPDX-license-identifier-Apache-2.0 to:
Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I1b5e37887a6f0a87a2bba1483330ba14f81b89c8
|
|
Currently it's possible to run apf_run_test locally, but not
remotely, because the required binary (apf_run) is not packaged
when the test is built.
Fix this using the new data_bins property, and remove the useless
requires: which was an attempt to fix this problem. Make the
test shell script invoke apf_run with "./" because the binary is
in the same directory as the test (it used to work when running
locally because it was in a directory that was in $PATH).
Also annotate the test with a null-device property, since it does
not require a device. This does not seem to work with atest but
hopefully it does work when running remotely.
Bug: 143248826
Test: atest apf_run_test
Test: forrest run L17500000674511176
Change-Id: Ifec451c5ab4f4c96ad91a9a64157d88800e443e2
|
|
Test: m nothing && inspect Android.mk
Change-Id: I0f2fe987124291dde54acdea157d075440d2ae4a
|
|
libapf is intended to be run on wireless chipsets so it must
never depend on Android platform internals. Set it to the SDK
version that was current when the interpreter was written.
Test: m libapf
Bug: 148753875
Change-Id: Ib20aa28f37f344032b0cc4fc104bda6a3b5a5919
|
|
Currently, this will run NetworkStackTests (which run the
interpreter) and apf_run_test (which runs the disassembler).
Also disable apf_run_test on Windows because it's a shell script
that relies on bash.
Bug: 66928272
Test: treehugger
Change-Id: I0773887604a2c41e63e4c6c629ad81c3e6143bcc
|
|
These tests cover both apf_run itself and the disassembler (and
of course the interpreter).
Test: atest apf_run_test
Change-Id: I622bb2bbd0ec48bdddb511963c374651705ff545
|
|
apf_run is a great tool to debug APF programs, but it does not
currently print disassemled code. Fix this.
Before:
PC: 0 R0: 0 R1: 0
PC: 2 R0: 86dd R1: 0
PC: 7 R0: 86dd R1: 0
PC: 64 R0: 86dd R1: 0
PC: 141 R0: 86dd R1: 0
After:
R0 R1 PC Instruction
-------------------------------------------------
0 0 0: ldh r0, [12]
2 86dd 2: jlt r0, 0x600, drop
7 86dd 7: jne r0, 0x806, 64
40 86dd 64: jne r0, 0x800, 141
8d 86dd 141: jeq r0, 0x86dd, 161
...
Bug: 66928272
Test: manually compared output on a sample program
Change-Id: I1b93f70e0381d6e43d7f7d9785ab8c935baa1e4b
|
|
Test: m apf_run apf_disassembler libapf
Change-Id: I43b975a6afa11f693268317de69967e7774a1c85
|
|
This adds a --trace option to apf_run which dumps the PC and register
content during execution. This is a big aid in debugging misbehaving
APF programs.
It should be easy to disassemble the current instruction inline if we
refactor apf_disassembler to extract its body to a separate function.
Another easy feature would be dumping the memory locations that were
modified by the previous instruction.
Test: apf_run --trace --program <program> --packet <packet> --data <data>
Change-Id: I2a24bdfb84ce4e86409542332ee32082988a7698
|
|
Fix build break since libpcap did not enable for darwin
Test: tried disable on linux and change target to darwin
Change-Id: Iadc463cfa96190cbc8e44f084fb81e8a71050d18
|
|
To read a pcap file and run the packets through APF program.
Bug: 114458629
Test: make apf_run works
Change-Id: I7e5dddf3092d787f6191e4a51afb165cd9dd71c4
|
|
See build/soong/README.md for more information.
Test: cd hardware/google/apf; mma
Change-Id: I67e3ac7199cc70126504436c8b47beb6f9d292ad
|