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

add log tests for test_kselftest parser #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .

- name: Run tests
run: |
chmod +x ./run_tests.sh
./run_tests.sh


2 changes: 1 addition & 1 deletion logspec/errors/linux_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ErrorReturnCode(Error):
"""Models the basic information of a generic failed with error -2
report.
"""
start_marker_regex = f'{LINUX_TIMESTAMP} .*?error -\d+.*?'
start_marker_regex = fr'{LINUX_TIMESTAMP} .*?error -\d+.*?'

def __init__(self):
super().__init__()
Expand Down
23 changes: 23 additions & 0 deletions tests/logs/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
make[2]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/cgroup'
make[2]: *** [../lib.mk:151: /tmp/kci/linux/tools/testing/selftests/cgroup/test_memcontrol] Error 1

- kbuild_016.log: Compiler linker error.
arm-linux-gnueabihf-ld: arch/arm/boot/compressed/atags_to_fdt.o: in function `atags_to_fdt':
atags_to_fdt.c:(.text.atags_to_fdt+0x18): undefined reference to `stackleak_track_stack'

- kbuild_017.log: Modpost error: Section mismatches detected.
FATAL: modpost: Section mismatches detected.


./linux_boot

Expand Down Expand Up @@ -138,6 +145,16 @@
Call Trace:
...

- linux_boot_007.log: Kernel started but prompt not found.

- linux_boot_008.log: Kernel panic incomplete due reboot.
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
CPU: 7 UID: 0 PID: 1 Comm: init Not tainted 6.13.0 #1 865d6bb48e84b69528fd174092f0d34c61cedaf4
Hardware name: Google Steelix board (DT)
Call trace:
show_stack+0x20/0x38 (C)
dump_stack_lvl+0xc8/0xf8
...


./test_baseline
Expand All @@ -155,3 +172,9 @@
kern :alert : BUG: kernel NULL pointer dereference, address: 00000000000002fc
kern :alert : #PF: supervisor read access in kernel mode
kern :alert : #PF: error_code(0x0000) - not-present page


./test_kselftest

- test_kselftest_001.log: not ok
not ok 1 selftests: exec: execveat # exit=1
Loading