Epic: unit tests that run at build time and fail the build on regression #1243
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#1243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why. Slipstream has a lot of pure logic that regresses silently (weather maths, run-off, cache / segment store, inventory safety, key-binding migration, SLBridge line parsing, LLSD round trips) and the only automated gates today are
make check(source / package lint) and the manualmake validateruntime suite on the test box. A bad change is found by a person, in a running viewer, or after a tag. Several bug classes in this repo (Windows macro names, glibc pins, LL_ERRS reachable from input) already have a mechanical guard; logic regressions do not.State of the inherited LL test framework (verified in the tree, 2026-10-28).
indra/test(thelltestrunner:test.cppmain +lltut.*, 25*_tut.cppsuites for llmessage / llcommon / llinventory), per-librarytests/*_test.cppfiles (about 40 in llcommon alone, plus llimage, llmath, llmessage, llinventory, llprimitive, llui, llxml, llfilesystem, lllogin, llcachestore) registered throughLL_ADD_PROJECT_UNIT_TESTS/LL_ADD_INTEGRATION_TESTinindra/cmake/LLAddBuildTest.cmake, and Slipstream added newview integration tests (slgputexmigrate,llgputexrecord,slj2cmigrate,slassetmigrate; recent commits touched them, so the sources are maintained).LL_TESTSdefaults to OFF (indra/cmake/Variables.cmake:28), is not set bylinux-releaseos/linux-releaseand is forced"LL_TESTS": "OFF"inwindows-cross(indra/CMakePresets.json). Nothing in.forgejo/,scripts/ci/orscripts/check/runsctest, and the Makefile'svalidatetarget is the testctl runtime suite, not ctest. So no CI or local build compiles or runs these tests; whether they still build is unknown and should be assumed bitrotted (the unit-test macros for llcorehttp and newview are already commented out,LL_ADD_INTEGRATION_TEST(llhttpretrypolicy ...)too).tut(3p prebuilt,Tut.cmake, a 2008 header-only library) plus APR for the runner;LLAddBuildTest.cmakealso buildstest.cpp,lltut.cppinto every test executable (one executable per source file, so ~100 link steps when enabled).BUILD_TESTS/BUILD_AND_RUN_TESTStargets,LL_TEST_COMMAND.USE_ASANetc. only add-Ogin00-Common.cmake:242; the tree has no-fsanitizeflags outside the newLL_FUZZbuild (branchfuzzing).Scope.
SL_UNIT_TESTS(ON by default for Linux, OFF forwindows-crossat first), one aggregate targetsl_unit_tests, and a stamp file (unit_tests.stamp, produced by a custom command that runs the suite) thatslipstream-bindepends on, so a failing test stops the build before the multi-gigabyte viewer link.makegets it for free;make test/ctest --preset linux-releaseos -L fastruns only the tests.fast.make windows/ CI (catches clang-cl and Windows-macro breaks at compile time, which is where most Windows regressions arrive); running them is a labelwinejob on the CI box using a throwaway wine prefix (no menu pollution), not part of the default Windows build.doc/DEVELOPER_GUIDE.mdsection on writing and running tests; CODING_RULES.md note that new pure-logic code ships with a suite.Acceptance criteria.
makeon a clean Linux checkout builds and runs the default suite; a deliberately broken assertion makesmakefail beforeslipstream-binlinks, with the failing test name and file:line in the output.ctest --output-on-failureplus a total); a CI check fails if the budget is exceeded by 2x..cppunderindra/slcorerebuilds and re-runs only the affected test executable (stamp per executable).LL_TESTSwith a documented status; there is no third state.Effort. Epic umbrella: roughly 3 to 4 weeks across the sub-tickets (framework + plumbing 3 days, first suites 1 to 2 weeks, GPU 1 week, fuzz CI 2 days, sanitizer CI 2 days).