aboutgitcodelistschat:MatrixIRC
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* test: add test for act_callAlice Frosi2023-02-211-1/+23
|
* test: add ignore_ret for checking test resultAlice Frosi2023-02-211-7/+9
|
* actions: add data sectionAlice Frosi2023-02-211-6/+6
|
* tests: remove unused variablesAlice Frosi2023-02-211-7/+2
|
* tests: test reference for a_returnAlice Frosi2023-02-161-1/+33
| | | | Signed-off-by: Alice Frosi <afrosi@redhat.com>
* tests: fix the suite with the wrong testAlice Frosi2023-02-161-1/+1
|
* tests: separate every action in its own test caseAlice Frosi2023-02-161-18/+33
| | | | | | Separating every action is in a test case enable filtering using check env variable. Like: sudo -E CK_RUN_CASE="a_inject_a" tests/unit/test-actions
* tests: add tests for inject actionsAlice Frosi2023-02-161-11/+89
| | | | | | | | The inject actions install a fd into the target. The tests for those actions create a temporary file and install the file descriptor into the target, and check for the existance of the new fd. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* test: interrupt test on target process exitAlice Frosi2023-02-161-0/+13
| | | | | | | Catch if the target process has exited due to an error and interrupt the tests. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Unmap at struct on teardown if setAlice Frosi2023-02-151-1/+7
| | | | Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Add test actionsAlice Frosi2023-02-152-1/+229
| | | | | | | | | Unit test for the action return, block and continue. The unit test installs a seccomp filter into the target for filter the getpid syscalls. Based on the action, the test checks the result of the syscall in the target to validate the correctness of the actions. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* test: add unit test for act callAlice Frosi2023-02-152-1/+231
| | | | | | | | | Tests: - getppid syscall - read syscall without context - opena and read syscalls with a mount namespace Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Add unit tests for the BPF filter generationAlice Frosi2022-12-212-0/+379
The test-filter verifies that the create_bfp_program builds the filter correctly. The test suite includes the tests for checking a filter with: * a single instruction * a single instruction with arguments * 2 instructions * multiple instructions * multiple instructions with arguments * multiple instructions with multiple instance of the same instruction Signed-off-by: Alice Frosi <afrosi@redhat.com>