Changeset 39233 in vbox for trunk/src/VBox/HostServices/GuestProperties/testcase
- Timestamp:
- Nov 8, 2011 12:44:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
r39228 r39233 970 970 static void test4(void) 971 971 { 972 RTTestISub("GET_PROP_HOST buffer handling"); 973 974 VBOXHGCMSVCFNTABLE svcTable; 975 VBOXHGCMSVCHELPERS svcHelpers; 976 initTable(&svcTable, &svcHelpers); 977 RTTESTI_CHECK_RC_OK_RETV(VBoxHGCMSvcLoad(&svcTable)); 978 979 /* Insert a property that we can mess around with. */ 980 static char const s_szProp[] = "/MyProperties/Sub/Sub/Sub/Sub/Sub/Sub/Sub/Property"; 981 static char const s_szValue[] = "Property Value"; 982 RTTESTI_CHECK_RC_OK(doSetProperty(&svcTable, s_szProp, s_szValue, "", true, true)); 983 984 985 /* Get the value with buffer sizes up to 1K. */ 986 for (uint32_t cbBuf = 0; cbBuf < _1K; cbBuf++) 987 { 988 void *pvBuf = RTTestGuardedAllocTail(g_hTest, cbBuf); 989 990 VBOXHGCMSVCPARM aParms[4]; 991 aParms[0].setString(s_szProp); 992 aParms[1].setPointer(pvBuf, cbBuf); 993 int rc = svcTable.pfnHostCall(svcTable.pvService, GET_PROP_HOST, 4, aParms); 994 995 RTTestGuardedFree(g_hTest, pvBuf); 996 } 997 998 /* Done. */ 999 RTTESTI_CHECK_RC_OK(svcTable.pfnUnload(svcTable.pvService)); 1000 } 1001 1002 1003 1004 static void test5(void) 1005 { 972 1006 RTTestISub("Max properties"); 973 1007 … … 1051 1085 1052 1086 1087 1088 1053 1089 int main(int argc, char **argv) 1054 1090 { … … 1062 1098 test3(); 1063 1099 test4(); 1100 test5(); 1064 1101 1065 1102 return RTTestSummaryAndDestroy(g_hTest);
Note:
See TracChangeset
for help on using the changeset viewer.