Age | Commit message (Collapse) | Author | Files | Lines |
|
Might as well make this easier to re-use since it doesn't do anything
specific to litest.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1066>
|
|
dwt and palm tests have a lot of timeouts to wait for so let's split
those out.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
These aren't complicated but there's a lot of them so let's run them
separately to make the overall tablet test shorter.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
These take a long time and have a reasonable high chance of failure due
to the timing constraints. Let's split them up so they don't hog the
runners for that long and in case they fail, we only need to re-run a
short test.
Before: one test running approx 21 min, now 3 tests running approx 7 +
11 + 4 min.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
Concat the line number to the generated variable names, this way we can
have more than one TEST_COLLECTION() in the same file.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
Instead of extracting the suite name from the test's file name use the
current suite that is being parsed. This way we pave the way for
multiple suites in the same file.
This uses a global because otherwise we'd have to redo all the
litest_add() functions but it does the job here.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
This is currently a requirement, so let's match this before we run
into issues here re-structuring stuff.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
This is a a list of struct suite with the various tests inside that
suite.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Most callers of litest_abort_msg() don't add '\n' so the output was
mangled.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
This requires switching a lot of int_eq/int_ne over to enum_eq/enum_ne
because the compiler doesn't infer the right type from a harcoded enum
value - it just defaults to int.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
This is the first step in switching away from the check framework.
Our litest macros already do almost exactly the same anyway so most of
this is a simple sed with a few compiler fixes where things mismatch
(nonnull -> notnull) and (_tol -> _epsilon).
This now generates a whole bunch of integer mismatch warnings: check
casts everything to intmax_t whereas we use typeof, so lots of warnings
especially for enums.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Theoretically we should be using ck_assert_double_eq here for
consistency but this patch is part of a series eventually
replacing those calls, so let's jump to litest_assert_double
directly to avoid further rebase conflicts.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
We were checking doubles for integers but better to check that we're
close to the maximum range without actually being over.
This worked because check typecasts to uint_max_t but let's be explicit
here.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Same as ck_assert_double_tol
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Assuming safe_atoi works as expected, `fuzz` cannot be
uninitialized by the time we get here. But let's init it anyway to make
scan-build happy.
[202/249] Compiling C object libinput-test-suite.p/test_test-touch.c.o
../../../test/test-touch.c:964:2: warning: Assigned value is garbage or undefined [core.uninitialized.Assign]
964 | litest_assert_int_eq(fuzz, 10); /* device-specific */
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that this error message is the result of a follow-up commit,
this commit is shuffled before so we have bisectable build.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Weirdly, that also required initializing two variables to NULL to stop a
compiler warning.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
We should check that we actually have a double here...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1059>
|
|
Kernel commit 206f533a0a7c
"Input: uinput - reject requests with unreasonable number of slots"
limits the number of slots to 99 - let's manually adjust that so we can
keep creating uinput devices.
Since these are just a test device and we don't use the slots here
anyway (they're all fake MT devices) we can manually work around this.
The real devices won't be affected by this since this is a limitation
in uinput, not the input subsystem.
Also move the comment one line up in the ms-surface device, the previous
comment referred to the wrong event code.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1061>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1060>
|
|
Better naming this way
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1060>
|
|
This means we don't rely on the "all_tests" global here though it also
means we need to move the cleanup into the caller.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1060>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1052>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
|
|
This provides better debugging logs and is slightly less code in
the checks too.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
|
|
Technically we're not really waiting here since we expect the
event to already be there but for these tests the distinction doesn't
matter.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
|
|
Hidden by ck_asset_int_eq type-casing everything to intmax_t
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
|
|
This provides better debugging printfs and is the now-recommended way to
check this.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
|
|
Wraps libinput_dispatch() with a location which will make things a bit
easier to track. Output (in --verbose) is something like:
gestures_swipe_3fg_unaccel_fn():1346 - dispatching
Which makes it easier to associate the various calls to libinput
dispatch with the other output from libinput.
This patch switches all uses of libinput_dispatch() in test cases over
but not the litest functions that may call dispatch too. Remains to be
seen if that is necessary.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|
|
This was always intended but a bug prevented the actual abort.
strstr returns NULL when we cannot find the substring so we always
triggered the first noop condition on bugs.
Fixes: bd7b91065b13 ("evdev: warn if our event processing lags by 10ms or more")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|
|
Add a litest_checkpoint macro and convert a few of the litest_assert
macros to make use of that - this gives us a printf of the call site in
case it fails.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|
|
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|
|
Wrap this in a macro so we cannot forget to pass -1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|
|
Wrap this in a macro so we cannot forget to pass -1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
|