Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
$ 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
DDX which wants to use it
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
DDX which wants to use it
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Just forcing everything to const char* is not helpful, compiler warnings are
supposed to warn about broken code. Forcing everything to const when it
clearly isn't less than ideal.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
|
The request is followed by mask_len 4-byte units, then followed by the actual
modifiers.
Also fix up the swapping test, which had the same issue.
Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
The signal formatting tests intentionally include code which generates
warnings with the current X server warning flags. Turn the compiler
warnings off
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
Declare 'XID id' local to each scope it is used in, rather than having
the first use be a function-wide declaration.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
protocol-common declares a bunch of pretty generic names; fix shadows
of these names.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
const char in test/xfree86.c. Cast values to (intmax_t) for %ju format
in test/signal-logging.c.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Lots more const char stuff.
Remove duplicate defs of CoreKeyboardProc and CorePointerProc from
test/xi2/protocol-common.c
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Adds DRM compatible fences using futexes.
Uses FD passing to get pixmaps from DRM applications.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
pop without push restores the commandline options. The proper way is to
push, then ignore, then pop.
And while we're at it, change the pop argument to a comment - pop ignores
the argument, but be proper about it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
test and hashtable code, leading to test failures on 64bit big endian
archs like s390x or ppc64.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The old code was broken and allowed setting client version >= XIVersion,
this was fixed in the previous patch, but updating the value for XIVersion
broke the tests, so fix the tests too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Mainly for %ld, smaller than int is propagated anyway, and %lld isn't really
used.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
On m68k, doubles are not 64-bit aligned, just like on i386 and sh.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
|
|
Format strings with length modifiers but missing format specifier like "%0"
will read one byte past the array size.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This is the lazy man's %f support. Print the decimal part of the number,
then append a decimal point, then print the first two digits of the
fractional part. So %f in sigsafe printing is really %.2f.
No boundary checks in place here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Ever looked at your own code and thought 'WTF was I thinking?'. yeah, that.
Instead of passing in the expected string just use sprintf to print the
number for us and compare. In the end we're just trying to emulate printf
behaviour anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
protocol-xiwarppointer.c: In function ‘ScreenSetCursorPosition’:
protocol-xiwarppointer.c:71:53: warning: declaration of ‘screen’ shadows a
global declaration [-Wshadow]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
I checked this patch with diff -w to check that it only affected
whitespace.
|
|
Conflicts:
Xi/xichangehierarchy.c
Small conflict with the patch from
Xi: don't use devices after removing them
Was easily resolved by hand.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|