diff --git a/tests/Imakefile b/tests/Imakefile
index 9bb26bc..868d945 100644
--- a/tests/Imakefile
+++ b/tests/Imakefile
@@ -3,12 +3,13 @@
12TO11ROOT = ..
DEPLIBS = $(DEPXLIB)
SYS_LIBRARIES = MathLibrary
-LOCAL_LIBRARIES = $(WAYLAND_CLIENT) $(XLIB) $(PNG)
+LOCAL_LIBRARIES = $(WAYLAND_CLIENT) $(XLIB) $(PNG) $(GBM) $(DRM)
COMMONOBJS = test_harness.o
COMMONSRCS = test_harness.c
HEADER = test_harness.h
GENFILES =
EXTRA_DEFINES := -D_GNU_SOURCE -U_BSD_SOURCE -U_SVID_SOURCE
+ INCLUDES := $(DRMINCLUDES) $(PIXMANINCLUDES)
#define ScannerTarget(name) @@\
name.h: $(12TO11ROOT)/name.xml @@\
@@ -24,6 +25,7 @@ name.c: $(12TO11ROOT)/name.xml name.h @@\
ScannerTarget(12to11-test)
ScannerTarget(viewporter)
+ScannerTarget(linux-dmabuf-unstable-v1)
/* Not actually a test. */
SRCS1 = $(COMMONSRCS) imgview.c
@@ -42,7 +44,9 @@ ScannerTarget(viewporter)
OBJS7 = $(COMMONSRCS) scale_test.o
SRCS8 = $(COMMONSRCS) seat_test.c
OBJS8 = $(COMMONSRCS) seat_test.o
- PROGRAMS = imgview simple_test damage_test transform_test viewporter_test subsurface_test scale_test seat_test
+ SRCS9 = $(COMMONSRCS) dmabuf_test.c
+ OBJS9 = $(COMMONSRCS) dmabuf_test.o
+ PROGRAMS = imgview simple_test damage_test transform_test viewporter_test subsurface_test scale_test seat_test dmabuf_test
/* Make all objects depend on HEADER. */
$(OBJS1): $(HEADER)
@@ -58,6 +62,7 @@ NormalProgramTarget(viewporter_test,$(OBJS5),NullParameter,$(LOCAL_LIBRARIES),Nu
NormalProgramTarget(subsurface_test,$(OBJS6),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
NormalProgramTarget(scale_test,$(OBJS7),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
NormalProgramTarget(seat_test,$(OBJS8),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
+NormalProgramTarget(dmabuf_test,$(OBJS9),NullParameter,$(LOCAL_LIBRARIES),NullParameter);
DependTarget3($(SRCS1),$(SRCS2),$(SRCS3))
DependTarget3($(SRCS4),$(SRCS5),$(SRCS6))
DependTarget3($(SRCS7),$(SRCS8),NullParameter)
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index f91eb1d..32d668b 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -21,7 +21,7 @@
pushd "$(dirname $0)"
declare -a standard_tests=(
simple_test damage_test transform_test viewporter_test
- subsurface_test scale_test seat_test
+ subsurface_test scale_test seat_test dmabuf_test
)
make -C . "${standard_tests[@]}"
diff --git a/tests/seat_test.c b/tests/seat_test.c
index 8517bb5..6fb045a 100644
--- a/tests/seat_test.c
+++ b/tests/seat_test.c
@@ -606,9 +606,18 @@ handle_pointer_enter (void *data, struct wl_pointer *wl_pointer,
event->header.last = record_tail;
record_tail = &event->header;
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
+#endif
+
event->x = wl_fixed_to_double (surface_x);
event->y = wl_fixed_to_double (surface_x);
event->surface = surface;
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
static void
@@ -628,9 +637,18 @@ handle_pointer_leave (void *data, struct wl_pointer *wl_pointer,
if (!event)
report_test_failure ("failed to record event");
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
+#endif
+
event->header.kind = POINTER_LEAVE_EVENT;
event->header.last = record_tail;
record_tail = &event->header;
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
static void
@@ -653,12 +671,21 @@ handle_pointer_motion (void *data, struct wl_pointer *wl_pointer,
if (!event)
report_test_failure ("failed to record event");
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
+#endif
+
event->header.kind = POINTER_MOTION_EVENT;
event->header.last = record_tail;
record_tail = &event->header;
event->x = wl_fixed_to_double (surface_x);
event->y = wl_fixed_to_double (surface_y);
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
static void
diff --git a/tests/svnignore.txt b/tests/svnignore.txt
index 283d6af..a121b13 100644
--- a/tests/svnignore.txt
+++ b/tests/svnignore.txt
@@ -8,6 +8,7 @@ viewporter_test
subsurface_test
scale_test
seat_test
+dmabuf_test
imgview
reject.dump
Makefile
diff --git a/tests/test_harness.h b/tests/test_harness.h
index 7cbdf3e..2cc90b1 100644
--- a/tests/test_harness.h
+++ b/tests/test_harness.h
@@ -26,6 +26,8 @@ along with 12to11. If not, see . */
#include
#include
+#include
+
#include
#include