diff --git a/tests/run-tests.sh b/tests/run-tests.sh index cf6c7ce..996c436 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -540,10 +540,12 @@ for rcscript in rc.sysinit rc.multi rc.shutdown; do done # 7.5 — rc.conf has DAEMONS array with required services +# The DAEMONS array is multi-line in rc.conf, so we grep for the service name +# anywhere in the file within the DAEMONS block (or just present as a daemon entry) RC_CONF="${PROJECT_ROOT}/configs/rc.conf" if [ -f "$RC_CONF" ]; then for svc in eudev dbus dhcpcd pipewire; do - if grep -q "DAEMONS=.*${svc}" "$RC_CONF"; then + if grep -q "^[[:space:]]*${svc}" "$RC_CONF"; then record_test "chain.daemon_listed.${svc}" "pass" else record_test "chain.daemon_listed.${svc}" "fail" "${svc} not in DAEMONS array — won't start at boot" @@ -665,15 +667,15 @@ else: fi # 7.10 — NVIDIA kernel modules in rc.conf MODULES array +# MODULES array is multi-line, so grep for nvidia on its own line if [ -f "$RC_CONF" ]; then - if grep -q 'MODULES=.*nvidia' "$RC_CONF"; then + if grep -q '^[[:space:]]*nvidia' "$RC_CONF"; then record_test "chain.nvidia_modules" "pass" else record_test "chain.nvidia_modules" "fail" "NVIDIA modules not in MODULES array — GPU won't work" fi - if grep -q 'nvidia-drm.*modeset=1\|modeset=1.*nvidia-drm' "$RC_CONF" || \ - grep -q 'MODULE_PARAMS.*nvidia-drm.*modeset' "$RC_CONF"; then + if grep -q 'nvidia-drm.*modeset=1' "$RC_CONF"; then record_test "chain.nvidia_modeset" "pass" else record_test "chain.nvidia_modeset" "fail" "nvidia-drm modeset=1 not set — Wayland DRM/KMS won't work"