Skip to content
Closed
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
88 changes: 33 additions & 55 deletions .github/workflows/ring3-enosys.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,56 @@
name: Ring-3 ENOSYS Test

on:
pull_request:
paths:
- 'kernel/**'
- 'userspace/**'
- 'tests/**'
- 'xtask/**'
- '.github/workflows/ring3-enosys.yml'
push:
branches: [ main ]
workflow_dispatch:
branches: [ "**" ]
pull_request:

jobs:
ring3-enosys:
name: Test ENOSYS syscall handling
runs-on: ubuntu-latest
timeout-minutes: 15

timeout-minutes: 20

env:
CARGO_UNSTABLE_BINDEPS: true

steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust nightly toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2025-06-24
override: true
target: x86_64-unknown-none
components: rust-src, llvm-tools-preview

- name: Install QEMU
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-x86 qemu-utils
sudo apt-get install -y qemu-system-x86 ovmf nasm

- name: Cache cargo registry + build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build userspace tests
run: |
# Add LLVM tools to PATH
export PATH="$PATH:$(rustc --print sysroot)/lib/rustlib/x86_64-unknown-linux-gnu/bin"
cd userspace/tests
cargo build --release --target=x86_64-unknown-none --bin syscall_enosys || true
# Allow failure since userspace/ may not exist yet
./build.sh

- name: Build kernel with test features
run: cargo build --all --release --features "testing,external_test_bins"
- name: Run Ring-3 ENOSYS test
run: cargo run -p xtask -- ring3-enosys

- name: Run ENOSYS integration test
run: |
cargo test --test ring3_enosys_test --release
echo "Integration test completed"

- name: Build and run xtask ENOSYS test
run: |
cd xtask
cargo build --release
timeout 60 cargo run --release -- ring3-enosys || true
# Allow failure but capture output

- name: Check for test evidence in logs
if: always()
run: |
echo "=== Checking for ENOSYS test evidence ==="
if [ -f target/xtask_ring3_enosys_output.txt ]; then
echo "Found xtask output file"
grep -E "ENOSYS|Invalid syscall|999" target/xtask_ring3_enosys_output.txt || echo "No ENOSYS markers found"
fi
if [ -d logs ]; then
echo "Found logs directory"
grep -E "ENOSYS|Invalid syscall|999" logs/*.log 2>/dev/null | head -20 || echo "No ENOSYS markers in logs"
fi

- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v3
- name: Upload QEMU log if failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: enosys-test-output-${{ github.run_number }}
path: |
target/xtask_ring3_enosys_output.txt
target/shared_kernel_test_output.txt
logs/*.log
if-no-files-found: warn
name: qemu-serial-log
path: target/xtask_ring3_enosys_output.txt
Loading