Skip to content

aarch64 has no gate that runs TEST_BINARIES userspace tests (--features testing is built by no committed aarch64 gate) #763

Description

@ryanbreen

Problem

No committed aarch64 gate script builds --features testing, so
kernel::boot::test_list::TEST_BINARIES entries -- userspace test
binaries loaded via load_test_binaries_from_ext2() -- run in zero
aarch64 gates today, independent of any runtime bugs in the profile
itself (claim-lint:ok: 0 of 5 committed aarch64 gate scripts build
testing; see the exact grep and 5-way breakdown below).

load_test_binaries_from_ext2() is #[cfg(feature = "testing")]
(kernel/src/main_aarch64.rs:1362, function body at :1471). All 5
committed aarch64 scripts were checked this round
(grep -n -- "--features" docker/qemu/run-aarch64-*.sh, re-run this
round; claim-lint:ok: 5 of 5 scripts enumerated by name in the 3 bullets
below):

  • docker/qemu/run-aarch64-service-sequence-gate.sh:116 and
    docker/qemu/run-aarch64-full-test.sh:55 build --features boot_tests
    (2 of 5).
  • docker/qemu/run-aarch64-boot-test-native.sh,
    docker/qemu/run-aarch64-boot-test-strict.sh, and
    docker/qemu/run-aarch64-prod-profile-boot-test.sh:140 build with no
    --features at all (3 of 5; the last one's own comment says the
    absence is deliberate).
  • docker/qemu/run-aarch64-test-suite.sh:131 is the one committed script
    that does build --features testing, but it is not a gate (no
    PASS/FAIL verdict, no allowlist) and would not exercise this wiring
    either -- it rewrites kernel/src/main_aarch64.rs per test to
    substitute a per-test launch hook and never touches TEST_BINARIES or
    load_test_binaries_from_ext2() (claim-lint:ok: the script's own
    comment at docker/qemu/run-aarch64-test-suite.sh:103-107 says so
    directly -- "the testing profile loads the whole
    boot::test_list::TEST_BINARIES roster through
    load_test_binaries_from_ext2, so this script cannot select a single
    test" -- and also discloses its own rewrite target,
    run_userspace_from_ext2, "no longer exists anywhere under kernel/",
    i.e. this script is currently a no-op on this tree, separately from
    the TEST_BINARIES gap).

0 of the 5 builds testing in gate form (claim-lint:ok: 0 of 5, per the
3-bullet breakdown above), so load_test_binaries_from_ext2() is
compiled out (claim-lint:ok: 5 of 5, same breakdown).

Affected tests

Both currently zero-coverage on aarch64, for this reason:

Any other TEST_BINARIES entry shares the same #[cfg(feature = "testing")] gate and so has the identical exposure; these two are the
ones this round's own work surfaced directly.

Relationship to #562 / #761

#562 (softirq self-test panics before userspace) and #761 (loader hangs
after bypassing #562) are runtime blockers: they currently stop the
--features testing aarch64 profile from booting far enough to reach a
userspace test verdict at all. This issue is a different, structural
problem that sits behind those two: even after both are fixed, no
committed aarch64 gate would build the profile that runs these tests in
the first place. Fixing #562 and #761 is necessary but not sufficient to
close this gap.

Smallest proposed fix

A new aarch64 gate script (or an addition to an existing one, if one
already builds testing for another reason after #562/#761 land) that:

  1. Builds kernel-aarch64 with --features testing on the soft-float
    target (aarch64-breenix-kernel.json), matching the guard other
    aarch64 gates already carry against the NEON hardfloat target
    (scripts/check-kernel-no-neon.sh).
  2. Boots it against an ext2 disk containing the TEST_BINARIES roster.
  3. Asserts that each entry in kernel::boot::test_list::TEST_BINARIES
    emitted its own pass marker (that test's own
    *_PASSED/*_FAILED convention), not just that the boot reached a
    shell prompt -- mirroring the marker-driven verdict shape
    x86-gate-verdict.sh already uses on x86, rather than
    run-aarch64-test-suite.sh's per-test kernel-rewrite approach.

Not building the gate as part of this issue -- filed to make the gap
explicit and trackable; a real fix is a dedicated gate-authoring round.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions