PERFORCE change 138150 for review

Zhouyi ZHOU zhouzhouyi at FreeBSD.org
Thu Mar 20 03:18:09 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=138150

Change 138150 by zhouzhouyi at zhouzhouyi_mactest on 2008/03/20 03:17:26

	Add the test cases for poll, I wonder why poll don't return any error message when
	the operation is not permitted

Affected files ...

.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#18 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/vnops/00.t#1 add

Differences ...

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#18 (text+ko) ====

@@ -535,13 +535,13 @@
 			
 		struct pollfd pfd;
 		int fd;
-		fd = open("/root/pf.conf", O_RDWR);
+		fd = open(STR(0), O_WRONLY);
 		if (fd <= 0)
 			goto erropen;
 		pfd.fd = fd;
 		pfd.events = POLLWRNORM; 
 		pfd.revents = 0;
-		poll(&pfd, 1, 1); 
+		rval = poll(&pfd, 1, 1); 
 		close(fd);
         erropen:
 		break;


More information about the p4-projects mailing list