VirtualBox

Ignore:
Timestamp:
Mar 27, 2019 11:51:12 PM (6 years ago)
Author:
vboxsync
Message:

FsPerf: Enabled sendfile test on darwin. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp

    r77926 r77927  
    6666# include <errno.h>
    6767# include <unistd.h>
     68# include <limits.h>
    6869# include <sys/types.h>
    6970# include <sys/fcntl.h>
     
    7879#  include <sys/syscall.h>
    7980# endif
     81# ifdef RT_OS_DARWIN
     82#  include <sys/uio.h>
     83# endif
    8084#endif
    8185
     
    8488*   Defined Constants And Macros                                                                                                 *
    8589*********************************************************************************************************************************/
     90/** @def FSPERF_TEST_SENDFILE
     91 * Whether to enable the sendfile() tests. */
     92#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     93# define FSPERF_TEST_SENDFILE
     94#endif
     95
    8696/**
    8797 * Macro for profiling @a a_fnCall (typically forced inline) for about @a a_cNsTarget ns.
     
    19331943}
    19341944
    1935 #if defined(RT_OS_LINUX)
     1945#ifdef FSPERF_TEST_SENDFILE
    19361946
    19371947/**
     
    20402050        off_t cbActual = pArgs->cbSend;
    20412051        rc = sendfile((int)RTFileToNative(hFile1), (int)RTSocketToNative(hServer),
     2052#  ifdef RT_OS_DARWIN
     2053                      pArgs->offFile, &cbActual, NULL, fSfFlags);
     2054#  else
    20422055                      pArgs->offFile, cbActual, NULL,  &cbActual, fSfFlags);
     2056#  endif
    20432057        int const iErr = errno;
    20442058        if (rc != 0)
     
    21572171}
    21582172
    2159 #endif /* RT_OS_LINUX */
     2173#endif /* FSPERF_TEST_SENDFILE */
    21602174#ifdef RT_OS_LINUX
    21612175
     
    39003914            for (unsigned i = 0; i < g_cIoBlocks; i++)
    39013915                fsPerfIoReadBlockSize(hFile1, cbFile, g_acbIoBlocks[i]);
    3902 #if defined(RT_OS_LINUX)
     3916#ifdef FSPERF_TEST_SENDFILE
    39033917        if (g_fSendFile)
    39043918            fsPerfSendFile(hFile1, cbFile);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette