Commit Graph

87 Commits

Author SHA1 Message Date
Zebediah Figura 19c9969c79 include: Print context information after the message type.
This makes identifying the failures and other message types easier and
more reliable.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:10 +02:00
Zebediah Figura af39a1b0bc include: Introduce winetest_push_context() and winetest_pop_context().
Based on vkd3d's vkd3d_test_set_context(), but adding support for a stack of
context prefixes, to more easily accomodate tests with nested loops.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 09:56:55 +02:00
Zebediah Figura 2cdf6f0f30 include: Factor out winetest_printf().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 09:54:37 +02:00
Francois Gouget 4ac37c4e24 tests: Add ignore_exceptions().
This lets tests signal that for a while exceptions are expected and
should not be counted as test failures.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 21:11:28 +01:00
Francois Gouget 092130e2aa tests: Trace the filename in winetest_wait_child_process().
We want the filename next to the line number, just like in every other
trace.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 21:11:28 +01:00
Kevin Puetz 849e521dba include: Check whether the ms_abi attribute is supported on aarch64.
Updated to maintain sync with dac1e16dd4.

Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-04 21:03:24 +01:00
Alexandre Julliard a9a08dbc3d libwine: Remove wine/library.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 16:26:17 +02:00
Francois Gouget 9f60ce22fb tests: Trace elapsed time when $WINETEST_TIME is set.
This simplifies narrowing down where a test gets stuck or is slow if
it times out but prints few messages.
Note that the elapsed time is relative to the current process start
time. So subprocesses will have a different elapsed time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48094
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:26:50 +02:00
Jacek Caban b9fe0ecd3a wine/test.h: Remove NAN and INFINITY macros.
Those are available in UCRT (MSVC since 2015) and cause redefinition
warnings if math.h is included after test.h.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 15:07:41 +02:00
Francois Gouget e6e77f1469 tests: Fix the wait_child_process_() macro in the no-line-number case.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:05:32 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Francois Gouget 98e50f9ead tests: Restore the colon in the todo, skip and trace lines.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:02 +01:00
Francois Gouget 20a7f77df6 tests: Restore the colon in the test summary line.
Adjust the silenced tests line to match.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Francois Gouget e4dbd56705 tests: Limit spam from todos, skips and traces when winetest_debug==1.
Some tests loop on system resources like fonts and issue todos, skips or
even traces on every iteration. Depending on the machine configuration
this can result in a lot of traces and push WineTest reports above the
1.5 MB limit.
So on low debugging levels automatically silence test lines that issue
more than 50 such messages. A count of the silenced messages is given at
the end.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Francois Gouget f818bbf61a tests: Don't initialize static variables to 0.
Static variables are initialized to 0 by default anyway.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Alexandre Julliard c8f3383696 include: Allow using debug.h in tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard 4dc4bab93f include: Remove winetest_strcmpW.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 13:58:05 +01:00
Francois Gouget 033196641b tests: Add support for subtests.
Some Wine tests run code compiled from another C file, resulting in
traces and errors that look like they come from a different test.
subtest() allows such tests to declare their subtests so they are
recognized by scripts parsing the results such as the TestBot and
WineTest website.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:42:56 +02:00
Alexandre Julliard a16ef96dc6 include/msvcrt: Add INFINITY and NAN definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 15:03:37 +02:00
Mathew Hodson a640a7a32f include: Add cast to avoid a compiler warning on MSVC.
Signed-off-by: Mathew Hodson <mathew.hodson@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-15 12:50:25 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Michael Stefaniuc f0edfa3d75 include: Add an option to disable line numbers in the tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Michael Stefaniuc 7b5668a6e7 include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-25 12:09:17 +02:00
Martin Storsjo 8fb8cc03c3 arm64: Use __builtin_ms_va_list and __attribute__((ms_abi)) on arm64.
Windows uses a different ABI for va_list on arm64 just like on x86_64.

On x86_64, the calling convention for windows functions is completely
different from the one on other platforms. On arm64, they're mostly the
same, with the only exception being variadic functions (where all float
arguments are passed in integer registers, since the va_list is a single
pointer).

Any functions using __builtin_ms_va_start need to be decorated with
__attribute__((ms_abi)).

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-10 08:36:58 +02:00
Zebediah Figura 80f82ee9d7 ntoskrnl.exe/tests: Add a test for IoGetCurrentProcess().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-02 10:00:46 +02:00
Alistair Leslie-Hughes 87b72098c3 include: Support wine_dbgstr_longlong in tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 15:57:45 +02:00
Sebastian Lackner fc84f2462a include: Avoid typedef for tls_data.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 17:12:22 +01:00
Francois Gouget 873eace6e4 wine/test.h: Identify the process responsible for test summary lines.
Currently the child process summary lines are indistinguishable from the
main process one. This makes it impossible to automatically detect
when a process exits abruptly, i.e. without printing a summary line,
if it has run a subprocess.

This will let analysis tools identify which summary lines correspond to
processes they started and thus when some are missing.  Note also that
in case of a crash the 'unhandled exception' play the same role as the
test summary lines. Thus it is important to also tag them with the pid
of the source process.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-22 16:45:22 +01:00
Michael Stefaniuc 636340ce34 include: Make wine_dbgstr_rect() available for tests too.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-07 17:08:28 +09:00
Bernhard Übelacker 9a08714c02 include: Implement todo_wine_if for usage in wine tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 20:09:27 +09:00
Francois Gouget f6dc7c88ba kernel32/tests: Help the tests portably declare printf()-syle functions.
To do so they can now use the WINETEST_PRINTF_ATTR() macro.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 23:46:33 +09:00
Francois Gouget 4a983e3118 tests: Use plain printf() calls instead of fprintf(stdout).
The fprintf() calls are a left-over from when errors were reported to stderr.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 23:46:29 +09:00
Sebastian Lackner 61b8a189c5 include: Automatically detect if tests are running under Wine when WINETEST_PLATFORM is not specified. 2015-04-06 12:06:12 +09:00
Frédéric Delanoy 9134a24e87 include: Make wine_dbgstr_guid available in test.h for all tests. 2014-01-28 11:43:49 +01:00
Frédéric Delanoy e46796e7a4 wine/test.h: Fix a typo in comment. 2014-01-17 11:01:42 +01:00
Dmitry Timoshkov b632f0966d kernel32: Count precise amount of child process failures. 2013-04-18 11:54:28 +02:00
Dmitry Timoshkov 521cf664d3 kernel32: Add a test for threads state when a process is being terminated. 2013-04-12 11:49:14 +02:00
Dmitry Timoshkov b527679d17 include/wine/test.h: Fix compilation of standalone tests with PSDK headers. 2012-06-22 14:09:47 +02:00
Dmitry Timoshkov 3068ae8bce include/wine/test.h: Fix tests compilation with a PSDK compiler. 2012-04-23 12:58:36 +02:00
Frédéric Delanoy 81bf925401 include: Assorted spelling fixes. 2011-07-28 18:37:40 +02:00
Alexandre Julliard b14cfdeea4 tests: Run all tests with the default FPU control word. 2010-07-20 11:41:05 +02:00
Alexandre Julliard 89ad1f2615 tests: Print information about the last executed test before crashing. 2010-07-20 11:40:06 +02:00
Alexandre Julliard e2c48c5952 tests: Try to avoid message boxes popping up in non-interactive testing. 2010-07-20 11:39:50 +02:00
Alexandre Julliard cf42723602 tests: Use the correct format of varargs list when building with msvcrt. 2010-04-09 15:48:05 +02:00
Alexandre Julliard 69ee0ad151 tests: The ok() macro shouldn't return a value. 2010-02-24 16:48:07 +01:00
Mikołaj Zalewski bc07b48b38 include: Add a strcmpW-equivalent function usable in tests. 2010-02-22 11:57:23 +01:00
Alexandre Julliard ee868cce5b tests: Make wine_dbgstr_w available in test.h for all tests. 2009-08-19 13:19:31 +02:00
Alexandre Julliard d55bdc01d9 tests: When tracing is enabled, output the todo tests too. 2009-02-19 16:17:13 +01:00
Alexandre Julliard fea2aa55d0 include: Fix the 64-bit value of magic handle constants. 2008-12-08 15:51:22 +01:00
Alexandre Julliard b25eb5542a test.h: Fetch environment variables from the Win32 environment not the Unix one. 2008-08-01 11:18:11 +02:00