Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4e2f031
llmath's tests link llmath instead of compiling their own copies of it
RyeMutt Oct 9, 2026
a30f63f
mathmisc's UUID group and llsdutil_math's group object have names of …
RyeMutt Oct 9, 2026
ea34c2f
alsimdkernels' denormal test puts back the FP mode it found
RyeMutt Oct 9, 2026
8c84f5a
llmath's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
e9d2691
llxmlnode's test links llxml instead of compiling llxmlnode.cpp and a…
RyeMutt Oct 9, 2026
6ebb10d
alxmllayermerge's test works in a temp folder of its own
RyeMutt Oct 9, 2026
71926f8
llxml's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
91ed57f
lljoint's test links llcharacter instead of compiling lljoint.cpp
RyeMutt Oct 9, 2026
ba90fc6
llcharacter's test fixtures and groups have internal linkage
RyeMutt Oct 9, 2026
bb621cd
llprimitive's unit tests link llprimitive instead of compiling the fi…
RyeMutt Oct 9, 2026
6e0469d
llprimitive's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
e3f77f9
lldiriterator's test links llfilesystem instead of compiling lldirite…
RyeMutt Oct 9, 2026
7de5278
llfilesystem's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
addf95e
inventorymisc's tests write their file to a temp file of their own
RyeMutt Oct 9, 2026
83c61e4
llinventory's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
73e5dbb
llimageworker's test responder and fixture have internal linkage
RyeMutt Oct 9, 2026
b30d035
lllogin's test links lllogin instead of compiling lllogin.cpp
RyeMutt Oct 9, 2026
90a945f
lllogin's test listeners have internal linkage, and none shares a vie…
RyeMutt Oct 9, 2026
41ff036
llcommon's tests define each shared helper once, and no two of them o…
RyeMutt Oct 9, 2026
4be21ae
What an llcommon test defines for itself has internal linkage
RyeMutt Oct 9, 2026
0de9174
alwatchedfile's main loop queue lives only as long as the test that p…
RyeMutt Oct 9, 2026
c2b148f
llcommon's tests put back the process state they change
RyeMutt Oct 9, 2026
e2c35fd
llsd's tests check LLSD's counts outside a destructor, and the Python…
RyeMutt Oct 9, 2026
e50aa5b
llinitparam test 9 and llfile tests 3 and 4 pass whatever ran before …
RyeMutt Oct 9, 2026
258fe64
llcommon's llsdutil test group takes a name llmath's does not share
RyeMutt Oct 9, 2026
e1a42fb
What an alscript test defines for itself has internal linkage
RyeMutt Oct 9, 2026
6041c0f
alpreprocessor tests 39 and 40 and alluauconfig test 9 pass whatever …
RyeMutt Oct 9, 2026
1bc5ef4
allslreference test 6 puts LL's llSay back however the test ends
RyeMutt Oct 9, 2026
099b15e
llui's tests share one rlvGetAnonym
RyeMutt Oct 9, 2026
6c13561
ALTextView's tests share one TextViewProbe
RyeMutt Oct 9, 2026
fd0cb34
llui's unit tests link llui rather than compiling its files again
RyeMutt Oct 9, 2026
008a098
llui's test-local types and helpers have internal linkage
RyeMutt Oct 9, 2026
30ef5c8
ALSurface's skin colours follow the table rather than its first answer
RyeMutt Oct 9, 2026
6f4135d
llui's tests put back the process state they change
RyeMutt Oct 9, 2026
901a51f
llui's tests write their files in directories of their own
RyeMutt Oct 9, 2026
6bd0b12
The tests that start ALTextFind's worker close it and wait for it
RyeMutt Oct 9, 2026
4e98dbb
llui's GL tests share one hidden window, and HeadlessUI holds to its …
RyeMutt Oct 9, 2026
251ac87
llrender's shared-context GL tests take one context, with every part up
RyeMutt Oct 9, 2026
06b234a
llrender's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
58c7572
llimagegl's upload thread test ends the thread however it ends
RyeMutt Oct 9, 2026
e8ebb8f
llnamevalue's and llsdmessagebuilder's tests link the libraries they …
RyeMutt Oct 9, 2026
ac13319
llmessage's test fixtures, groups and helpers have internal linkage
RyeMutt Oct 9, 2026
49f3257
The message system tests start and end their own, on a port the OS picks
RyeMutt Oct 9, 2026
3f1b868
io's server takes a port the OS picks, and llmessage's fixtures asser…
RyeMutt Oct 9, 2026
c97f72b
lldatapacker's file tests write a temporary file of their own
RyeMutt Oct 9, 2026
56f2e09
llcorehttp's suites, fixtures and helpers have internal linkage
RyeMutt Oct 9, 2026
0cdb004
The WebSocket manager suite ends the manager with each test
RyeMutt Oct 9, 2026
3b08433
newview's tests define each shared fake once, and no two of them one …
RyeMutt Oct 9, 2026
c1edb94
What a newview test defines for itself has internal linkage
RyeMutt Oct 9, 2026
11c81ac
newview's tests link llxml rather than compiling its settings code, a…
RyeMutt Oct 9, 2026
b37805d
No two newview tests name a settings group or a main loop alike, and …
RyeMutt Oct 9, 2026
402277a
newview's tests put back the process state they change
RyeMutt Oct 9, 2026
ff5a556
alcrashreporter's consent file and alscriptlookup's folders take name…
RyeMutt Oct 9, 2026
5fc89ba
lllogininstance's fixture does not leave the login instance holding i…
RyeMutt Oct 9, 2026
5a65a8f
The tests that seed llrand seed it from entropy again as they end
RyeMutt Oct 10, 2026
8c4731c
llsettingssky's test fixture and group have internal linkage
RyeMutt Oct 10, 2026
1927a3f
llrender's newer GL tests take the shared context, and put back what …
RyeMutt Oct 10, 2026
8534c4a
The HUD depth and selection outline tests take the shared context, an…
RyeMutt Oct 10, 2026
d24bf5d
alcrashreporter's report files and records folder take names of their…
RyeMutt Oct 10, 2026
5fd8c63
llremoteparcelrequest's test links llui rather than stubbing it
RyeMutt Oct 10, 2026
e60a50e
llsd's and lleventdispatcher's tests build with MSVC and GCC again
RyeMutt Oct 10, 2026
994a5fb
The WebSocket manager suite keeps one manager for the run again
RyeMutt Oct 10, 2026
1a51f2c
Merge develop into rye/tests-stage1
RyeMutt Oct 10, 2026
66bba8b
llcorehttp's tests are as develop has them, until a crash in their bi…
RyeMutt Oct 11, 2026
8121cab
GCC splits no cold parts off where it links with a mold older than 2.…
RyeMutt Oct 11, 2026
d09b7ce
Linux builds link with mold 2.42.1 from its release, not the image's …
RyeMutt Oct 11, 2026
36a69cd
llcorehttp's suites, fixtures and helpers have internal linkage again
RyeMutt Oct 11, 2026
bc68417
The WebSocket manager suite deletes LLWebsocketMgr as each test ends …
RyeMutt Oct 11, 2026
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
24 changes: 23 additions & 1 deletion .github/actions/setup-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:
libpipewire-0.3-dev libpulse-dev libsndio-dev libtext-unidecode-perl \
libthai-dev libtool libudev-dev libunwind-dev liburing-dev libwayland-dev \
libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev \
libxkbcommon-dev libxrandr-dev libxss-dev libxtst-dev linux-libc-dev mold \
libxkbcommon-dev libxrandr-dev libxss-dev libxtst-dev linux-libc-dev \
nasm ninja-build pkgconf rpm tar tex-common texinfo unzip zip

