Skip to content

Automated testing framework which will give us regression and coverage reports, meant to run in a GH Action and locally#84

Merged
r41k0u merged 12 commits into
masterfrom
testing-framework
Apr 25, 2026
Merged

Automated testing framework which will give us regression and coverage reports, meant to run in a GH Action and locally#84
r41k0u merged 12 commits into
masterfrom
testing-framework

Conversation

@r41k0u

@r41k0u r41k0u commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

r41k0u and others added 3 commits March 30, 2026 19:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@r41k0u r41k0u requested a review from varun-r-mallya March 30, 2026 14:06
Comment thread tests/framework/collector.py Outdated
import sys
from pathlib import Path

if sys.version_info >= (3, 11):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unnecessary, will always be >3.11

Comment thread tests/framework/collector.py Outdated
else:
import tomli as tomllib

from .bpf_test_case import BpfTestCase

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should use full paths

Comment thread tests/framework/collector.py Outdated
CONFIG_FILE = TESTS_DIR / "test_config.toml"

VMLINUX_TEST_DIRS = {"passing_tests/vmlinux"}
VMLINUX_TEST_PREFIXES = {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These var names don't make sense here. VMLINUX_TEST_DIRS_PASSING and VMLINUX_TEST_DIRS_FAILING, with a union for VMLINUX_TEST_DIRS should be the right one

Comment thread tests/framework/verifier.py Outdated
text=True,
timeout=30,
)
output = result.stdout + result.stderr

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

maybe return a map with stdout and stderr keys?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

better - use namedtuple

@r41k0u

r41k0u commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator Author

we can cleanup test_config.toml in the next PR where we fix all existing tests

Comment thread tests/framework/verifier.py Outdated
text=True,
timeout=30,
)
output = result.stdout + result.stderr

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

better - use namedtuple

Comment thread pyproject.toml Outdated
test = [
"pytest>=8.0",
"pytest-cov>=5.0",
"tomli>=2.0; python_version < '3.11'",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

unnecessary

@r41k0u r41k0u merged commit d1bb019 into master Apr 25, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant