Separate each statement of the form "assert(a && b);" into "assert(a);"
and "assert(b);" for more precise diagnostics, except for this clever
use in drmmode_display.c where it was used to pass a hint to developers:
assert(num_infos <= 32 && "update return type");
Trying to build fat binaries for multiple arches tickles a bug [1] in
the framework detector in meson 0.50. Workaround this by not bothering
building for x86, which is probably no great loss :S
https://github.com/mesonbuild/meson/issues/5290
We cover all Render ops under the "blend" group, so when we're doing
the cross products of some formats for the masking operation, skip
most of the ops (covering just zero, one, and src/dst alpha blend
factors along with a definitely non-glamor-accelerated one) .
All the tests now complete in <20s of runtime on my skylake.
Signed-off-by: Eric Anholt <eric@anholt.net>
This gets us parallelism between rendercheck tests at the cost of
spinning up more Xvfbs, and nicer logging of the tests that are run.
Signed-off-by: Eric Anholt <eric@anholt.net>
For testing xephyr-glamor on top of Xvfb in CI better, I want to be
able to make one command line describing the nested server invocation,
but that means I need to get two simple-xinits to split client/server
on different "--" arguments.
Signed-off-by: Eric Anholt <eric@anholt.net>
The latter use Python 2 and break with any non-ASCII characters in the
environment, the former uses Python 3 and works fine in that case.
Reviewed-by: Eric Anholt <eric@anholt.net>
This removes the dependency on an externally generated docker image, and
should make it easier to update the docker image or make other changes
related to it.
This is based on Debian testing, because I'm most familiar with Debian.
But it should be easy to base it on another distro.
v2:
* Use kaniko instead of docker-in-docker for image generation, so it can
also work in unprivileged runners.
* Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
the image work.
Fold build-travis-deps.sh into .gitlab-ci.yml.
Preparation for the next change, which would break the Travis Linux
build.
Reviewed-by: Eric Anholt <eric@anholt.net>
Broken since 69d8ea4a49 because our fake screen
didn't have a root window and writing the XKB rules prop would happily
segfault. Fix this by setting up the required bits.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Michel Dänzer michel.daenzer@amd.com
Gitlab very kindly exposes the details of the git commit message (among
much else) in the environment. Unfortunately, piglit tries to handle the
environment in non-UTF8-safe ways, which means if the top-of-tree commit
mentions non-ASCII characters (say, in the author's name) then all the
tests fail and so does the pipeline.
Fortunately none of those variables are things our piglit invocation
needs. Since I've failed to rebuild the docker image as yet, just clear
the likely variables from the environment before running piglit.
This-makes-me: ☹
Inspired by the previous bug, build something we can use to write
damage testcases, including testing for the bug.
Signed-off-by: Eric Anholt <eric@anholt.net>
The image now has enough mojo to run xts, hooray!
Note there's a couple of ugly bits in here. The piglit config fragment
and stock tetexec.cfg reflect missing features from the test suites
(using an installed copy of xts, figuring out the xserver test matrix at
runtime, etc.), I'll be happy to remove them once the tests are fixed.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Make appveyor ignore builds for /travis.*/ and vice versa. If you're
only testing a Windows change, building for OSX and Linux too is a bit
rude.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Install and use xorgproto, and build with optimization as clang has
warnings that only work above -O0. Also expand the build matrix for both
Xcode 8.3 and 9.2. Both images are OSX 10.12 at the moment so this is
really just a way to test with clang 8 vs 9.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Stretch's Mesa is too far behind, and building Mesa to build xserver is
not the sort of problem we're trying to solve here. But our Travis
scripts run inside a docker image, and that image can be whatever, so
since I have to keep rawhide building anyway let's switch to that for
now. The dockerfile can be found at:
https://github.com/nwnk/xserver-travis
The $DISTRO part of the change is foreshadowing for the day we readd a
(probably sid-based) debian image; patches for other environments are
welcome.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.
Signed-off-by: Adam Jackson <ajax@redhat.com>
libxcb-xinput isn't a thing in whichever Ubuntu it is that Travis is
using. The test is already optional, make it more so.
Signed-off-by: Adam Jackson <ajax@redhat.com>
The failing struct comes from the python test written by Michal Srb
<msrb@suse.com>.
v2: Use a drawable (root window) and gc, so that PolyLines hopefully
actually tries processing things. However, the request seems to
process successfully so the poll() just stalls out. However, this
does let us distinguish between detecting the bigrequests error
and not, at least.
v3: Clean up the description of what we expect the poll() call to do.
v4: Use XI2 instead of PolyLine to trigger a predictable error. We know the
server replies with BadValue for a zero num_masks argument. So if we send
a bigreq with a num_masks 0 and a length 0, we can just check whether we
get killed (good) or a BadValue (bad). It doesn't test for specific memory
overflows or crashes, but based on the assumption that we shouldn't look
at *any* BigReq of size 0, this seems to be sufficient.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
unsigned_tests[] was used to compute the amount of signed numbers to
test.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
input.c: In function ‘dix_event_to_core’:
../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized]
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
^~
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
../test/sync/sync.c: In function ‘main’:
../test/sync/sync.c:288:40: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id);
^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Spotted by clang courtesy of the shiny new OSX Travis target:
simple-xinit.c:90:65: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10]' [-Wsizeof-array-decay]
ret = read(displayfd, display_string, sizeof(display_string - 1));
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
I couldn't find any, and I was modifying the implementation, so I had
to write some. I would like the test to end with a "make sure there
weren't any stray unchecked errors", but I didn't figure out how to do
that.
v2: Extend sync tests to cover alarm delta and waitvalue changes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
I want to be able to call client tests with simple-xinit, so assertion
failures should be an error.
v2: Clean up identical returns.
Signed-off-by: Eric Anholt <eric@anholt.net>
The Xvfb tests are passing and Xephyr-glamor is failing for me, but it
fails identically on autotools. It's disabled on Travis for now
because the >10 minutes of silence during testing times out the entire
build.
v2: Fix the disable on travis.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
signal-logging.c:182:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This currently does a meson build using a docker image I've prepared.
The Dockerfile source is at:
https://github.com/anholt/xserver-travis
Docker proved to be necessary to cut the build time per Travis push.
If some day we end up using meson in more of the X stack, we may be
able to move more dependencies out of the docker image and into the CI
build (putting the I in CI). Until then, we'll have to do docker
image rebuilds when dependencies are added/updated.
To enable Travis CI on your github repository, see the first two steps
of the docs at:
https://docs.travis-ci.com/user/getting-started/
Once you do that, pushing branches to your github repo will trigger
builds, which will send you email if they fail. Current build status
can be veiewed your account on travis-ci.org:
https://travis-ci.org/anholt/xserver
The previous misc.h code went out of its way to allow swapping of
unaligned pointers to values. However, the members of an X
request/response are always naturally aligned within the struct, and
the buffers containing a request/response will also be aligned to at
least 8 bytes, so we can just drop it.
text data bss dec hex filename
before: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg
after: 2214919 51552 132016 2398487 249917 hw/xfree86/Xorg
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Peter noted a weirdness in my new bswap code, which could use some
tests to justify it.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fixes warning from Solaris linker:
ld: warning: symbol 'test_data' has differing sizes:
(file tests-protocol-xigetselectedevents.o value=0x418;
file tests-protocol-xigetclientpointer.o value=0x18);
tests-protocol-xigetselectedevents.o definition taken
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This looks like it's always been wrong, but didn't matter before the single
test binary changes as the wrapper was only in place for tests which didn't
care about it's effects, so didn't forward to the real implementation. (see
the changes to protocol-xiselectevents.c in 773fc07e)
This fixes the protocol_xigetselectedevents_test for me. I'm a bit
surprised that passes for anyone at the moment.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>