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

chore: move syscaller to dist #3269

Merged
merged 1 commit into from Jun 27, 2023

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Jun 26, 2023

1. Explain what the PR does

dc06833 chore: move syscaller to dist (2023/jun/26) Geyslan Gregório <geyslan@gmail.com>

This commit moves syscaller to dist.

This also makes integration tests don't fail if not run as root. Now,
they will just skip the tests that require root privileges.

2. Explain how to test it

make integration-test
sudo make integration-test

3. Other comments

@rafaeldtinoco
Copy link
Contributor

@geyslan I noticed that I can't vscode "run all tests" because of integration root needs. Is there a way we can "bypass" tests if not root, instead of failing ? This way I can use that feature in vscode (and we still can test integration using root in other places). WDYT ?

@geyslan
Copy link
Member Author

geyslan commented Jun 26, 2023

@geyslan I noticed that I can't vscode "run all tests" because of integration root needs. Is there a way we can "bypass" tests if not root, instead of failing ? This way I can use that feature in vscode (and we still can test integration using root in other places). WDYT ?

Let me give a try. Back soon.

@geyslan
Copy link
Member Author

geyslan commented Jun 26, 2023

Doable. Changing the behaviour.

=== RUN   Test_EventFilters
    tracee.go:229: ***** Test_EventFilters must be run as ROOT *****
--- SKIP: Test_EventFilters (0.00s)
=== RUN   Test_ParseCmd
--- PASS: Test_ParseCmd (0.00s)
=== RUN   Test_InitNamespacesEvent
    tracee.go:229: ***** Test_InitNamespacesEvent must be run as ROOT *****
--- SKIP: Test_InitNamespacesEvent (0.00s)
PASS
ok      github.com/aquasecurity/tracee/tests/integration        0.053s
?       github.com/aquasecurity/tracee/tests/integration/cpu    [no test files]
=== RUN   Test_callsys
--- PASS: Test_callsys (0.00s)
=== RUN   Test_changeOwnComm
--- PASS: Test_changeOwnComm (0.00s)
PASS
ok      github.com/aquasecurity/tracee/tests/integration/syscaller/cmd  0.031s

@geyslan geyslan force-pushed the syscaller-in-dist branch 2 times, most recently from a0580dc to 6aa2295 Compare June 26, 2023 14:28
This commit moves syscaller to dist.

This also makes integration tests don't fail if not run as root. Now,
they will just skip the tests that require root privileges.
Copy link
Contributor

@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaeldtinoco
Copy link
Contributor

Cool. It skips the tests now ... and I just realized that:

image

Ubuntu's have this "problem" about "/usr/bin" being "/bin", so we should consider both (but its not related to this PR).

@rafaeldtinoco rafaeldtinoco merged commit 18643bc into aquasecurity:main Jun 27, 2023
25 checks passed
rafaeldtinoco pushed a commit to rafaeldtinoco/tracee that referenced this pull request Jun 29, 2023
This commit moves syscaller to dist.

This also makes integration tests don't fail if not run as root. Now,
they will just skip the tests that require root privileges.
@geyslan geyslan deleted the syscaller-in-dist branch July 31, 2023 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants