Skip to content

migrate libbeat seccomp integ test to go#49501

Merged
leehinman merged 1 commit intoelastic:mainfrom
leehinman:48850_convert_libbeat_seccomp_python_test
Mar 16, 2026
Merged

migrate libbeat seccomp integ test to go#49501
leehinman merged 1 commit intoelastic:mainfrom
leehinman:48850_convert_libbeat_seccomp_python_test

Conversation

@leehinman
Copy link
Contributor

Proposed commit message

  • Converts the libbeat seccomp Python integration test (test_seccomp.py) to Go, consistent with the ongoing migration of system tests to the Go integration test framework.
  • Adds TestSeccompInstalled in libbeat/tests/integration/seccomp_test.go, which verifies that the seccomp syscall filter is successfully installed on supported platforms (Linux ≥ 3.17, on i386/amd64/arm64).
  • Removes the now-redundant libbeat/tests/system/test_seccomp.py.

Benefit is that we will eventually be able to remove python from our build/testing environment.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

None. Test code

Author's Checklist

  • Run the same on macOS/Windows (or an unsupported arch) and confirm the test is skipped with the appropriate message. CI will do this.
  • Confirm no other tests in the repo reference the deleted Python file. Done by hand.

How to test this PR locally

cd libbeat
mage goIntegTest

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 16, 2026
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@leehinman leehinman added backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Mar 16, 2026
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 16, 2026
@leehinman leehinman marked this pull request as ready for review March 16, 2026 18:07
@leehinman leehinman requested a review from a team as a code owner March 16, 2026 18:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@leehinman leehinman requested review from AndersonQ and belimawr March 16, 2026 18:07
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ffc8da60-f982-468e-b64c-86e752cb4a82

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd7c3c and b2bc260.

📒 Files selected for processing (2)
  • libbeat/tests/integration/seccomp_test.go
  • libbeat/tests/system/test_seccomp.py
💤 Files with no reviewable changes (1)
  • libbeat/tests/system/test_seccomp.py

📝 Walkthrough

Walkthrough

This change migrates seccomp testing infrastructure from Python to Go. The system test file libbeat/tests/system/test_seccomp.py is removed and replaced with a new integration test libbeat/tests/integration/seccomp_test.go. The new integration test introduces an isSeccompSupported helper function that validates Linux platform with kernel 3.17+ across supported architectures (386/amd64/arm64), a configuration string for mockbeat, and a test that starts a mockbeat instance with seccomp configuration, waits for the "Syscall filter successfully installed" log message with a 60-second timeout, then stops the process.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

Copy link
Member

@mauri870 mauri870 left a comment

Choose a reason for hiding this comment

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

Thanks!

@leehinman leehinman merged commit 882c812 into elastic:main Mar 16, 2026
217 of 222 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify skip-changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants