Changeset 26784 in vbox for trunk/src/VBox/Runtime/testcase/tstRTPipe.cpp
- Timestamp:
- Feb 25, 2010 11:56:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTPipe.cpp
r26775 r26784 140 140 RTTESTI_CHECK_RC_RETV(RTPipeCreate(&hPipeR, &hPipeW, RTPIPE_C_INHERIT_READ | RTPIPE_C_INHERIT_WRITE), VINF_SUCCESS); 141 141 int rc = RTPipeFlush(hPipeW); 142 RTTESTI_CHECK (rc == VERR_NOT_SUPPORTED || rc == VINF_SUCCESS);142 RTTESTI_CHECK_MSG(rc == VERR_NOT_SUPPORTED || rc == VINF_SUCCESS, ("%Rrc\n", rc)); 143 143 RTTESTI_CHECK_RC_RETV(RTPipeClose(hPipeR), VINF_SUCCESS); 144 144 RTTESTI_CHECK_RC_RETV(RTPipeClose(hPipeW), VINF_SUCCESS); … … 223 223 RTTESTI_CHECK_RC_RETV(RTPipeClose(hPipeR), VINF_SUCCESS); 224 224 cbWritten = ~(size_t)2; 225 RTTESTI_CHECK_RC(RTPipeWrite(hPipeW, "", 0, &cbWritten), V ERR_BROKEN_PIPE);226 RTTESTI_CHECK(cbWritten == ~(size_t)2);225 RTTESTI_CHECK_RC(RTPipeWrite(hPipeW, "", 0, &cbWritten), VINF_SUCCESS); 226 RTTESTI_CHECK(cbWritten == 0); 227 227 cbWritten = ~(size_t)2; 228 228 RTTESTI_CHECK_RC(RTPipeWrite(hPipeW, "4", 1, &cbWritten), VERR_BROKEN_PIPE); … … 233 233 RTTESTI_CHECK_RC_RETV(RTPipeClose(hPipeW), VINF_SUCCESS); 234 234 cbRead = ~(size_t)0; 235 RTTESTI_CHECK_RC(RTPipeRead(hPipeR, abBuf, 0, &cbRead), VINF_SUCCESS); // !?235 RTTESTI_CHECK_RC(RTPipeRead(hPipeR, abBuf, 0, &cbRead), VINF_SUCCESS); 236 236 RTTESTI_CHECK(cbRead == 0); 237 237 cbRead = ~(size_t)3; … … 284 284 RTTESTI_CHECK(!memcmp(abBuf, "42!", 3)); 285 285 RTTESTI_CHECK_RC(RTPipeClose(hPipeR), VINF_SUCCESS); 286 RTTESTI_CHECK_RC_RETV(RTPipeWriteBlocking(hPipeW, "", 0), V ERR_BROKEN_PIPE);286 RTTESTI_CHECK_RC_RETV(RTPipeWriteBlocking(hPipeW, "", 0), VINF_SUCCESS); 287 287 RTTESTI_CHECK_RC_RETV(RTPipeWriteBlocking(hPipeW, "42", 2), VERR_BROKEN_PIPE); 288 288 RTTESTI_CHECK_RC(RTPipeClose(hPipeW), VINF_SUCCESS);
Note:
See TracChangeset
for help on using the changeset viewer.