summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-12-13test: signal-logging: Fix looping signed number testsDaniel Martin1-1/+1
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> (cherry picked from commit 15a32ee5d1fffa171bb05af9a0e5b472e4af1488)
2017-12-13test: input: Fix used uninitialized warning in dix_event_to_coreDaniel Martin1-1/+1
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> (cherry picked from commit 0bcc65f2bf479c6a74ac70bb5b5181d6834dded6)
2017-10-04Move statically linked xorgxkb files from dixmods to a separate directoryJon TURNEY1-1/+1
[ajax: Fixed test/Makefile.am as well] Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit fbdd73fac68383c93f6f5c6a7615860503039999)
2017-09-25test: fix compiler warningPeter Hutterer1-1/+1
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> (cherry picked from commit ea82ececbf85a7ac3d0931687f44c57534fde17c)
2017-01-11test: fix distributing scriptsPekka Paalanen1-1/+2
Fix the following error on 'make distcheck': make[6]: *** No rule to make target 'scripts/xvfb-piglit.sh', needed by 'scripts/xvfb-piglit.sh.log'. Stop. make[6]: Leaving directory '/home/pq/git/xserver/xorg-server-1.19.99.1/_build/sub/test' Makefile:1367: recipe for target 'check-TESTS' failed The setup to trigger this is: $ ./configure --prefix=/home/pq/local --disable-docs --disable-devel-docs --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin --enable-debug SCRIPT_TESTS is populated conditionally, but we should distribute the scripts in any case. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> (cherry picked from commit b365c5d16894a259dbf29db4ca2640d8ed768063)
2017-01-11test: Fix stray Makefile reference to removed os testRhys Kidd1-1/+0
Fixes the following warning: test/Makefile.am:69: warning: variable 'os_LDADD' is defined but no program or test/Makefile.am:69: library has 'os' as canonical name (possible typo) Introduced upon the removal of test/os in: commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit cf8860786c3e301486cd2853bc82977ba75e6b17)
2016-10-05test: Use $XSERVER_BUILDDIR for Xvfb executable pathMichel Dänzer1-1/+1
Fixes make check with out-of-tree builds. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Re-enable a couple of GetImage testsAdam Jackson1-3/+0
Fixed in 6c6f09aac. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Run xts against Xephyr -glamor when presentEric Anholt2-0/+22
v2: Drop x8r8g8b8 skip, now that it's fixed. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Switch our testing X server to being spawned with simple-xinitEric Anholt1-1/+1
Once I introduced a second X server being tested, I found that startx hit races in choosing a display. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Update piglit HTML even when tests all passEric Anholt1-3/+3
I was confused by the behavior I'd written before. keithp and mattst88 responded with shock that I would have made it so surprising, as well. v2: Point to index.html instead of problems.html, which won't exist if we had no problems. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Fix parsing of piglit resultsEric Anholt1-3/+3
The "dmesg-fail" line was matching our "fail" regex, so if you didn't have those we would ignore fails. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Make the piglit-running script callable with an arbitrary serverEric Anholt4-69/+86
v2: Check that SERVER_COMMAND is set. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Add a little xinit-like program for starting servers for testingEric Anholt3-4/+239
The normal xinit is racy because it doesn't use -displayfd. This implements the bare minimum for testing purposes, using -displayfd to sequence starting the client, and avoids adding yet another dependency to the server. v2: Fix asprintf error checks. v3: Add error checking for fork(), clarify calloc() arg. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Handle srcdir != builddir in Xvfb testingEric Anholt2-2/+9
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-22XQuartz: Adopt input_lock() and input_unlock()Jeremy Huddleston Sequoia1-16/+0
This allows us to remove darwinEvents_lock() and darwinEvents_unlock() and remove the serverRunning hack from dix Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-02test: Run some XTS5 integration tests against Xvfb if possible.Eric Anholt3-3/+135
By default the tests will be skipped. However, if you set XTEST_DIR to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo (no build necessary), make check will run piglit's xts-render tests against Xvfb. We could run more of XTS5, but I haven't spent the time identifying what additional subset would be worth running, since much of it is only really testing the client libraries. We want to make sure that we keep the runtime down, and this subset of the test suite took 92 seconds according to piglit. Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-08-17test: Remember to swap the window argument to XIQueryPointerAdam Jackson1-0/+1
Before 5c69cb60 this wouldn't matter, because ProcXIQueryPointer manually emitted its own error before (bogusly) returning Success to the main loop. Since these tests only look at the return value of the dispatch function we'd think things succeeded even when we'd generated an error. With that fixed, the test code's failure to swap the window id would make dixLookupWindow (rightly) throw BadWindow. Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-29test: Actually verify that two equivalent touch points are the sameKeith Packard1-1/+1
I typo'd when fixing this at Peter's request and left off the '2' from the second variable name. Signed-off-by: Keith Packard <keithp@keithp.com>
2016-05-29test: Make touch test reflect new ability to realloc touch array [v2]Keith Packard1-15/+16
Threaded input allows the input code to call malloc while processing events. In this case, that's in the middle of processing touch events and needing to resize the touch buffer. This test was expecting the old behaviour where touch points would get dropped if the buffer was full. The fix is to check for the new behaviour instead. [v2] * make sure two finding two equivalent touches return the same touch object * check to make sure the queue resizes by the expected amount Changes provided by Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26Remove SIGIO support for input [v5]Keith Packard2-167/+1
This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-29vidmode: move to a separate library of its ownOlivier Fourdan1-0/+2
XVidMode extension might be useful to non hardware servers as well (e.g. Xwayand) so that applications that rely on it (e.g. lot of older games) can at least have read access to XVidMode. But the implementation is very XFree86 centric, so the idea is to add a bunch of vfunc that other non-XFree86 servers can hook up into to provide a similar functionality. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2015-10-27build: Remove stale miext/cw include pathsAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-23libxf86config: libxf86config_internal -> libxf86configEgbert Eich1-1/+1
Now since the installable libxf86config is gone, rename libxf86config_internal to libxf86config. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23test: Fix typo and drop documentation references to glib.Bryce Harrington1-14/+3
The X server doesn't use glib for the tests any more. Signed-off-by: Bryce Harrington <bryce@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2015-09-21test/xi1: Update .gitignoreJasper St. Pierre1-0/+1
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-05-20test: add tests for new valuator mask featuresPeter Hutterer1-0/+63
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-12-08Add REQUEST_FIXED_SIZE testcases to test/misc.cAlan Coopersmith1-0/+37
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08Add request length checking test cases for some Xinput 2.x requestsAlan Coopersmith4-0/+20
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08Add request length checking test cases for some Xinput 1.x requestsAlan Coopersmith3-1/+157
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-09Use unique display name for each xi2 test program [v3]Alan Coopersmith1-0/+12
make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include <errno.h> to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-02Abort xi2 tests if ActivateDevice() failsAlan Coopersmith1-4/+10
I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: key=key@entry=0) at xkbActions.c:1189 sendevent=sendevent@entry=0 '\000') at devices.c:420 at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18xserver: Move 'pragma GCC diagnostic' outside functionsJon TURNEY1-3/+4
$ gcc --version gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /jhbuild/checkout/xorg/xserver/os/log.c: In function ‘LogInit’: /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked etc. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18test: Only build hashtable tests if building X-Resource extensionKeith Packard1-1/+4
The hash table functions are only included in the server when the X-Resource extension is built, so don't try to build and test them unless the X-Resource extension is being built. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-11Make list tests actually test listsAlan Coopersmith1-12/+12
Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04mi: don't process events from disabled devices (#77884)Peter Hutterer1-1/+13
Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21.gitignore: Add new autotools file 'test-driver'Kristian Høgsberg1-0/+2
Automake 1.12 introduces a new parallel test framework that uses a shell script helper and generates *.log and *.trs files. Add to .gitignore. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-18test: [v2] Validate server log reading more carefully in signal-logging testKeith Packard1-3/+8
Check return value from fgets and strchr instead of assuming they worked. [v2] Don't do any necessary work inside the assert call. Also make sure the return value was long enough. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-04-18test: create a link to the generated hw/xfree86/sdksyms.c at build timeGaetan Nadon2-1/+8
Automake 1.14 gives us warning about source code specified in _SOURCES that comes from directories other than the current one. It suggests to enable the subdir-objects feature which only supports code in sub directories. The test directory needs source from hw/xfree86 which is neither under test nor under a sub directory of test. In 1.14 we get a warning, in 2.0 it will break as it will overwrite the object code in xfree86. The solution in this case is to create a link to hw/xfree86/sdksyms.c at build time. It's just like any other built source file. There are no links created in git. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-27Build Xi/stubs.c once as a convenience library, rather than once for each ↵Jon TURNEY1-2/+2
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27Build dpmsstubs.c once as a convenience library, rather than once for each ↵Jon TURNEY1-1/+1
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-25Merge remote-tracking branch 'whot/for-keith'Keith Packard1-1/+0
2014-03-20test: Don't add TEST_LDADD to list testKristian Høgsberg1-1/+0
The list test case is always enabled, even if Xorg is disabled. TEST_LDADD pulls in Xorg files which breaks linking when Xorg is disabled. The list test doesn't need any libraries, so just remove list_LDADD. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-10hashtabletest: Fix warning: format ‘%ld’ expects argument of type ...Hans de Goede1-1/+1
This fixes the following compiler warning: hashtabletest.c: In function ‘print_xid’: hashtabletest.c:15:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘XID’ [-Wformat=] printf("%ld", *x); ^ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-24Fix test/os to work on SolarisAlan Coopersmith1-2/+2
Due to bad decisions made decades ago at AT&T, on SVR4 OS'es the signal() function resets the signal handler before calling the signal handler (equivalent to sigaction flag SA_RESETHAND). This is why the X server has a OsSignal() helper function in os/utils.c that uses the portable POSIX sigaction function to provide BSD/Linux semantics in a signal() style API, so we switch to use that in this test case, allowing it to pass on Solaris. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-24Fix test/signal-logging to work on SolarisAlan Coopersmith1-0/+4
For some reason, Solaris libc sprintf() doesn't add "0x" to the %p output as glibc does, causing the test to fail for not matching the exact output. Since the 0x is desirable, we add it ourselves to the test string. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-20test: remove source file from hashtabletest LDADDGaetan Nadon1-1/+1
LDADD is for libraries and not for source code. Introduced in commit: ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-20test/input: Fix alignment assertion for doublesThierry Reding1-2/+2
The code previously tried to compute the offset of a field in the valuator by subtracting the address of the valuator from the _value_ of the field (rather than the field's address). The correct way to do it would have been (note the &'s): assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0); assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0); That's essentially what the offsetof() macro does. Using offsetof() has the added benefit of not using void pointer arithmetic and therefore silencing a warning on some compilers. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-04input: un-constify dev->namePeter Hutterer1-5/+15
Fallout from fecc7eb1cf66db64728ee2d68cd9443df7e70879, and reverts most of the rest of that patch. The device name is allocated and may even change during PreInit. The const warnings came from the test codes, the correct fix here is to fix the test code. touch.c: In function ‘touch_init’: touch.c:254:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] dev.name = "test device"; Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04input: un-constify InputAttributesPeter Hutterer1-26/+30
Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of that but it's helpfully mixed with other stuff. InputAttributes are not const, they're strdup'd everywhere but the test code and freed properly. Revert the const char changes and fix the test up instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>