summaryrefslogtreecommitdiff
path: root/indra/test
AgeCommit message (Collapse)Author
2024-05-30Merge branch 'release/maint-b' into nat/catch-test-blown-stack.Nat Goodspeed
Retargeting PR #1496 to Maint B.
2024-05-28Fix up llexception.h's cross-platform SEH wrapper.Nat Goodspeed
Introduce AlwaysReturn<void> specialization, which always discards any result of calling the specified callable with specified args. Derive new Windows_SEH_exception from LLException, not std::runtime_error. Put the various SEH functions in LL::seh nested namespace, e.g. LL::seh::catcher() as the primary API. Break out more levels of Windows SEH handler to work around the restrictions on functions containing __try/__except. The triadic catcher() overload now does little save declare a std::string stacktrace before forwarding the call to catcher_inner(), passing a reference to stacktrace along with the trycode, filter and handler functions. catcher_inner() accepts the stacktrace and the three function template arguments. It contains the __try/__except logic. It calls a new filter_() wrapper template, which calls fill_stacktrace() before forwarding the call to the caller's filter function. fill_stacktrace(), in the .cpp file, contains the logic to populate the stacktrace string -- unless the Structured Exception is stack overflow, in which case it puts an explanatory string instead. catcher_inner()'s __except clause passes not only the code, but also the stacktrace string, to the caller's handler function. It wraps the caller's handler function in always_return<rtype>(), where rtype is the type returned by the trycode function. This allows a handler to return a value, while also supporting the void handler case, e.g. one that throws a C++ exception. (This is why we need AlwaysReturn<void>: some trycode() functions are themselves void.) For the dyadic catcher() overload, introduce common_filter() containing the logic to distinguish a C++ exception from any other kind of Structured Exception. The fact that the stacktrace is captured before the filter function is called should permit capturing a stacktrace for a C++ exception as well as for most other Structured Exceptions. As before, the monadic catcher() overload supplies the rethrow() handler, in the .cpp file. Change existing calls from seh_catcher() to LL::seh::catcher().
2024-05-24Promote seh_catcher() et al. to llexception.{h,cpp} for general use.Nat Goodspeed
2024-05-17Don't try to report a stack trace on stack overflow (sigh)Nat Goodspeed
2024-05-16Need magic #define for <boost/stacktrace.hpp> on Mac.Nat Goodspeed
2024-05-16On Windows, defend test.cpp against structured exceptions too.Nat Goodspeed
Since August 2023, we've seen occasional GitHub Windows build test runs terminate with 0xC00000FD: stack overflow. We've usually responded by bumping up the default coroutine stack size. On closer examination, it's always llleap_test.cpp that blows up that way -- and llleap_test.cpp doesn't appear to use coroutines at all. So apparently we've been consuming more address space for ALL viewer coroutines without actually addressing the problem. Reset the default coroutine stack size to where it was before we started bumping it up in response to these llleap_test.cpp stack overflow failures. Note that LLCoros already catches and reports Windows structured exceptions, underscoring that the observed stack overflow is not from within a coroutine. While at it, restore the Windows llleap_test.cpp data volume to match Posix. We think the problem that led to reducing that data volume was an APR bug, which we hope has been fixed. Equip test.cpp, the test driver program for all our TUT unit and integration tests, with a Windows structured exception handler. Try to treat a Windows structured exception as a test failure -- instead of silently terminating with 0xC00000FD. Moreover, when a structured exception occurs, output a stack trace so we can try to track it down.
2024-05-15#1457 Fix the tests on macAndrey Lihatskiy
(cherry picked from commit 82d713782529074b03720833038cb0df2b8bcffd)
2024-05-15Remove dead googlemock dependency and related setup codeRye Mutt
2024-05-14#1457 Fix the tests on macAndrey Lihatskiy
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2024-03-01Merge branch 'main' into marchcat/yz-mergeAndrey Lihatskiy
# Conflicts: # indra/newview/llinventorygallery.cpp
2024-01-08replace boost library to standardAiraYumi
2023-12-15Merge branch 'main' into DRTVWR-489Andrey Lihatskiy
# Conflicts: # indra/newview/fonts/DejaVu-license.txt # indra/newview/fonts/DejaVuSans-Bold.ttf # indra/newview/fonts/DejaVuSans-BoldOblique.ttf # indra/newview/fonts/DejaVuSans-Oblique.ttf # indra/newview/fonts/DejaVuSans.ttf # indra/newview/fonts/DejaVuSansMono.ttf
2023-12-05Merge branch 'main' into DRTVWR-489Alexander Gavriliuk
2023-11-29Merge branch 'DRTVWR-559' into marchcat/587-v-pbr-mergeAndrey Lihatskiy
# Conflicts: # indra/llcommon/CMakeLists.txt # indra/newview/llspatialpartition.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llvoavatar.cpp
2023-10-25Merge remote-tracking branch 'origin/main' into DRTVWR-559Brad Linden
2023-10-25Merge branch 'main' into DRTVWR-587-maint-VAndrey Lihatskiy
# Conflicts: # autobuild.xml # indra/llcommon/tests/llleap_test.cpp # indra/newview/viewer_manifest.py
2023-09-08SL-18837: Make llsdserialize_test debug output conditional.Nat Goodspeed
Move hexdump() and hexmix() stream formatters to new hexdump.h for potential use by other tests. In toPythonUsing() helper function, add a temp file to receive Python script debug output, and direct debug output to that file. On test failure, dump the contents of that file to the log. Give NamedTempFile::peep() an optional target std::ostream; refactor implementation as peep_via() that accepts a callable to process each text line. Add operator<<() to stream the contents of a NamedTempFile object to ostream -- but don't use that with LL_DEBUGS(), as it flattens the file contents into a single log line. Instead add peep_log(), which streams each individual text line to LL_DEBUGS().
2023-09-08SL-18837: NamedTempFile must be binary mode on Windows.Nat Goodspeed
2023-08-25MacOS gmock build fixAndrey Kleshchev
Updated gmock complains about missing regex_t. This is likely a macos configuration issue and needs to be fixed, but fot now just forcing the declaration
2023-07-13DRTVWR-558: Demangle names of exceptions reported by TUT tests.Nat Goodspeed
(cherry picked from commit 2ffbadc7a1275f662eb97ff9ce163a18cdb62c7c)
2023-07-13DRTVWR-558: Fix builds on macOS 12.5 Monterey.Nat Goodspeed
Always search for python3[.exe] instead of plain 'python'. macOS Monterey no longer bundles Python 2 at all. Explicitly make PYTHON_EXECUTABLE a cached value so if the user edits it in CMakeCache.txt, it won't be overwritten by indra/cmake/Python.cmake. Do NOT set DYLD_LIBRARY_PATH for test executables! That has Bad Effects, as discussed in https://stackoverflow.com/q/73418423/5533635. Instead, create symlinks from build-mumble/sharedlibs/Resources -> Release/Resources and from build-mumble/test/Resources -> ../sharedlibs/Release/Resources. For test executables in sharedlibs/RelWithDebInfo and test/RelWithDebInfo, this supports our dylibs' baked-in load path @executable_path/../Resources. That load path assumes running in a standard app bundle (which the viewer in fact does), but we've been avoiding creating an app bundle for every test program. These symlinks allow us to continue doing that while avoiding DYLD_LIBRARY_PATH. Add indra/llcommon/apply.h. The LL::apply() function and its wrapper macro VAPPLY were very useful in diagnosing the problem. Tweak llleap_test.cpp. This source was modified extensively for diagnostic purposes; these are the small improvements that remain. (cherry picked from commit 15d37713b9113a6f70dde48c764df02c76e18cbc) (cherry picked from commit a1adcf1905d1fbc5fe07ff5a627295ccfe461ac4)
2023-07-07SL-18837: Try to bypass Windows perm problem with Python indirection.Nat Goodspeed
2023-07-07SL-18837: Try putting generated Python scripts in RUNNER_TEMP dir.Nat Goodspeed
The claim is that the Windows Python interpreter is integrated somehow with the OS such that a command line that tries to run Python with a script that "looks suspicious" (i.e. in a system temp directory) fails with "Access denied" without even loading the interpreter. At least that theory would explain the "Access denied" errors we've been getting trying to run Python scripts generated into the system temp directory by our integration tests. Our hope is that generating such scripts into the GitHub RUNNER_TEMP directory will work better. As this test is specific to Windows, don't even bother running Mac builds.
2023-06-06SL-18837: Concat path part with / rather than +=.Nat Goodspeed
Using concatenation appends the intended filename to the parent directory name, instead of putting the filename in the parent directory.
2023-06-06SL-18837: On Windows, NamedTempFile must convert from wstringNat Goodspeed
2023-06-06SL-18837: Make NamedTempFile name template compatible with Python.Nat Goodspeed
The recommended template uses hyphens; change to underscores to be valid Python temp module names.
2023-06-06SL-18837: NamedTempFile back to std::function, use boost::phoenix <<Nat Goodspeed
It seems the problem addressed by aab769e wasn't some synergy between Boost.Phoenix and Boost.Function, but rather the lack of a Phoenix header file introducing operator<<().
2023-06-05SL-18837: NamedTempFile must still disambiguate string literals.Nat Goodspeed
2023-06-05SL-18837: Make NamedTempFile revert to boost::functionNat Goodspeed
from std::function, since some consumers still use (e.g.) boost::phoenix::placeholders::arg1 to generate an inline callable.
2023-06-05SL-18837: Use Boost.Filesystem for NamedTempFile, instead of APR.Nat Goodspeed
2023-05-04Merge remote-tracking branch 'origin/zap-LLSDArray' into DRTVWR-559Brad Linden
2023-05-03SL-19647: Eliminate LLSDArray entirely.Nat Goodspeed
Newer C++ compilers have different semantics around LLSDArray's special copy constructor, which was essential to proper LLSD nesting. In short, we can no longer trust LLSDArray to behave correctly. Now that we have variadic functions, get rid of LLSDArray and replace every reference with llsd::array().
2023-03-29Merge remote-tracking branch 'origin/main' into DRTVWR-559Brad Linden
2022-09-17We probably want this (have to guess as I cannot run the tests).Nicky Dasmijn
2022-09-17MacOs packaging is weird, as Nat already did point out :(Nicky Dasmijn
Part of his change was omly taking Release builds into account, the other part from me made the same mistake. Use a generator expression with a custom command to get the symlink the way we want.
2022-09-16Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into ↵Nicky Dasmijn
DRTVWR-568_cmake
2022-09-01DRTVWR-568: Ensure parent directory exists before CREATE_LINK.Nat Goodspeed
2022-08-26DRTVWR-568: Eliminate more blockers to C++17 language standard.Nat Goodspeed
2022-08-22DRTVWR-558: Fix builds on macOS 12.5 Monterey.Nat Goodspeed
Always search for python3[.exe] instead of plain 'python'. macOS Monterey no longer bundles Python 2 at all. Explicitly make PYTHON_EXECUTABLE a cached value so if the user edits it in CMakeCache.txt, it won't be overwritten by indra/cmake/Python.cmake. Do NOT set DYLD_LIBRARY_PATH for test executables! That has Bad Effects, as discussed in https://stackoverflow.com/q/73418423/5533635. Instead, create symlinks from build-mumble/sharedlibs/Resources -> Release/Resources and from build-mumble/test/Resources -> ../sharedlibs/Release/Resources. For test executables in sharedlibs/RelWithDebInfo and test/RelWithDebInfo, this supports our dylibs' baked-in load path @executable_path/../Resources. That load path assumes running in a standard app bundle (which the viewer in fact does), but we've been avoiding creating an app bundle for every test program. These symlinks allow us to continue doing that while avoiding DYLD_LIBRARY_PATH. Add indra/llcommon/apply.h. The LL::apply() function and its wrapper macro VAPPLY were very useful in diagnosing the problem. Tweak llleap_test.cpp. This source was modified extensively for diagnostic purposes; these are the small improvements that remain.
2022-06-09SL-17483: Recast LLImageDecodeThread as a facade for ThreadPool.Nat Goodspeed
Remove all references to LLQueuedThread (but emulate a couple bits of its API such as handle_t and getPending()). Migrate ImageRequest into llimageworker.cpp. It has never been part of LLImageDecodeThread's public API. Remove ImageRequest tests. Remove all references to LLImageDecodeThread::pause(). The idea of pausing another thread is bizarre to me, and LLThreadPool has no such operation. Nor does it have an abortRequest().
2022-06-05Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into ↵Nicky
DRTVWR-543-maint_cmake
2022-05-01Remove setting of HEADER_FILE_ONLY on .h* files, cmake automaticallyNicky
sets the property on those.
2022-04-18Merge branch master (D540) into DRTVWR-546Andrey Kleshchev
# Conflicts: # indra/llcommon/llsdutil.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolalpha.cpp # indra/newview/lldrawpoolwater.cpp
2022-04-18Merge remote-tracking branch 'origin/DRTVWR-543-maint' into ↵Nicky
DRTVWR-543-maint_cmake
2022-04-16Streamline bugsplat target:Nicky
- Fix usage of bugsplat::bugsplat by using ll::bugsplat - Use bugsplat define by importing target not by using hand crafted magic
2022-04-16Now there is a oslibrary target get rid of some more obsolete vars:Nicky
LEGACY_STDIO_LIBS (was only used for Windows) PTHREAD_LIBRARY (only Linux) LLDATABASE_LIBRARIES (that one was supposed for Linux, but never needed anyway)
2022-04-16Create a new target ll::oslibrary to link against libs specific to the OS ↵Nicky
compiled on. This gets rid of the a few OS specific set and uses variables (which some even seemed mostly duplicate like WINDOWS_LIBRARIES ans UI_LIBRARIES) and it also solves the problem of having them to tack on every target, as of no they come as a transitive dependency from llcommon
2022-04-13Rework cmake, the original plan was to maybe be able to use conan targets ↵Nicky
with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard().
2022-04-06Googlemock targetNicky