Changeset 13835 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 5, 2008 2:34:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
r11157 r13835 253 253 rc = INTNETR0IfSend(pArgs->pIntNet, pArgs->hIf, g_pSession, NULL, 0); 254 254 #endif 255 if ( VBOX_FAILURE(rc))255 if (RT_FAILURE(rc)) 256 256 { 257 257 g_cErrors++; … … 271 271 { 272 272 int rc = INTNETR0IfSend(pArgs->pIntNet, pArgs->hIf, g_pSession, abBuf, sizeof(RTMAC) * 2 + sizeof(unsigned) * 4); 273 if ( VBOX_FAILURE(rc))273 if (RT_FAILURE(rc)) 274 274 { 275 275 g_cErrors++; … … 433 433 PINTNET pIntNet; 434 434 int rc = INTNETR0Create(&pIntNet); 435 if ( VBOX_FAILURE(rc))435 if (RT_FAILURE(rc)) 436 436 { 437 437 RTPrintf("tstIntNetR0: INTNETR0Create failed, rc=%Vrc\n"); … … 444 444 INTNETIFHANDLE hIf0 = INTNET_HANDLE_INVALID; 445 445 rc = INTNETR0Open(pIntNet, g_pSession, "test", kIntNetTrunkType_None, "", 0, 1536*2 + 4, 0x8000, &hIf0); 446 if ( VBOX_SUCCESS(rc))446 if (RT_SUCCESS(rc)) 447 447 { 448 448 if (hIf0 != INTNET_HANDLE_INVALID) … … 450 450 INTNETIFHANDLE hIf1 = INTNET_HANDLE_INVALID; 451 451 rc = INTNETR0Open(pIntNet, g_pSession, "test", kIntNetTrunkType_None, NULL, 0, 1536*2 + 4, 0x8000, &hIf1); 452 if ( VBOX_SUCCESS(rc))452 if (RT_SUCCESS(rc)) 453 453 { 454 454 if (hIf1 != INTNET_HANDLE_INVALID) … … 456 456 PINTNETBUF pBuf0; 457 457 rc = INTNETR0IfGetRing0Buffer(pIntNet, hIf0, g_pSession, &pBuf0); 458 if ( VBOX_FAILURE(rc) || !pBuf0)458 if (RT_FAILURE(rc) || !pBuf0) 459 459 { 460 460 RTPrintf("tstIntNetR0: INTNETIfGetRing0Buffer failed! pBuf0=%p rc=%Vrc\n", pBuf0, rc); … … 463 463 PINTNETBUF pBuf1; 464 464 rc = INTNETR0IfGetRing0Buffer(pIntNet, hIf1, g_pSession, &pBuf1); 465 if ( VBOX_FAILURE(rc))465 if (RT_FAILURE(rc)) 466 466 { 467 467 RTPrintf("tstIntNetR0: INTNETIfGetRing0Buffer failed! pBuf1=%p rc=%Vrc\n", pBuf1, rc); … … 470 470 471 471 rc = INTNETR0IfSetActive(pIntNet, hIf0, g_pSession, true); 472 if ( VBOX_FAILURE(rc))472 if (RT_FAILURE(rc)) 473 473 { 474 474 RTPrintf("tstIntNetR0: INTNETR0IfSetActive failed! rc=%Rrc\n", rc); … … 476 476 } 477 477 rc = INTNETR0IfSetActive(pIntNet, hIf1, g_pSession, true); 478 if ( VBOX_FAILURE(rc))478 if (RT_FAILURE(rc)) 479 479 { 480 480 RTPrintf("tstIntNetR0: INTNETR0IfSetActive failed! rc=%Rrc\n", rc); … … 503 503 */ 504 504 rc = INTNETR0IfSend(pIntNet, hIf0, g_pSession, &g_TestFrame0, sizeof(g_TestFrame0)); 505 if ( VBOX_SUCCESS(rc))505 if (RT_SUCCESS(rc)) 506 506 { 507 507 rc = INTNETR0IfWait(pIntNet, hIf0, g_pSession, 1); … … 541 541 */ 542 542 rc = INTNETR0IfSend(pIntNet, hIf1, g_pSession, &g_TestFrame1, sizeof(g_TestFrame1)); 543 if ( VBOX_FAILURE(rc))543 if (RT_FAILURE(rc)) 544 544 { 545 545 RTPrintf("tstIntNetR0: INTNETIfSend returned %Vrc! (hIf1)\n", rc); … … 575 575 RTTHREAD ThreadSend1 = NIL_RTTHREAD; 576 576 rc = RTThreadCreate(&ThreadRecv0, ReceiveThread, &Args0, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "RECV0"); 577 if ( VBOX_SUCCESS(rc))577 if (RT_SUCCESS(rc)) 578 578 rc = RTThreadCreate(&ThreadRecv1, ReceiveThread, &Args1, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "RECV1"); 579 if ( VBOX_SUCCESS(rc))579 if (RT_SUCCESS(rc)) 580 580 rc = RTThreadCreate(&ThreadSend0, SendThread, &Args0, 0, RTTHREADTYPE_EMULATION, RTTHREADFLAGS_WAITABLE, "SEND0"); 581 if ( VBOX_SUCCESS(rc))581 if (RT_SUCCESS(rc)) 582 582 rc = RTThreadCreate(&ThreadSend1, SendThread, &Args1, 0, RTTHREADTYPE_EMULATION, RTTHREADFLAGS_WAITABLE, "SEND1"); 583 if ( VBOX_SUCCESS(rc))583 if (RT_SUCCESS(rc)) 584 584 { 585 585 int rc2 = VINF_SUCCESS; … … 593 593 #endif 594 594 AssertRC(rc); 595 if ( VBOX_SUCCESS(rc))595 if (RT_SUCCESS(rc)) 596 596 { 597 597 ThreadSend0 = NIL_RTTHREAD; … … 608 608 ThreadSend1 = NIL_RTTHREAD; 609 609 } 610 if ( VBOX_SUCCESS(rc)611 && VBOX_SUCCESS(rc2))610 if ( RT_SUCCESS(rc) 611 && RT_SUCCESS(rc2)) 612 612 { 613 613 /* … … 631 631 if (RT_SUCCESS(rc)) 632 632 ThreadRecv0 = NIL_RTTHREAD; 633 if ( VBOX_FAILURE(rc) || VBOX_FAILURE(rc2))633 if (RT_FAILURE(rc) || RT_FAILURE(rc2)) 634 634 { 635 635 RTPrintf("tstIntNetR0: Failed waiting on receiver thread 0, rc=%Vrc, rc2=%Vrc\n", rc, rc2); … … 640 640 if (RT_SUCCESS(rc)) 641 641 ThreadRecv1 = NIL_RTTHREAD; 642 if ( VBOX_FAILURE(rc) || VBOX_FAILURE(rc2))642 if (RT_FAILURE(rc) || RT_FAILURE(rc2)) 643 643 { 644 644 RTPrintf("tstIntNetR0: Failed waiting on receiver thread 1, rc=%Vrc, rc2=%Vrc\n", rc, rc2); … … 647 647 648 648 rc = INTNETR0IfClose(pIntNet, hIf0, g_pSession); 649 if ( VBOX_SUCCESS(rc))649 if (RT_SUCCESS(rc)) 650 650 { 651 651 hIf0 = INTNET_HANDLE_INVALID; … … 659 659 660 660 rc = INTNETR0IfClose(pIntNet, hIf1, g_pSession); 661 if ( VBOX_SUCCESS(rc))661 if (RT_SUCCESS(rc)) 662 662 { 663 663 hIf1 = INTNET_HANDLE_INVALID;
Note:
See TracChangeset
for help on using the changeset viewer.