summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-10-02 15:24:02 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-10-04 12:55:07 +0100
commitd9a32dc657d6359d19427f5c610be54d15ebb1a9 (patch)
tree87c1b161bb64161c2cd12cb832d40c70df3fb75f /test
parent2579d34713033c75deed3628a50dfcb164028310 (diff)
sna/dri2: Assert signal is unset before setting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test')
-rw-r--r--test/dri2-race.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/dri2-race.c b/test/dri2-race.c
index 79dc9c49..ece624f6 100644
--- a/test/dri2-race.c
+++ b/test/dri2-race.c
@@ -144,6 +144,7 @@ static void race_window(Display *dpy, int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
loop = 256 >> ffs(divisors[n]);
printf("DRI2SwapBuffers(divisor=%d), loop=%d", divisors[n], loop);
+ fflush(stdout);
do {
win = XCreateWindow(dpy, DefaultRootWindow(dpy),
0, 0, width, height, 0,
@@ -174,6 +175,7 @@ static void race_window(Display *dpy, int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
loop = 256 >> ffs(divisors[n]);
printf("xcb_dri2_swap_buffers(divisor=%d), loops=%d", divisors[n], loop);
+ fflush(stdout);
do {
win = XCreateWindow(dpy, DefaultRootWindow(dpy),
0, 0, width, height, 0,
@@ -204,6 +206,7 @@ static void race_window(Display *dpy, int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
loop = 256 >> ffs(divisors[n]);
printf("DRI2WaitMsc(divisor=%d), loop=%d", divisors[n], loop);
+ fflush(stdout);
do {
uint64_t ignore, msc;
xcb_connection_t *c = XGetXCBConnection(dpy);
@@ -276,6 +279,7 @@ static void race_resize(Display *dpy, int width, int height,
loop = 256 >> ffs(divisors[n]);
printf("DRI2SwapBuffers(divisor=%d), loop=%d", divisors[n], loop);
+ fflush(stdout);
do {
int w, h;
@@ -310,6 +314,7 @@ static void race_resize(Display *dpy, int width, int height,
loop = 256 >> ffs(divisors[n]);
printf("xcb_dri2_swap_buffers(divisor=%d), loops=%d", divisors[n], loop);
+ fflush(stdout);
do {
int w, h;
@@ -344,6 +349,7 @@ static void race_resize(Display *dpy, int width, int height,
loop = 256 >> ffs(divisors[n]);
printf("DRI2WaitMsc(divisor=%d), loop=%d", divisors[n], loop);
+ fflush(stdout);
do {
uint64_t ignore, msc;
xcb_connection_t *c = XGetXCBConnection(dpy);
@@ -393,6 +399,7 @@ static void race_manager(Display *dpy, int width, int height,
attr.override_redirect = 1;
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2SwapBuffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
win = XCreateWindow(dpy, DefaultRootWindow(dpy),
@@ -425,6 +432,7 @@ static void race_manager(Display *dpy, int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("xcb_dri2_swap_buffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
win = XCreateWindow(dpy, DefaultRootWindow(dpy),
@@ -457,6 +465,7 @@ static void race_manager(Display *dpy, int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2WaitMsc(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
uint64_t ignore, msc;
@@ -518,6 +527,7 @@ static void race_close(int width, int height,
attr.override_redirect = 1;
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2SwapBuffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
Display *dpy = XOpenDisplay(NULL);
@@ -547,6 +557,7 @@ static void race_close(int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("xcb_dri2_swap_buffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
Display *dpy = XOpenDisplay(NULL);
@@ -576,6 +587,7 @@ static void race_close(int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2WaitMsc(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
uint64_t ignore, msc;
@@ -629,6 +641,7 @@ static void race_client(int width, int height,
attr.override_redirect = 1;
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2SwapBuffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
Display *dpy = XOpenDisplay(NULL);
@@ -672,6 +685,7 @@ static void race_client(int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("xcb_dri2_swap_buffers(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
Display *dpy = XOpenDisplay(NULL);
@@ -715,6 +729,7 @@ static void race_client(int width, int height,
for (n = 0; n < N_DIVISORS; n++) {
printf("DRI2WaitMsc(divisor=%d)", divisors[n]);
+ fflush(stdout);
loop = 256 >> ffs(divisors[n]);
do {
Display *dpy = XOpenDisplay(NULL);