sudo locale-gen en_US.UTF-8
Expand All @@ -66,6 +66,28 @@ runs:
sudo rm -rf /usr/local/.ghcup
df -h

# mold from its release rather than the image's 2.40: before 2.42.1 it
# can leave a function with no unwind entry the unwinder finds, so that
# an exception thrown through it ends the program (rui314/mold#1648).
# Pinned by digest, under /usr/local, which the path puts first.
- name: Linux mold install
if: runner.os == 'Linux'
shell: bash
run: |
version=2.42.1
case "$(uname -m)" in
x86_64) arch=x86_64 sha256=6ff270c9bf07d2bec5c98aa324eb7c4daf6a1a4d815c05ff1708049616047855 ;;
aarch64) arch=aarch64 sha256=16b025652d3d7456689e6025a77e1903bb2a15e7630877c26cc133f5df95b9c6 ;;
*) echo "::error::No mold release pinned for $(uname -m)"; exit 1 ;;
esac
archive="$RUNNER_TEMP/mold.tar.gz"
curl -fsSL -o "$archive" \
"https://github.com/rui314/mold/releases/download/v$version/mold-$version-$arch-linux.tar.gz"
echo "$sha256 $archive" | sha256sum -c -
sudo tar -xzf "$archive" -C /usr/local --strip-components=1 --no-same-owner
rm "$archive"
mold --version

