Changeset 90899 in vbox
- Timestamp:
- Aug 26, 2021 7:58:35 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdSelfTest.cpp
r90895 r90899 8 8 * 9 9 * This self-test does the following: 10 * - 1. a) Creates an ATS instance to emulate the guest mode ("--mode guest") 11 * at port 6042 (ATS_TCP_DEF_BIND_PORT_GUEST). 12 * or 13 * b) Connect to an already existing guest ATS instance if "--guest-ats-address" is specified. 14 * This makes it more flexible in terms of testing / debugging. 10 * - 1. Creates a separate thread for the guest side VKAT and connects to the ATS instance on 11 * the host side at port 6052 (ATS_TCP_DEF_BIND_PORT_HOST). 15 12 * - 2. Uses the Validation Kit audio backend, which in turn creates an ATS instance 16 13 * listening at port 6062 (ATS_TCP_DEF_BIND_PORT_VALKIT). … … 220 217 rc = RTThreadUserWait(hThreadGstAts, RT_MS_30SEC); 221 218 } 222 /* else Step 1a later. */223 219 224 220 RTThreadSleep(2000); /* Fudge: Wait until guest ATS is up. 2 seconds should be enough (tm). */ … … 277 273 278 274 /** 279 * Long option values for the 'selftest' command.280 */281 enum282 {283 VKAT_SELFTEST_OPT_GUEST_ATS_ADDR = 900,284 VKAT_SELFTEST_OPT_GUEST_ATS_PORT,285 VKAT_SELFTEST_OPT_HOST_ATS_ADDR,286 VKAT_SELFTEST_OPT_HOST_ATS_PORT287 };288 289 /**290 275 * Command line parameters for self-test mode. 291 276 */ 292 277 static const RTGETOPTDEF s_aCmdSelftestOptions[] = 293 278 { 294 { "--guest-ats-addr", VKAT_SELFTEST_OPT_GUEST_ATS_ADDR, RTGETOPT_REQ_STRING },295 { "--guest-ats-port", VKAT_SELFTEST_OPT_GUEST_ATS_PORT, RTGETOPT_REQ_UINT32 },296 { "--host-ats-addr", VKAT_SELFTEST_OPT_HOST_ATS_ADDR, RTGETOPT_REQ_STRING },297 { "--host-ats-port", VKAT_SELFTEST_OPT_HOST_ATS_PORT, RTGETOPT_REQ_UINT32 },298 279 { "--exclude-all", 'a', RTGETOPT_REQ_NOTHING }, 299 280 { "--backend", 'b', RTGETOPT_REQ_STRING }, … … 308 289 switch (pOpt->iShort) 309 290 { 310 case 'a': return "Exclude all tests from the list (useful to enable single tests later with --include)"; 311 case 'b': return "The audio backend to use"; 312 case 'd': return "Go via DrvAudio instead of directly interfacing with the backend"; 313 case 'e': return "Exclude the given test id from the list"; 314 case 'i': return "Include the given test id in the list"; 315 case VKAT_SELFTEST_OPT_GUEST_ATS_ADDR: return "Address of guest ATS to connect to\n" 316 " Default: 127.0.0.1; will start own guest ATS"; 317 case VKAT_SELFTEST_OPT_GUEST_ATS_PORT: return "Port of guest ATS to connect to\n" 318 " Default: 6042"; /* ATS_TCP_DEF_CONNECT_PORT_GUEST */ 319 case VKAT_SELFTEST_OPT_HOST_ATS_ADDR: return "Address of host ATS to connect to\n" 320 " Default: " ATS_TCP_DEF_CONNECT_HOST_ADDR_STR; 321 case VKAT_SELFTEST_OPT_HOST_ATS_PORT: return "Port of host ATS to connect to\n" 322 " Default: 6052"; /* ATS_TCP_DEF_BIND_PORT_VALKIT */ 291 case 'a': return "Exclude all tests from the list (useful to enable single tests later with --include)"; 292 case 'b': return "The audio backend to use"; 293 case 'd': return "Go via DrvAudio instead of directly interfacing with the backend"; 294 case 'e': return "Exclude the given test id from the list"; 295 case 'i': return "Include the given test id in the list"; 323 296 default: return NULL; 324 297 } … … 342 315 switch (rc) 343 316 { 344 case VKAT_SELFTEST_OPT_GUEST_ATS_ADDR:345 rc = RTStrCopy(g_Ctx.Host.szGuestAtsAddr, sizeof(g_Ctx.Host.szGuestAtsAddr), ValueUnion.psz);346 break;347 348 case VKAT_SELFTEST_OPT_GUEST_ATS_PORT:349 g_Ctx.Host.uGuestAtsPort = ValueUnion.u32;350 break;351 352 case VKAT_SELFTEST_OPT_HOST_ATS_ADDR:353 rc = RTStrCopy(g_Ctx.Host.szValKitAtsAddr, sizeof(g_Ctx.Host.szValKitAtsAddr), ValueUnion.psz);354 break;355 356 case VKAT_SELFTEST_OPT_HOST_ATS_PORT:357 g_Ctx.Host.uValKitAtsPort = ValueUnion.u32;358 break;359 360 317 case 'a': 361 318 for (unsigned i = 0; i < g_cTests; i++)
Note:
See TracChangeset
for help on using the changeset viewer.

