--- a/tests/cancel4.c
+++ b/tests/cancel4.c
@@ -68,7 +68,7 @@
 void *
 mythread(void * arg)
 {
-  int result = 0;
+  int result = ((int)PTHREAD_CANCELED + 1);
   bag_t * bag = (bag_t *) arg;
 
   assert(bag == &threadbag[bag->threadnum]);