tstGuestCtrlParseBuffer.cpp revision bc626ccdbb077b0b1c82484b5d1ef12002b02b46
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync/* $Id$ */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync/** @file
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync *
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * Output stream parsing test cases.
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync/*
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * Copyright (C) 2011 Oracle Corporation
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync *
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * available from http://www.virtualbox.org. This file is free software;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * you can redistribute it and/or modify it under the terms of the GNU
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * General Public License (GPL) as published by the Free Software
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync#include <map>
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync#include <iprt/string.h>
154ed29e9462101350c438a9ace34cb60d92e56fvboxsync#include <iprt/cpp/ministring.h>
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync#include <iprt/test.h>
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync#include <iprt/stream.h>
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync#ifndef BYTE
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync# define BYTE uint8_t
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync#endif
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync/** @todo Use original source of GuestCtrlImpl.cpp! */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsynctypedef struct VBOXGUESTCTRL_BUFFER_VALUE
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync{
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync char *pszValue;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync} VBOXGUESTCTRL_BUFFER_VALUE, *PVBOXGUESTCTRL_BUFFER_VALUE;
154ed29e9462101350c438a9ace34cb60d92e56fvboxsynctypedef std::map< RTCString, VBOXGUESTCTRL_BUFFER_VALUE > GuestBufferMap;
154ed29e9462101350c438a9ace34cb60d92e56fvboxsynctypedef std::map< RTCString, VBOXGUESTCTRL_BUFFER_VALUE >::iterator GuestBufferMapIter;
154ed29e9462101350c438a9ace34cb60d92e56fvboxsynctypedef std::map< RTCString, VBOXGUESTCTRL_BUFFER_VALUE >::const_iterator GuestBufferMapIterConst;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsyncchar pszUnterm1[] = { 'a', 's', 'd', 'f' };
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsyncchar pszUnterm2[] = { 'f', 'o', 'o', '3', '=', 'b', 'a', 'r', '3' };
154ed29e9462101350c438a9ace34cb60d92e56fvboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsyncstatic struct
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync{
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync const char *pbData;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync size_t cbData;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync uint32_t uOffsetStart;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync uint32_t uOffsetAfter;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync uint32_t uMapElements;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync int iResult;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync} aTests[] =
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync{
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync /* Invalid stuff. */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { NULL, 0, 0, 0, 0, VERR_INVALID_POINTER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { NULL, 512, 0, 0, 0, VERR_INVALID_POINTER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "", 0, 0, 0, 0, VERR_INVALID_PARAMETER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "", 0, 0, 0, 0, VERR_INVALID_PARAMETER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "foo=bar1", 0, 0, 0, 0, VERR_INVALID_PARAMETER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "foo=bar2", 0, 50, 50, 0, VERR_INVALID_PARAMETER },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Incomplete buffer (missing \0 termination). */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "", 1, 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "\0", 1, 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { pszUnterm1, 5, 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "foo1", sizeof("foo1"), 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { pszUnterm2, 8, 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Incomplete buffer (missing components). */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "=bar\0", sizeof("=bar"), 0, 0, 0, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Last sequence is incomplete -- new offset should point to it. */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "hug=sub\0incomplete", sizeof("hug=sub\0incomplete"), 0, sizeof("hug=sub"), 1, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "boo=hoo\0baz=boo\0qwer", sizeof("boo=hoo\0baz=boo\0qwer"), 0, sizeof("boo=hoo\0baz=boo"), 2, VERR_MORE_DATA },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Parsing good stuff. */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "foo2=", sizeof("foo2="), 0, sizeof("foo2="), 1, VINF_SUCCESS },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "har=hor", sizeof("har=hor"), 0, sizeof("har=hor"), 1, VINF_SUCCESS },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "foo=bar\0baz=boo", sizeof("foo=bar\0baz=boo"), 0, sizeof("foo=bar\0baz=boo"), 2, VINF_SUCCESS },
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Parsing until a different block (two terminations, returning offset to next block). */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync { "off=rab\0\0zab=oob", sizeof("off=rab\0\0zab=oob"), 0, sizeof("zab=oob"), 1, VERR_MORE_DATA }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync};
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsyncint outputBufferParse(const BYTE *pbData, size_t cbData, uint32_t *puOffset, GuestBufferMap& mapBuf)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync{
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync AssertPtrReturn(pbData, VERR_INVALID_POINTER);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync AssertReturn(cbData, VERR_INVALID_PARAMETER);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync AssertPtrReturn(puOffset, VERR_INVALID_POINTER);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync AssertReturn(*puOffset < cbData, VERR_INVALID_PARAMETER);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync int rc = VINF_SUCCESS;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync size_t uCur = *puOffset;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync for (;uCur < cbData;)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync const char *pszStart = (char*)&pbData[uCur];
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync const char *pszEnd = pszStart;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync /* Search and of current pair (key=value\0). */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync while (uCur++ < cbData)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync if (*pszEnd == '\0')
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync break;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync pszEnd++;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync size_t uPairLen = pszEnd - pszStart;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync if ( *pszEnd != '\0'
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync || !uPairLen)
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync rc = VERR_MORE_DATA;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync break;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync const char *pszSep = pszStart;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync while ( *pszSep != '='
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync && pszSep != pszEnd)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync pszSep++;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if ( pszSep == pszStart
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync || pszSep == pszEnd)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync rc = VERR_MORE_DATA;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync break;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync size_t uKeyLen = pszSep - pszStart;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync size_t uValLen = pszEnd - (pszSep + 1);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Get key (if present). */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (uKeyLen)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync Assert(pszSep > pszStart);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync char *pszKey = (char*)RTMemAllocZ(uKeyLen + 1);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (!pszKey)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync rc = VERR_NO_MEMORY;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync break;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync memcpy(pszKey, pszStart, uKeyLen);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
154ed29e9462101350c438a9ace34cb60d92e56fvboxsync mapBuf[RTCString(pszKey)].pszValue = NULL;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* Get value (if present). */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (uValLen)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync Assert(pszEnd > pszSep);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync char *pszVal = (char*)RTMemAllocZ(uValLen + 1);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (!pszVal)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync rc = VERR_NO_MEMORY;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync break;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync memcpy(pszVal, pszSep + 1, uValLen);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
154ed29e9462101350c438a9ace34cb60d92e56fvboxsync mapBuf[RTCString(pszKey)].pszValue = pszVal;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync RTMemFree(pszKey);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync *puOffset += uCur - *puOffset;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync return rc;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync}
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsyncint main()
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync{
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync RTTEST hTest;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync int rc = RTTestInitAndCreate("tstParseBuffer", &hTest);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (rc)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync return rc;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync RTTestBanner(hTest);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync if (sizeof("sizecheck") != 10)
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestFailed(hTest, "Basic size test failed (%u <-> 10)", sizeof("sizecheck"));
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync for (unsigned iTest = 0; iTest < RT_ELEMENTS(aTests); iTest++)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync GuestBufferMap bufMap;
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync int iResult = outputBufferParse((BYTE*)aTests[iTest].pbData, aTests[iTest].cbData,
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync &aTests[iTest].uOffsetStart, bufMap);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestIPrintf(RTTESTLVL_DEBUG, "=> Test #%u\n", iTest);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (iResult != aTests[iTest].iResult)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestFailed(hTest, "\tReturned %Rrc, expected %Rrc",
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync iResult, aTests[iTest].iResult);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync }
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync else if (bufMap.size() != aTests[iTest].uMapElements)
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestFailed(hTest, "\tMap has %u elements, expected %u",
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync bufMap.size(), aTests[iTest].uMapElements);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync }
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync else if (aTests[iTest].uOffsetStart != aTests[iTest].uOffsetAfter)
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestFailed(hTest, "\tOffset %u wrong, expected %u",
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync aTests[iTest].uOffsetStart, aTests[iTest].uOffsetAfter);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync else if (iResult == VERR_MORE_DATA)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync /* There is remaining data left in the buffer (which needs to be merged
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync * with a following buffer) -- print it. */
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync const char *pszRemaining = aTests[iTest].pbData;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync size_t uOffsetNew = aTests[iTest].uOffsetStart;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync size_t uToWrite = aTests[iTest].cbData - uOffsetNew;
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync if (pszRemaining && uOffsetNew)
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync {
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestIPrintf(RTTESTLVL_DEBUG, "\tRemaining (%u):\n", uToWrite);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTStrmWriteEx(g_pStdOut, &aTests[iTest].pbData[uOffsetNew], uToWrite - 1, NULL);
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync RTTestIPrintf(RTTESTLVL_DEBUG, "\n");
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
bc626ccdbb077b0b1c82484b5d1ef12002b02b46vboxsync for (GuestBufferMapIter it = bufMap.begin(); it != bufMap.end(); it++)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync {
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync RTTestIPrintf(RTTESTLVL_DEBUG, "\t%s -> %s\n",
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync it->first.c_str(), it->second.pszValue ? it->second.pszValue : "<undefined>");
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync if (it->second.pszValue)
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync RTMemFree(it->second.pszValue);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync }
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync /*
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync * Summary.
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync */
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync return RTTestSummaryAndDestroy(hTest);
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync}
84d86b6582f583d8f79920843e87d0589816fcd3vboxsync