- name: macOS Homebrew dependency install
if: runner.os == 'macOS'
shell: bash
Expand Down
35 changes: 19 additions & 16 deletions indra/alscript/tests/alincludesearch_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,23 +428,26 @@ namespace tut
// the code still, which keeps it for a require found nowhere, for each
// name it took; an alias's it read through the `.luaurc`, which is gone,
// and is kept as it found it.
struct RequireCase
namespace
{
// What it shows, and whose case it is.
const char* what;
// The file asking, under the tree; "object" for a script in an
// object, which with world includes off reads nothing of the world.
const char* from;
const char* name;
// What it finds, under the tree, or nothing: what the search found
// before the navigator, and what it finds now, as LAD9 has it.
const char* before;
const char* chosen;
// Whose rule LAD9 picks, where the references or we disagree: and
// what Luau's navigator answers, where it differs from the choice.
const char* rule;
const char* luau;
};
struct RequireCase
{
// What it shows, and whose case it is.
const char* what;
// The file asking, under the tree; "object" for a script in an
// object, which with world includes off reads nothing of the world.
const char* from;
const char* name;
// What it finds, under the tree, or nothing: what the search found
// before the navigator, and what it finds now, as LAD9 has it.
const char* before;
const char* chosen;
// Whose rule LAD9 picks, where the references or we disagree: and
// what Luau's navigator answers, where it differs from the choice.
const char* rule;
const char* luau;
};
} // anonymous namespace

