[Piglit] [PATCH 09/13] tests/glx: Enable signal handler support.
Kenney Phillis
kphillisjr at gmail.com
Thu Oct 31 15:48:05 CET 2013
---
tests/glx/glx-close-display.c | 3 +++
tests/glx/glx-copy-sub-buffer.c | 2 ++
tests/glx/glx-destroycontext-1.c | 4 +++-
tests/glx/glx-destroycontext-2.c | 2 ++
tests/glx/glx-dont-care-mask.c | 2 ++
tests/glx/glx-fbconfig-compliance.c | 2 ++
tests/glx/glx-fbconfig-sanity.c | 2 ++
tests/glx/glx-fbo-binding.c | 2 ++
tests/glx/glx-make-current-bad-context.c | 2 ++
tests/glx/glx-make-current.c | 2 ++
tests/glx/glx-make-glxdrawable-current.c | 2 ++
tests/glx/glx-multi-context-ib-1.c | 2 ++
tests/glx/glx-multithread-makecurrent-1.c | 2 ++
tests/glx/glx-multithread-makecurrent-2.c | 2 ++
tests/glx/glx-multithread-makecurrent-3.c | 2 ++
tests/glx/glx-multithread-makecurrent-4.c | 2 ++
tests/glx/glx-multithread-shader-compile.c | 2 ++
tests/glx/glx-multithread-texture.c | 2 ++
tests/glx/glx-multithread.c | 2 ++
tests/glx/glx-pixmap-crosscheck.c | 2 ++
tests/glx/glx-pixmap-life.c | 2 ++
tests/glx/glx-pixmap-multi.c | 2 ++
tests/glx/glx-pixmap13-life.c | 2 ++
tests/glx/glx-query-drawable.c | 2 ++
tests/glx/glx-shader-sharing.c | 2 ++
tests/glx/glx-string-sanity.c | 2 ++
tests/glx/glx-swap-event.c | 4 +++-
tests/glx/glx-swap-exchange.c | 2 ++
tests/glx/glx-swap-pixmap-bad.c | 2 ++
tests/glx/glx-swap-pixmap.c | 2 ++
tests/glx/glx-swap-singlebuffer.c | 2 ++
tests/glx/glx-tfp.c | 2 ++
tests/glx/glx-visuals-depth.c | 2 ++
tests/glx/glx-visuals-stencil.c | 2 ++
tests/glx/glx-window-life.c | 2 ++
35 files changed, 73 insertions(+), 2 deletions(-)
diff --git a/tests/glx/glx-close-display.c b/tests/glx/glx-close-display.c
index 4789872..3faa957 100644
--- a/tests/glx/glx-close-display.c
+++ b/tests/glx/glx-close-display.c
@@ -80,6 +80,9 @@ isDirectRendering(void)
int
main(int argc, char **argv)
{
+
+ piglit_register_signal_handler();
+
isDirectRendering();
/* Run a second to exercise reloading the *_dri.so driver. */
diff --git a/tests/glx/glx-copy-sub-buffer.c b/tests/glx/glx-copy-sub-buffer.c
index a991df5..9d4d3e8 100644
--- a/tests/glx/glx-copy-sub-buffer.c
+++ b/tests/glx/glx-copy-sub-buffer.c
@@ -123,6 +123,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-destroycontext-1.c b/tests/glx/glx-destroycontext-1.c
index fc27b6e..e4b5322 100644
--- a/tests/glx/glx-destroycontext-1.c
+++ b/tests/glx/glx-destroycontext-1.c
@@ -82,7 +82,9 @@ main(int argc, char **argv)
else
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
-
+
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-destroycontext-2.c b/tests/glx/glx-destroycontext-2.c
index e4c6d37..87ef7c8 100644
--- a/tests/glx/glx-destroycontext-2.c
+++ b/tests/glx/glx-destroycontext-2.c
@@ -82,6 +82,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-dont-care-mask.c b/tests/glx/glx-dont-care-mask.c
index dace558..3aa3e75 100644
--- a/tests/glx/glx-dont-care-mask.c
+++ b/tests/glx/glx-dont-care-mask.c
@@ -58,6 +58,8 @@ main(int argc, char **argv)
None
};
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-fbconfig-compliance.c b/tests/glx/glx-fbconfig-compliance.c
index 0cd2183..af2d650 100644
--- a/tests/glx/glx-fbconfig-compliance.c
+++ b/tests/glx/glx-fbconfig-compliance.c
@@ -157,6 +157,8 @@ main(int argc, char **argv)
int visual_depth;
int conformant = 0;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-fbconfig-sanity.c b/tests/glx/glx-fbconfig-sanity.c
index 9e570aa..84d94a7 100644
--- a/tests/glx/glx-fbconfig-sanity.c
+++ b/tests/glx/glx-fbconfig-sanity.c
@@ -53,6 +53,8 @@ main(int argc, char **argv)
GLXFBConfig *configs;
int num_configs;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-fbo-binding.c b/tests/glx/glx-fbo-binding.c
index bfdc4dd..5b1bdc0 100644
--- a/tests/glx/glx-fbo-binding.c
+++ b/tests/glx/glx-fbo-binding.c
@@ -88,6 +88,8 @@ main(int argc, char **argv)
XVisualInfo *visinfo;
int i;
+ piglit_register_signal_handler();
+
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-auto") == 0) {
piglit_automatic = 1;
diff --git a/tests/glx/glx-make-current-bad-context.c b/tests/glx/glx-make-current-bad-context.c
index 0064251..248871e 100644
--- a/tests/glx/glx-make-current-bad-context.c
+++ b/tests/glx/glx-make-current-bad-context.c
@@ -68,6 +68,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-make-current.c b/tests/glx/glx-make-current.c
index dde99b4..3a99e81 100644
--- a/tests/glx/glx-make-current.c
+++ b/tests/glx/glx-make-current.c
@@ -87,6 +87,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-make-glxdrawable-current.c b/tests/glx/glx-make-glxdrawable-current.c
index fc339be..ce25221 100644
--- a/tests/glx/glx-make-glxdrawable-current.c
+++ b/tests/glx/glx-make-glxdrawable-current.c
@@ -116,6 +116,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multi-context-ib-1.c b/tests/glx/glx-multi-context-ib-1.c
index 2b3c00e..cbfbf0e 100644
--- a/tests/glx/glx-multi-context-ib-1.c
+++ b/tests/glx/glx-multi-context-ib-1.c
@@ -175,6 +175,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multithread-makecurrent-1.c b/tests/glx/glx-multithread-makecurrent-1.c
index 97dc1cd..9dc92d8 100644
--- a/tests/glx/glx-multithread-makecurrent-1.c
+++ b/tests/glx/glx-multithread-makecurrent-1.c
@@ -166,6 +166,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multithread-makecurrent-2.c b/tests/glx/glx-multithread-makecurrent-2.c
index d9714ec..9cf120f 100644
--- a/tests/glx/glx-multithread-makecurrent-2.c
+++ b/tests/glx/glx-multithread-makecurrent-2.c
@@ -166,6 +166,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multithread-makecurrent-3.c b/tests/glx/glx-multithread-makecurrent-3.c
index dc93d33..6386bdf 100644
--- a/tests/glx/glx-multithread-makecurrent-3.c
+++ b/tests/glx/glx-multithread-makecurrent-3.c
@@ -158,6 +158,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multithread-makecurrent-4.c b/tests/glx/glx-multithread-makecurrent-4.c
index 53cb297..34c9fad 100644
--- a/tests/glx/glx-multithread-makecurrent-4.c
+++ b/tests/glx/glx-multithread-makecurrent-4.c
@@ -157,6 +157,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-multithread-shader-compile.c b/tests/glx/glx-multithread-shader-compile.c
index 82042d5..0f292e8 100644
--- a/tests/glx/glx-multithread-shader-compile.c
+++ b/tests/glx/glx-multithread-shader-compile.c
@@ -99,6 +99,8 @@ main(int argc, char **argv)
int ret;
pthread_t thread1, thread2;
+ piglit_register_signal_handler();
+
XInitThreads();
pthread_mutex_init(&mutex, NULL);
diff --git a/tests/glx/glx-multithread-texture.c b/tests/glx/glx-multithread-texture.c
index 59dc730..52150ea 100644
--- a/tests/glx/glx-multithread-texture.c
+++ b/tests/glx/glx-multithread-texture.c
@@ -246,6 +246,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
XInitThreads();
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
diff --git a/tests/glx/glx-multithread.c b/tests/glx/glx-multithread.c
index f88f8da..d948fc7 100644
--- a/tests/glx/glx-multithread.c
+++ b/tests/glx/glx-multithread.c
@@ -120,6 +120,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
XInitThreads();
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
diff --git a/tests/glx/glx-pixmap-crosscheck.c b/tests/glx/glx-pixmap-crosscheck.c
index 0b3f1bd..c9dee8a 100644
--- a/tests/glx/glx-pixmap-crosscheck.c
+++ b/tests/glx/glx-pixmap-crosscheck.c
@@ -65,6 +65,8 @@ main(int argc, char **argv)
GLXPixmap g;
pfn_create_pixmap create_pixmap_with_config = NULL;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-pixmap-life.c b/tests/glx/glx-pixmap-life.c
index bf1ce2a..e420f9d 100644
--- a/tests/glx/glx-pixmap-life.c
+++ b/tests/glx/glx-pixmap-life.c
@@ -60,6 +60,8 @@ main(int argc, char **argv)
Pixmap p;
GLXPixmap g;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-pixmap-multi.c b/tests/glx/glx-pixmap-multi.c
index a0dddfe..8a0e90e 100644
--- a/tests/glx/glx-pixmap-multi.c
+++ b/tests/glx/glx-pixmap-multi.c
@@ -61,6 +61,8 @@ main(int argc, char **argv)
GLXPixmap g1, g2;
GLXFBConfig fbc;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-pixmap13-life.c b/tests/glx/glx-pixmap13-life.c
index be45f81..e567382 100644
--- a/tests/glx/glx-pixmap13-life.c
+++ b/tests/glx/glx-pixmap13-life.c
@@ -62,6 +62,8 @@ main(int argc, char **argv)
GLXPixmap g;
GLXFBConfig fbc;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-query-drawable.c b/tests/glx/glx-query-drawable.c
index 49ac227..2387ce1 100644
--- a/tests/glx/glx-query-drawable.c
+++ b/tests/glx/glx-query-drawable.c
@@ -266,6 +266,8 @@ parse_args(int argc, char **argv,
}
}
+ piglit_register_signal_handler();
+
if (*test_func == query_preserved_contents)
if (drawable_type != GLXPBUFFER)
usage_error();
diff --git a/tests/glx/glx-shader-sharing.c b/tests/glx/glx-shader-sharing.c
index 1b180ae..c9581bd 100644
--- a/tests/glx/glx-shader-sharing.c
+++ b/tests/glx/glx-shader-sharing.c
@@ -178,6 +178,8 @@ main(int argc, char **argv)
fprintf(stderr, "%s bad option: %s\n", TestName, argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "%s: open display failed\n", TestName);
diff --git a/tests/glx/glx-string-sanity.c b/tests/glx/glx-string-sanity.c
index 1711d23..39906ab 100644
--- a/tests/glx/glx-string-sanity.c
+++ b/tests/glx/glx-string-sanity.c
@@ -106,6 +106,8 @@ main(int argc, char **argv)
const char *unified_string;
char *buf;
+ piglit_register_signal_handler();
+
Display *dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-swap-event.c b/tests/glx/glx-swap-event.c
index 310e634..a5f8d27 100644
--- a/tests/glx/glx-swap-event.c
+++ b/tests/glx/glx-swap-event.c
@@ -512,7 +512,9 @@ main(int argc, char *argv[])
usage();
piglit_report_result(PIGLIT_SKIP);
}
-
+
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
diff --git a/tests/glx/glx-swap-exchange.c b/tests/glx/glx-swap-exchange.c
index c064a6c..010a0d8 100644
--- a/tests/glx/glx-swap-exchange.c
+++ b/tests/glx/glx-swap-exchange.c
@@ -105,6 +105,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-swap-pixmap-bad.c b/tests/glx/glx-swap-pixmap-bad.c
index 52a0749..51a4642 100644
--- a/tests/glx/glx-swap-pixmap-bad.c
+++ b/tests/glx/glx-swap-pixmap-bad.c
@@ -56,6 +56,8 @@ main(int argc, char **argv)
GLXPixmap g;
GLXContext ctx;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-swap-pixmap.c b/tests/glx/glx-swap-pixmap.c
index 7635e0d..32039f3 100644
--- a/tests/glx/glx-swap-pixmap.c
+++ b/tests/glx/glx-swap-pixmap.c
@@ -50,6 +50,8 @@ main(int argc, char **argv)
bool pass;
GLint alpha_bits;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-swap-singlebuffer.c b/tests/glx/glx-swap-singlebuffer.c
index a747149..4e90361 100644
--- a/tests/glx/glx-swap-singlebuffer.c
+++ b/tests/glx/glx-swap-singlebuffer.c
@@ -104,6 +104,8 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-tfp.c b/tests/glx/glx-tfp.c
index 413d920..31ea426 100644
--- a/tests/glx/glx-tfp.c
+++ b/tests/glx/glx-tfp.c
@@ -307,6 +307,8 @@ int main(int argc, char**argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
diff --git a/tests/glx/glx-visuals-depth.c b/tests/glx/glx-visuals-depth.c
index 8db98bb..b4dda5a 100644
--- a/tests/glx/glx-visuals-depth.c
+++ b/tests/glx/glx-visuals-depth.c
@@ -101,6 +101,8 @@ main(int argc, char **argv)
{
enum piglit_result result;
+ piglit_register_signal_handler();
+
if (argc > 1 && strcmp(argv[1], "-pixmap") == 0)
result = piglit_glx_iterate_pixmap_fbconfigs(draw);
else
diff --git a/tests/glx/glx-visuals-stencil.c b/tests/glx/glx-visuals-stencil.c
index 12fcfd3..3380b11 100644
--- a/tests/glx/glx-visuals-stencil.c
+++ b/tests/glx/glx-visuals-stencil.c
@@ -101,6 +101,8 @@ main(int argc, char **argv)
{
enum piglit_result result;
+ piglit_register_signal_handler();
+
if (argc > 1 && strcmp(argv[1], "-pixmap") == 0)
result = piglit_glx_iterate_pixmap_fbconfigs(draw);
else
diff --git a/tests/glx/glx-window-life.c b/tests/glx/glx-window-life.c
index dc58bbf..6ec1e5e 100644
--- a/tests/glx/glx-window-life.c
+++ b/tests/glx/glx-window-life.c
@@ -64,6 +64,8 @@ main(int argc, char **argv)
GLXFBConfig fbc;
XWindowAttributes xwa;
+ piglit_register_signal_handler();
+
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
--
1.7.9.5
More information about the Piglit
mailing list