Skip to content

Latest commit

 

History

History
78 lines (58 loc) · 2.42 KB

File metadata and controls

78 lines (58 loc) · 2.42 KB

Testing

Complete test suite

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
ctest --test-dir build --output-on-failure

The suite covers pure domain policy, backend parsing, application services, the SystemController facade, QML components and static QML analysis.

Hardware configuration coverage

The test backend generates deterministic, internally valid combinations of ASUS capabilities. It verifies capability projection, absent-feature isolation, numeric ranges and sequential state invariants across 65,536 randomized action cases. A seed reproduces the same device and state.

ctest --test-dir build -R hardware-simulator --output-on-failure

The simulator and its support library are test-only targets and are not linked into the installed executable.

GPU transaction tests

gpu-mode-application-service uses fake asusd and system-power backends. It checks:

  • validation and verification before restart;
  • exactly one restart request after a valid queue;
  • no restart after a read-back mismatch;
  • queue cancellation when logind rejects the restart;
  • neutralization with the previous firmware value on an older daemon without a queue-clear method.

No test invokes logind or writes a real GPU firmware attribute.

Sanitizers

cmake -S . -B build-asan -G Ninja \
  -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_CXX_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer' \
  -DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address,undefined'
cmake --build build-asan --parallel
ASAN_OPTIONS=detect_leaks=1 \
  ctest --test-dir build-asan --output-on-failure

Read-only device report

./build/g-linux --diagnostics

This reports active interfaces, capabilities and telemetry without applying a profile or firmware setting.

Explicit hardware checks

Builds with tests enabled contain g-linux-hardware-test. Its commands are separate from normal application startup and report every value they inspect or restore:

./build/g-linux-hardware-test --hardware-smoke-test
./build/g-linux-hardware-test --tuning-smoke-test
./build/g-linux-hardware-test --aura-smoke-test
./build/g-linux-hardware-test --nvidia-smoke-test

Run a hardware check only for the subsystem being validated. The general test uses read-back and restoration for writable settings; tuning, Aura and NVIDIA checks remain separate because they intentionally exercise those controls.