template<> template<>
void alincludesearch_object::test<7>()
Expand Down
4 changes: 3 additions & 1 deletion indra/alscript/tests/allslservice_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ namespace tut
all << in.rdbuf();
text = all.str();
}
const std::string path = (std::filesystem::temp_directory_path() / "alscript-test-builtins-newer.txt").string();
// a name of its own, so two runs at once never write one file
const std::string path =
(std::filesystem::temp_directory_path() / ("alscript-test-builtins-newer-" + LLUUID::generateNewID().asString() + ".txt")).string();
{
llofstream out(path, std::ios::out | std::ios::binary | std::ios::trunc);
out << text << "integer llBrandNewThing( integer Value )\n";
Expand Down
12 changes: 9 additions & 3 deletions indra/alscript/tests/alluauconfig_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "../luau/alluauconfigscript.h"
#include "../lint/alscriptlintpass.h"

#include "lluuid.h"

#include "../test/lltut.h"

#include <chrono>
Expand Down Expand Up @@ -298,12 +300,16 @@ namespace tut
ensure("an __index that would loop is never asked",
ALLuauConfigScript::asLuaurc("return setmetatable({}, { __index = function() while true do end end })", json, error) && json == "{}");

const auto started = std::chrono::steady_clock::now();
ensure_equals("a loop that never ends, stopped", (ALLuauConfigScript::asLuaurc("while true do end", json, error), error),
// A run stopped by the deadline is kept a while, by its text: a text
// of this run's own is run, not answered from what another test, or
// this one before, asked.
const std::string forever = "while true do end -- " + LLUUID::generateNewID().asString();
const auto started = std::chrono::steady_clock::now();
ensure_equals("a loop that never ends, stopped", (ALLuauConfigScript::asLuaurc(forever, json, error), error),
std::string("configuration execution timed out"));
const F64 took = std::chrono::duration<F64>(std::chrono::steady_clock::now() - started).count();
ensure(llformat("stopped at its time, not long after: %.2f s", took), took >= ALLuauConfigScript::MOST_SECONDS && took < ALLuauConfigScript::MOST_SECONDS + 2.0);
ensure("asked again at once, kept for a while: no second wait", (ALLuauConfigScript::asLuaurc("while true do end", json, error),
ensure("asked again at once, kept for a while: no second wait", (ALLuauConfigScript::asLuaurc(forever, json, error),
std::chrono::duration<F64>(std::chrono::steady_clock::now() - started).count() < took + 0.1));
// table.move's copy is a loop in C the deadline does not reach, and
// nils moved into a table that holds none take no memory: held to so
Expand Down
32 changes: 16 additions & 16 deletions indra/alscript/tests/alpreprocessor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ namespace tut
return ALPreprocessor::run(ended(source, ending), o);
}

// The grid's builtins, which the optimizer and const folding read. A
// test that needs them asks for them itself: Tailslide keeps them for
// the process once loaded, so whichever asks first loads them.
static void ensureGridBuiltins()
{
ALLSLService service;
std::string error;
ensure("builtins: " + error, service.loadBuiltins(std::string(AL_LSL_DEFINITIONS_DIR) + "/builtins.txt", error));
}

// The same but the notes of a require nothing reads, which a script
// made to try something else may leave about (test 50 tries them).
static std::string faults(const ALPreprocessor::Result& r)
Expand Down Expand Up @@ -660,11 +670,7 @@ namespace tut
void alpreprocessor_object::test<13>()
{
set_test_name("the optimizer runs over the expanded text, and its notes come back to the source");
{
ALLSLService service;
std::string error;
ensure("builtins: " + error, service.loadBuiltins(std::string(AL_LSL_DEFINITIONS_DIR) + "/builtins.txt", error));
}
ensureGridBuiltins();
add("consts.lsl", "#define CHANNEL 7\ninteger unused = 1;\n");
ALPreprocessor::Options o = options();
o.optimize = true;
Expand Down Expand Up @@ -1192,11 +1198,7 @@ namespace tut
void alpreprocessor_object::test<28>()
{
set_test_name("the optimizer's run, weighed, says what it saved in code: the whole, and each note what its lines came to less");
{
ALLSLService service;
std::string error;
ensure("builtins: " + error, service.loadBuiltins(std::string(AL_LSL_DEFINITIONS_DIR) + "/builtins.txt", error));
}
ensureGridBuiltins();
const std::string source = "integer unused(integer n)\n"
"{\n"
" return n * 3;\n"
Expand Down Expand Up @@ -1249,11 +1251,7 @@ namespace tut
void alpreprocessor_object::test<29>()
{
set_test_name("a script that does not compile is not the preprocessor's error: the optimizer stands aside with a note where the first error is");
{
ALLSLService service;
std::string error;
ensure("builtins: " + error, service.loadBuiltins(std::string(AL_LSL_DEFINITIONS_DIR) + "/builtins.txt", error));
}
ensureGridBuiltins();
// Nexii's library, whose ObjectLinksetSittingAvatars has a parameter
// without its type, included as a save would include it.
llifstream in(std::string(AL_ALSCRIPT_TEST_DIR) + "/preprocessor/include/linkset.lsl", std::ios::binary);
Expand Down Expand Up @@ -1514,6 +1512,7 @@ namespace tut
void alpreprocessor_object::test<39>()
{
set_test_name("a function marked inline in any of the ways a mark is written, at the top of the script, and the marks taken off with the extensions off");
ensureGridBuiltins();
ALPreprocessor::Options o = options();
o.extensions = true;
ALPreprocessor::Result r = ALPreprocessor::run("integer f(integer a) inline { return a; }\n"
Expand Down Expand Up @@ -1554,6 +1553,7 @@ namespace tut
void alpreprocessor_object::test<40>()
{
set_test_name("const before a type is taken off, and each name it declares said where it is, a function's as a function");
ensureGridBuiltins();
const auto at = [](const ALPreprocessor::Result& r, size_t i, const std::string& name, S32 line, S32 column, bool function) {
return i < r.consts.size() && r.consts[i].name == name && r.consts[i].line == line && r.consts[i].column == column &&
r.consts[i].function == function;
Expand Down Expand Up @@ -1838,7 +1838,7 @@ namespace tut
// How often each module ran, as a module says it through `counted`,
// a builtin of the VM, as SLua's are: a module's own globals are its
// own, and what it sets is not the script's.
std::map<std::string, int> gRuns;
static std::map<std::string, int> gRuns;

template<> template<>
void alpreprocessor_object::test<48>()
Expand Down
21 changes: 21 additions & 0 deletions indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,27 @@ if(LINUX)
endif()
endif()

# No hot/cold splitting where GCC links with a mold older than 2.42.1. GCC
# moves a function's unlikely blocks into a part of their own ("[clone
# .cold]"), and where they all optimise away it still emits the part, empty,
# with an unwind entry covering no bytes at the address of whatever follows
# it. Those mold versions (rui314/mold#1648) put that entry in .eh_frame_hdr's
# search table beside the real function's, in an order their unstable sort
# leaves to chance; where the empty one comes last the unwinder finds no
# entry for the function, and an exception thrown through it ends the program
# in std::terminate whatever would have caught it. Without splitting there
# are no such parts. The link option is for LTO, which generates the code
# there. The vcpkg ports keep their empty parts: only a mold that leaves them
# out of the table mends those.
if(
COMPILER_IS_GCC
AND CMAKE_CXX_COMPILER_LINKER_ID STREQUAL "MOLD"
AND CMAKE_CXX_COMPILER_LINKER_VERSION VERSION_LESS 2.42.1
)
target_compile_options(al_flags INTERFACE -fno-reorder-blocks-and-partition)
target_link_options(al_flags INTERFACE -fno-reorder-blocks-and-partition)
endif()

# Toolchain conformance and miscellany.
if(WINDOWS)
target_compile_options(
Expand Down
3 changes: 1 addition & 2 deletions indra/llcharacter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ target_link_libraries(
target_precompile_headers(llcharacter REUSE_FROM llprecompiled)

if(AL_BUILD_TESTS)
al_add_test(lljoint PROJECT llcharacter SOURCES lljoint.cpp LIBRARIES llcommon llmath)

foreach(
test
lljoint
llpose
llcharacter
llmotioncontroller
Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/llbvhloader_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ namespace
}

namespace tut
{
namespace
{
struct llbvhloader_data
{
Expand Down Expand Up @@ -410,6 +412,7 @@ namespace tut
typedef test_group<llbvhloader_data> llbvhloader_test;
typedef llbvhloader_test::object llbvhloader_object;
tut::llbvhloader_test llbvhloader_testcase("LLBVHLoader");
}

template<> template<>
void llbvhloader_object::test<1>()
Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/llcharacter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ namespace
}

namespace tut
{
namespace
{
struct llcharacter_data
{
Expand Down Expand Up @@ -162,6 +164,7 @@ namespace tut
typedef test_group<llcharacter_data> llcharacter_test;
typedef llcharacter_test::object llcharacter_object;
tut::llcharacter_test llcharacter_testcase("LLCharacter");
}

template<> template<>
void llcharacter_object::test<1>()
Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/lljoint_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@


namespace tut
{
namespace
{
struct lljoint_data
{
};
typedef test_group<lljoint_data> lljoint_test;
typedef lljoint_test::object lljoint_object;
tut::lljoint_test lljoint_testcase("LLJoint");
}

template<> template<>
void lljoint_object::test<1>()
Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/llkeyframemotion_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ namespace
}

namespace tut
{
namespace
{
struct llkeyframemotion_data
{
Expand Down Expand Up @@ -521,6 +523,7 @@ namespace tut
typedef test_group<llkeyframemotion_data> llkeyframemotion_test;
typedef llkeyframemotion_test::object llkeyframemotion_object;
tut::llkeyframemotion_test llkeyframemotion_testcase("LLKeyframeMotion");
}

template<> template<>
void llkeyframemotion_object::test<1>()
Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/llmotioncontroller_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ namespace
}

namespace tut
{
namespace
{
struct llmotioncontroller_data
{
};
typedef test_group<llmotioncontroller_data> llmotioncontroller_test;
typedef llmotioncontroller_test::object llmotioncontroller_object;
tut::llmotioncontroller_test llmotioncontroller_testcase("LLMotionController");
}

typedef LLMotionController::QuantumStep QuantumStep;

Expand Down
3 changes: 3 additions & 0 deletions indra/llcharacter/tests/llmultigesture_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,16 @@ namespace
}

namespace tut
{
namespace
{
struct llmultigesture_data
{
};
typedef test_group<llmultigesture_data> llmultigesture_test;
typedef llmultigesture_test::object llmultigesture_object;
tut::llmultigesture_test llmultigesture_testcase("LLMultiGesture");
}

template<> template<>
void llmultigesture_object::test<1>()
Expand Down
Loading
Loading