diff --git a/src/xpdev/wraptest.c b/src/xpdev/wraptest.c
index 103ff53fa6fd6148d1f77b5428b326d10777bcea..3f54f5d7c9155def0d338423899e2f3c75ade0f6 100644
--- a/src/xpdev/wraptest.c
+++ b/src/xpdev/wraptest.c
@@ -298,7 +298,7 @@ static void sopen_child_thread(void* arg)
 	int fd;
 
 	printf("sopen_child_thread: %d begin\n",(int)arg);
-	if((fd=sopen(LOCK_FNAME,O_RDWR,SH_DENYWR))!=-1) {
+	if((fd=sopen(LOCK_FNAME,O_RDWR,SH_DENYRW))!=-1) {
 		if(arg)
 			printf("!FAILURE: was able to reopen in child thread\n");
 		else {