diff options
author | marha <marha@users.sourceforge.net> | 2011-07-04 14:26:33 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-04 14:26:33 +0200 |
commit | 7cc339a490eac34596e97788c3b0092d58459cf6 (patch) | |
tree | bc9a29aff5729a5b7314022bc3fea8fdff721dc0 /xorg-server/test | |
parent | 3bbcbc59b6d98f09b26f39d6208faec76cc6aa3e (diff) | |
parent | 5c671fd7f8198bed2fc32b33b81d1081f1486ed9 (diff) | |
download | vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.tar.gz vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.tar.bz2 vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/common.py
mesalib/docs/GL3.txt
mesalib/scons/custom.py
mesalib/scons/gallium.py
mesalib/src/SConscript
xorg-server/Xext/xtest.c
xorg-server/dix/getevents.c
xorg-server/dix/window.c
xorg-server/exa/exa_accel.c
xorg-server/exa/exa_migration_classic.c
xorg-server/exa/exa_unaccel.c
xorg-server/hw/kdrive/ephyr/ephyr.c
xorg-server/hw/kdrive/ephyr/ephyr.h
xorg-server/hw/kdrive/ephyr/ephyrinit.c
xorg-server/hw/kdrive/ephyr/hostx.c
xorg-server/hw/kdrive/src/kdrive.h
xorg-server/hw/kdrive/src/kinput.c
xorg-server/hw/xfree86/common/xf86Init.c
xorg-server/hw/xfree86/dri2/dri2.c
xorg-server/hw/xnest/Init.c
xorg-server/hw/xquartz/darwin.c
xorg-server/hw/xquartz/darwinEvents.c
xorg-server/hw/xquartz/darwinEvents.h
xorg-server/hw/xquartz/darwinXinput.c
xorg-server/hw/xwin/InitInput.c
xorg-server/include/input.h
xorg-server/include/window.h
xorg-server/mi/mipointer.c
xorg-server/test/Makefile.am
xorg-server/test/xi2/protocol-eventconvert.c
Diffstat (limited to 'xorg-server/test')
-rw-r--r-- | xorg-server/test/Makefile.am | 1 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-eventconvert.c | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am index 19133bc28..423e96271 100644 --- a/xorg-server/test/Makefile.am +++ b/xorg-server/test/Makefile.am @@ -40,5 +40,6 @@ libxservertest_la_LIBADD = \ $(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la \
@XORG_LIBS@
+libxservertest_la_DEPENDENCIES = $(libxservertest_la_LIBADD)
endif
endif
diff --git a/xorg-server/test/xi2/protocol-eventconvert.c b/xorg-server/test/xi2/protocol-eventconvert.c index 35c68246d..540825ef6 100644 --- a/xorg-server/test/xi2/protocol-eventconvert.c +++ b/xorg-server/test/xi2/protocol-eventconvert.c @@ -70,6 +70,8 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out, for (i = 0; out->valuators_len && i < sizeof(in->valuators.mask) * 8; i++)
{
+ if (i >= MAX_VALUATORS)
+ assert (!XIMaskIsSet(in->valuators.mask, i));
assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i));
if (XIMaskIsSet(in->valuators.mask, i))
bits_set++;
@@ -238,7 +240,7 @@ static void test_convert_XIRawEvent(void) test_XIRawEvent(&in);
printf("Testing valuator masks\n");
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIRawEvent(&in);
@@ -257,7 +259,7 @@ static void test_convert_XIRawEvent(void) XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIRawEvent(&in);
@@ -354,7 +356,7 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out, valuators = 0;
- for (i = 0; i < sizeof(in->valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
if (XIMaskIsSet(in->valuators.mask, i))
valuators++;
@@ -365,7 +367,9 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out, for (i = 0; i < sizeof(in->valuators.mask) * 8 ||
i < (out->valuators_len * 4) * 8; i++)
{
- if (i > sizeof(in->valuators.mask) * 8)
+ if (i >= MAX_VALUATORS)
+ assert(!XIMaskIsSet(in->valuators.mask, i) && !XIMaskIsSet(ptr, i));
+ else if (i > sizeof(in->valuators.mask) * 8)
assert(!XIMaskIsSet(ptr, i));
else if (i > out->valuators_len * 4 * 8)
assert(!XIMaskIsSet(in->valuators.mask, i));
@@ -610,14 +614,14 @@ static void test_convert_XIDeviceEvent(void) }
printf("Testing valuator masks\n");
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIDeviceEvent(&in);
XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
@@ -627,7 +631,7 @@ static void test_convert_XIDeviceEvent(void) XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIDeviceEvent(&in);
|