Integrate clog in a no-op way, in order to prepare for taking the tool in the near future (#569)

This commit is contained in:
chgray 2020-07-01 12:56:42 -07:00 коммит произвёл GitHub
Родитель 247dbe97b3
Коммит af64e17763
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
121 изменённых файлов: 770 добавлений и 22 удалений

Просмотреть файл

@ -17,6 +17,12 @@ jobs:
- checkout: self
submodules: recursive
- task: ShellScript@2
displayName: Install Powershell
condition: eq('${{ parameters.platform }}', 'linux')
inputs:
scriptPath: scripts/install-powershell.sh
- task: PowerShell@2
displayName: Prepare Build Machine
inputs:

Просмотреть файл

@ -13,6 +13,13 @@ steps:
itemPattern: drop/${{ parameters.platform }}/${{ parameters.arch }}_*_${{ parameters.tls }}/**
downloadPath: $(Build.TempDirectory)
- task: DownloadBuildArtifacts@0
displayName: Download CLOG Artifacts
inputs:
artifactName: drop
itemPattern: drop/clog/**
downloadPath: $(Build.TempDirectory)
- task: CopyFiles@2
displayName: Move Build Artifacts
inputs:

3
.gitmodules поставляемый
Просмотреть файл

@ -12,3 +12,6 @@
[submodule "submodules/wil"]
path = submodules/wil
url = https://github.com/microsoft/wil
[submodule "submodules/clog"]
path = submodules/clog
url = https://github.com/microsoft/CLOG.git

Просмотреть файл

@ -118,6 +118,19 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${QUIC_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
set(CMAKE_CLOG_OUTPUT_DIRECTORY ${QUIC_BUILD_DIR}/inc)
set(CMAKE_CLOG_BINS_DIRECTORY ${QUIC_BUILD_DIR}/submodules/clog)
set(CMAKE_CLOG_SIDECAR_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/manifest)
set(CLOG_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/clog)
set(CLOG_INCLUDE_DIRECTORY ${CLOG_SOURCE_DIRECTORY}/inc)
set(CMAKE_CLOG_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/manifest/msquic.clog_config)
set(MANIFESTED_HEADER_FILENAME ${QUIC_BUILD_DIR}/inc/MsQuicEtw.h)
add_custom_target(CLOG_GENERATED_FILES
COMMENT "CREATED CMAKE Target for CLOG generated files"
)
set(CLANG_GCC_WARNING_FLAGS -Werror -Wall -Wextra -Wformat=2 -Wno-type-limits -Wno-unknown-pragmas -Wno-unused-value CACHE INTERNAL "")
set(MSVC_WARNING_FLAGS /WX /W4 /sdl CACHE INTERNAL "")
@ -145,10 +158,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()
if(QUIC_ENABLE_LOGGING)
message(STATUS "Configuring for manifested ETW events and logging")
message(STATUS "Configuring for manifested ETW tracing")
set(CMAKE_CLOG_CONFIG_PROFILE windows)
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_MANIFEST_ETW -DQUIC_LOGS_MANIFEST_ETW")
else()
message(STATUS "Disabling events and logging")
message(STATUS "Disabling tracing")
set(CMAKE_CLOG_CONFIG_PROFILE stubs)
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB")
endif()
@ -217,11 +232,13 @@ else()
endif()
if(QUIC_ENABLE_LOGGING)
message(STATUS "Configuring for LTTng tracing")
set(CMAKE_CLOG_CONFIG_PROFILE linux)
include(FindLTTngUST)
message(STATUS "Configuring for LTTng events and disabling logging")
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_LTTNG -DQUIC_LOGS_STUB")
else()
message(STATUS "Disabling events and logging")
message(STATUS "Disabling tracing")
set(CMAKE_CLOG_CONFIG_PROFILE stubs)
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB")
list(APPEND CLANG_GCC_WARNING_FLAGS -Wno-unused-parameter -Wno-unused-variable)
endif()
@ -248,7 +265,10 @@ else()
set(QUIC_CXX_FLAGS "${QUIC_COMMON_FLAGS} -std=c++17 -g -Wno-reorder -Wno-sign-compare -Wno-format")
endif()
include_directories(${QUIC_BUILD_DIR}/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/inc)
include_directories(${CLOG_INCLUDE_DIRECTORY})
include_directories(${CMAKE_CLOG_OUTPUT_DIRECTORY})
if(QUIC_TLS STREQUAL "openssl")
# Configure and build OpenSSL.

Просмотреть файл

@ -16,6 +16,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msquic.kernel", "src\bin\wi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msquictest.kernel", "src\test\bin\winkernel\msquictest.kernel.vcxproj", "{49E98DF4-7BC5-4E0B-8F13-295380652F94}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "manifest.kernel", "src\manifest\manifest.kernel.vcxproj", "{C1ADB76F-7005-4516-BADB-2A60797EF912}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@ -148,6 +150,30 @@ Global
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.ActiveCfg = Release|Win32
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.Build.0 = Release|Win32
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.Deploy.0 = Release|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.ActiveCfg = Debug|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.Build.0 = Debug|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.Deploy.0 = Debug|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.ActiveCfg = Debug|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.Build.0 = Debug|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.Deploy.0 = Debug|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.ActiveCfg = Debug|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.Build.0 = Debug|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.Deploy.0 = Debug|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.ActiveCfg = Debug|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.Build.0 = Debug|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.Deploy.0 = Debug|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.ActiveCfg = Release|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.Build.0 = Release|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.Deploy.0 = Release|ARM
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.ActiveCfg = Release|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.Build.0 = Release|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.Deploy.0 = Release|ARM64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.ActiveCfg = Release|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.Build.0 = Release|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.Deploy.0 = Release|x64
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.ActiveCfg = Release|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.Build.0 = Release|Win32
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -234,6 +234,12 @@ function CMake-Build {
CMake-Execute $Arguments
# Copy clog to a common location.
$ClogPath = $ArtifactsDir = Join-Path $BaseArtifactsDir "clog"
if (!(Test-Path $ClogPath)) {
Copy-Item (Join-Path $BuildDir "submodules/clog") -Destination $ClogPath -Recurse
}
if ($IsWindows) {
Copy-Item (Join-Path $BuildDir "obj" $Config "msquic.lib") $ArtifactsDir
if (!$DisableTools) {
@ -265,6 +271,13 @@ function CMake-Build {
# Main Execution #
##############################################################
if (!$IsWindows) {
# Set Linux env variables to include dotnet.
$env:PATH+=":$HOME/.dotnet"
$env:PATH+=":$HOME/.dotnet/tools"
$env:DOTNET_ROOT="$HOME/.dotnet/"
}
# Generate the build files.
Log "Generating files..."
CMake-Generate

Просмотреть файл

@ -0,0 +1,46 @@
@echo off
set QUIC_BUILD_DIR=%1
set CMAKE_SOURCE_DIR=%2
set CMAKE_PROJECTDIR=%3
set SCOPE_PREFIX=%4
echo QUIC_BUILD_DIR=%QUIC_BUILD_DIR%
echo CMAKE_SOURCE_DIR=%CMAKE_SOURCE_DIR%
echo CMAKE_PROJECTDIR=%CMAKE_PROJECTDIR%
echo SCOPE_PREFIX=%SCOPE_PREFIX%
set CMAKE_CLOG_OUTPUT_DIRECTORY=%QUIC_BUILD_DIR%\inc
set CMAKE_CLOG_BINS_DIRECTORY=%QUIC_BUILD_DIR%\submodules\clog
set CMAKE_CLOG_SIDECAR_DIRECTORY=%CMAKE_SOURCE_DIR%\src\manifest
set CLOG_SOURCE_DIRECTORY=%CMAKE_SOURCE_DIR%\submodules\clog
set CLOG_INCLUDE_DIRECTORY=%CMAKE_SOURCE_DIR%\inc
set CMAKE_CLOG_CONFIG_FILE=%CMAKE_SOURCE_DIR%\src\manifest\msquic.clog_config
echo EnvVars] --------------------------------------------------------------
set
echo -----------------------------------------------------------------------
echo %CMAKE_SOURCE_DIR%
echo Clearing the LIB environment varaible to avoid conflicting with the needs of dotnet
set LIB=
if NOT EXIST %CMAKE_CLOG_BINS_DIRECTORY%\clog.exe (
echo Building CLOG
echo dotnet build %CLOG_SOURCE_DIRECTORY%\clog.sln\clog_coreclr.sln -o %CMAKE_CLOG_BINS_DIRECTORY%
dotnet build %CLOG_SOURCE_DIRECTORY%\clog.sln\clog_coreclr.sln -o %CMAKE_CLOG_BINS_DIRECTORY% > %CMAKE_CLOG_BINS_DIRECTORY%.kernel.build.log
)
pushd %CMAKE_PROJECTDIR%
echo CLOG Processing Directory %CMAKE_PROJECTDIR%
for %%i in (*.c* *.c operation.h stream.h connection.h TestHelpers.h) do (
echo CLOG Processing %%i
if EXIST %%i (
if NOT EXIST %CMAKE_CLOG_OUTPUT_DIRECTORY%\%%i.clog.h (
%CMAKE_CLOG_BINS_DIRECTORY%\clog.exe -p windows_kernel --scopePrefix %SCOPE_PREFIX% -c %CMAKE_CLOG_CONFIG_FILE% -s %CMAKE_CLOG_SIDECAR_DIRECTORY%\clog.sidecar -i %%i -o %CMAKE_CLOG_OUTPUT_DIRECTORY%\%%i.clog.h
echo %%i
)
)
)
popd

Просмотреть файл

@ -1,5 +1,13 @@
#!/bin/sh
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh -c Current
export PATH="$PATH:$HOME/.dotnet"
export PATH="$PATH:$HOME/.dotnet/tools"
export DOTNET_ROOT="$HOME/.dotnet/"
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update

Просмотреть файл

@ -19,7 +19,7 @@ target_compile_options(msquic PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:
${MSVC_WARNING_FLAGS}>)
target_link_libraries(msquic PRIVATE core platform)
target_link_libraries(msquic PRIVATE core platform PLATFORM_CLOG_LIB CORE_CLOG_LIB)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_link_libraries(msquic PUBLIC

Просмотреть файл

@ -11,6 +11,9 @@ Abstract:
#include "quic_platform.h"
#include "quic_trace.h"
#ifdef QUIC_CLOG
#include "driver.c.clog.h"
#endif
INITCODE
_IRQL_requires_max_(PASSIVE_LEVEL)

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "quic_platform.h"
#ifdef QUIC_CLOG
#include "quic_trace.h"
#endif
void
MsQuicLibraryLoad(

Просмотреть файл

@ -1,6 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
set(SOURCES
ack_tracker.c
api.c
@ -34,12 +37,18 @@ set(SOURCES
stream_set.c
timer_wheel.c
worker.c
operation.h
stream.h
connection.h
)
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(SOURCES ${SOURCES} inline.c)
endif()
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(CORE_CLOG_LIB ${SOURCES})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${QUIC_C_FLAGS}")
add_library(core STATIC ${SOURCES})

Просмотреть файл

@ -38,6 +38,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "ack_tracker.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "api.c.clog.h"
#endif
#define IS_SESSION_HANDLE(Handle) \
( \

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "binding.c.clog.h"
#endif
//
// Make sure we will always have enough room to fit our Version Negotiation packet,

Просмотреть файл

@ -19,6 +19,9 @@ Future work:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "congestion_control.c.clog.h"
#endif
//
// BETA and C from RFC8312. 10x multiples for integer arithmetic.

Просмотреть файл

@ -32,6 +32,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "connection.c.clog.h"
#endif
typedef struct QUIC_RECEIVE_PROCESSING_STATE {
BOOLEAN ResetIdleTimeout;

Просмотреть файл

@ -4,6 +4,9 @@
Licensed under the MIT License.
--*/
#ifdef QUIC_CLOG
#include "connection.h.clog.h"
#endif
typedef struct QUIC_LISTENER QUIC_LISTENER;

Просмотреть файл

@ -19,6 +19,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "crypto.c.clog.h"
#endif
QUIC_TLS_PROCESS_COMPLETE_CALLBACK QuicTlsProcessDataCompleteCallback;
QUIC_TLS_RECEIVE_TP_CALLBACK QuicConnReceiveTP;

Просмотреть файл

@ -13,6 +13,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "crypto_tls.c.clog.h"
#endif
#define TLS1_PROTOCOL_VERSION 0x0301
#define TLS_MESSAGE_HEADER_LENGTH 4

Просмотреть файл

@ -10,9 +10,8 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_LOGS_WPP
#include "datagram.tmh"
#ifdef QUIC_CLOG
#include "datagram.c.clog.h"
#endif
#define DATAGRAM_FRAME_HEADER_LENGTH 3

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "frame.c.clog.h"
#endif
_Post_equal_to_(Buffer + sizeof(uint8_t))
uint8_t*

Просмотреть файл

@ -15,6 +15,9 @@ Abstract:
#include "precomp.h"
#include <msquic_fuzz.h>
#ifdef QUIC_CLOG
#include "injection.c.clog.h"
#endif
__declspec(noinline)
void

Просмотреть файл

@ -16,6 +16,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "inline.c.clog.h"
#endif
QUIC_CID_QUIC_LIST_ENTRY*
QuicCidNewDestination(

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "library.c.clog.h"
#endif
QUIC_LIBRARY MsQuicLib = { 0 };

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "listener.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "lookup.c.clog.h"
#endif
typedef struct QUIC_CACHEALIGN QUIC_PARTITIONED_HASHTABLE {

Просмотреть файл

@ -44,6 +44,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "loss_detection.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
BOOLEAN

Просмотреть файл

@ -23,6 +23,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "operation.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
void

Просмотреть файл

@ -5,6 +5,10 @@
--*/
#ifdef QUIC_CLOG
#include "operation.h.clog.h"
#endif
typedef struct QUIC_SEND_REQUEST QUIC_SEND_REQUEST;
//

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "packet.c.clog.h"
#endif
//
// The list of supported QUIC version numbers and associated salts/secrets.

Просмотреть файл

@ -13,6 +13,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "packet_builder.c.clog.h"
#endif
#ifdef QUIC_FUZZER

Просмотреть файл

@ -11,6 +11,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "packet_space.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -14,6 +14,9 @@ TODO:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "path.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
void

Просмотреть файл

@ -11,6 +11,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "range.c.clog.h"
#endif
#define INITIAL_SUBRANGE_COUNT 8

Просмотреть файл

@ -43,6 +43,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "recv_buffer.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -20,6 +20,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "registration.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -21,6 +21,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "send.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
void

Просмотреть файл

@ -55,6 +55,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "send_buffer.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
void

Просмотреть файл

@ -17,6 +17,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "sent_packet_metadata.c.clog.h"
#endif
void
QuicSentPacketMetadataReleaseFrames(

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "session.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "settings.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
void

Просмотреть файл

@ -11,6 +11,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "stream.c.clog.h"
#endif
_IRQL_requires_max_(DISPATCH_LEVEL)
QUIC_STATUS

Просмотреть файл

@ -5,6 +5,10 @@
--*/
#ifdef QUIC_CLOG
#include "stream.h.clog.h"
#endif
typedef struct QUIC_CONNECTION QUIC_CONNECTION;
//

Просмотреть файл

@ -11,6 +11,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "stream_recv.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
BOOLEAN

Просмотреть файл

@ -34,6 +34,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "stream_send.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
void

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "stream_set.c.clog.h"
#endif
#if DEBUG
_IRQL_requires_max_(DISPATCH_LEVEL)

Просмотреть файл

@ -46,6 +46,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "timer_wheel.c.clog.h"
#endif
//
// The initial count of slots in the timer wheel.

Просмотреть файл

@ -1,6 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
include_directories(${PROJECT_SOURCE_DIR}/src/core)
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
@ -16,10 +19,13 @@ set(SOURCES
VarIntTest.cpp
)
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(MSQUIC_CORETEST ${SOURCES})
add_executable(msquiccoretest ${SOURCES})
set_property(TARGET msquiccoretest PROPERTY FOLDER "tests")
target_link_libraries(msquiccoretest msquic core platform gtest)
target_link_libraries(msquiccoretest msquic core platform gtest PLATFORM_CLOG_LIB CORE_CLOG_LIB MSQUIC_CORETEST)
add_test(msquiccoretest msquiccoretest)

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "FrameTest.cpp.clog.h"
#endif
struct AckFrameTest : ::testing::TestWithParam<QUIC_FRAME_TYPE> {
};

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "PacketNumberTest.cpp.clog.h"
#endif
struct DecompressEntry {
uint64_t HighestReceived;

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "RangeTest.cpp.clog.h"
#endif
struct SmartRange {
QUIC_RANGE range;

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "SpinFrame.cpp.clog.h"
#endif
union QuicV1Frames {
QUIC_ACK_EX AckFrame;

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "TransportParamTest.cpp.clog.h"
#endif
static QUIC_CONNECTION JunkConnection;

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "VarIntTest.cpp.clog.h"
#endif
uint64_t Encode(uint64_t Value)
{

Просмотреть файл

@ -6,6 +6,9 @@
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "main.cpp.clog.h"
#endif
class QuicCoreTestEnvironment : public ::testing::Environment {
public:

Просмотреть файл

@ -20,6 +20,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "worker.c.clog.h"
#endif
//
// Thread callback for processing the work queued for the worker.

Просмотреть файл

@ -0,0 +1,35 @@
#include <evntprov.h>
#ifdef __cplusplus
extern "C"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
_IRQL_requires_same_
void
NTAPI
QuicEtwCallback(
_In_ LPCGUID SourceId,
_In_ ULONG ControlCode,
_In_ UCHAR Level,
_In_ ULONGLONG MatchAnyKeyword,
_In_ ULONGLONG MatchAllKeyword,
_In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData,
_Inout_opt_ PVOID CallbackContext
);
//
// Defining MCGEN_PRIVATE_ENABLE_CALLBACK_V2, makes McGenControlCallbackV2
// call our user-defined callback routine. See MsQuicEvents.h.
//
#define MCGEN_PRIVATE_ENABLE_CALLBACK_V2 QuicEtwCallback
#pragma warning(push) // Don't care about warnings from generated files
#pragma warning(disable:6001)
#pragma warning(disable:26451)
#include "MsQuicEtw.h"
#pragma warning(pop)
#define QuicTraceEventEnabled(Name) TRUE //EventEnabledQuic##Name()
#define LOG_ADDR_LEN(Addr) \
(uint8_t)((Addr).si_family == AF_INET6 ? sizeof(SOCKADDR_IN6) : sizeof(SOCKADDR_IN))

Просмотреть файл

@ -0,0 +1,13 @@
set SOLUTION_DIR=%1
set PLATFORM_ARG=%2
set CONFIGURATION_ARG=%3
set QUIC_BUILD_DIR=%SOLUTION_DIR%\build\winkernel\%PLATFORM_ARG%_%CONFIGURATION_ARG%_schannel
mkdir %QUIC_BUILD_DIR%\inc
mc.exe -um -h %QUIC_BUILD_DIR%\inc -r %QUIC_BUILD_DIR%\inc %SOLUTION_DIR%\src\manifest\MsQuicEtw.man
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\core CORE
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\platform PLATFORM
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\bin\winkernel BIN
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\test\bin\winkernel TEST_BIN
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\test\lib TEST_LIB

Просмотреть файл

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{c1adb76f-7005-4516-badb-2a60797ef912}</ProjectGuid>
<TemplateGuid>{0a049372-4c4d-4ea0-a64e-dc6ad88ceca1}</TemplateGuid>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<DriverType>KMDF</DriverType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup>
<TargetName>core</TargetName>
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\lib\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;..\..\submodules\clog\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<PreBuildEvent>
<Command>cmd /C $(SolutionDir)\src\manifest\create_kernel_clog_dependencies.bat $(SolutionDir) $(Platform) $(Configuration)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PreprocessorDefinitions>QUIC_EVENTS_MANIFEST_ETW;SECURITY_KERNEL;SECURITY_WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>QUIC_EVENTS_MANIFEST_ETW;SECURITY_KERNEL;SECURITY_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

Просмотреть файл

@ -0,0 +1,80 @@
/*++
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
--*/
using System;
using System.Runtime.InteropServices;
namespace msquic.clog_config
{
public class Types
{
[StructLayout(LayoutKind.Explicit)]
public struct SocketAddress
{
[FieldOffset(0)]
public ushort si_family;
[FieldOffset(2)]
public ushort sin_port;
// IPv4
[FieldOffset(4)]
public ulong S_addr;
// IPv6
[FieldOffset(4)]
public ulong sin6_flowinfo;
[FieldOffset(8)]
public ulong S_v6Addr1;
[FieldOffset(16)]
public ulong S_v6Addr2;
};
public static string QUIC_FLAGS(uint value)
{
return "QUIC_FLAGS (good!) " + value;
}
public static string QUIC_IP_ADDR(byte[] value)
{
int len = value.Length;
IntPtr i = System.Runtime.InteropServices.Marshal.AllocHGlobal(len);
System.Runtime.InteropServices.Marshal.Copy(value, 0, i, len);
string msg = "";
SocketAddress sa2 = (SocketAddress)System.Runtime.InteropServices.Marshal.PtrToStructure(i, typeof(SocketAddress));
switch (sa2.si_family)
{
case 0: //<--unspecified
msg += "Unspecified";
break;
case 23: //<--v6
msg += "IPV6: sin6_flowinfo=" + sa2.sin6_flowinfo + " port=" + sa2.sin_port + "part1=" + sa2.S_v6Addr1 + ", part2=" + sa2.S_v6Addr2;
break;
case 10: //<--v6 (linux)
msg += "IPV6: sin6_flowinfo=" + sa2.sin6_flowinfo + " port=" + sa2.sin_port + "part1=" + sa2.S_v6Addr1 + ", part2=" + sa2.S_v6Addr2;
break;
case 2: //< --v4
msg += "IPV4:" + sa2.S_addr + ":" + sa2.sin_port;
break;
default:
throw new Exception("Invalid SI_FAMILY : " + sa2.si_family);
}
System.Runtime.InteropServices.Marshal.FreeHGlobal(i);
return msg;
}
public static string DecodeCID(byte [] value)
{
return "CID!";
}
}
}

Просмотреть файл

@ -0,0 +1,82 @@
{
"MacroConfigurations": {
"lttng_plus": {
"Modules": [
{
"ExportModule": "LTTNG",
"CustomSettings": {}
}
]
},
"empty": {
"Modules": []
},
"etw_only": {
"Modules": [
{
"ExportModule": "MANIFESTED_ETW",
"CustomSettings": {
"ETWManifestFile": "MsQuicEtw.man",
"ETW_Provider": "ff15e657-4f26-570e-88ab-0796b258d11c",
"Level": "win:Informational",
"Keywords": "ut:Connection ut:LowVolume"
}
}
]
},
"etw_plus": {
"Modules": [
{
"ExportModule": "MANIFESTED_ETW",
"CustomSettings": {
"ETWManifestFile": "MsQuicEtw.man",
"ETW_Provider": "ff15e657-4f26-570e-88ab-0796b258d11c",
"Level": "win:Informational",
"Keywords": "ut:Connection ut:LowVolume"
}
}
]
}
},
"Version": 1,
"CustomTypeClogCSharpFile": "msquic.clog.cs",
"TypeEncoders": {
"Version": 0,
"TypeEncoder": [
{
"EncodingType": "ByteArray",
"CType": "CLOG_PTR",
"DefinationEncoding": "!SOCKADDR!",
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
},
{
"EncodingType": "ByteArray",
"CType": "CLOG_PTR",
"DefinationEncoding": "!IPV4ADDR!",
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
},
{
"EncodingType": "ByteArray",
"CType": "CLOG_PTR",
"DefinationEncoding": "!IPV6ADDR!",
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
},
{
"EncodingType": "ByteArray",
"CType": "CLOG_PTR",
"DefinationEncoding": "!CID!",
"CustomDecoder": "msquic.clog_config.Types.DecodeCID"
},
{
"EncodingType": "UInt32",
"CType": "CLOG_UINT32",
"DefinationEncoding": "03u"
}
]
},
"SourceCodeMacros": [
],
"ChainedConfigFiles": [
"../../submodules/clog/inc/defaults.clog_config"
]
}

Просмотреть файл

@ -1,6 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(SOURCES
datapath_winuser.c
@ -49,6 +52,9 @@ endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${QUIC_C_FLAGS}")
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(PLATFORM_CLOG_LIB ${SOURCES})
add_library(platform STATIC ${SOURCES})
set_property(TARGET platform PROPERTY FOLDER "libraries")

Просмотреть файл

@ -15,6 +15,9 @@ Environment:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "cert_capi.c.clog.h"
#endif
#include <wincrypt.h>
#include <msquic.h>

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "cert_openssl.c.clog.h"
#endif
#include <mitlsffi.h>
#include <mipki.h>

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "cert_stub.c.clog.h"
#endif
QUIC_STATUS
QuicCertCreate(

Просмотреть файл

@ -21,6 +21,9 @@ Environment:
#include <linux/in6.h>
#include <arpa/inet.h>
#include "quic_platform_dispatch.h"
#ifdef QUIC_CLOG
#include "datapath_linux.c.clog.h"
#endif
QUIC_STATIC_ASSERT((SIZEOF_STRUCT_MEMBER(QUIC_BUFFER, Length) <= sizeof(size_t)), "(sizeof(QUIC_BUFFER.Length) == sizeof(size_t) must be TRUE.");
QUIC_STATIC_ASSERT((SIZEOF_STRUCT_MEMBER(QUIC_BUFFER, Buffer) == sizeof(void*)), "(sizeof(QUIC_BUFFER.Buffer) == sizeof(void*) must be TRUE.");

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "datapath_winkernel.c.clog.h"
#endif
//
// Not yet available in the WDK. When available this code can be removed.

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "datapath_winuser.c.clog.h"
#endif
#ifdef QUIC_FUZZER

Просмотреть файл

@ -43,6 +43,9 @@ Notes:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "hashtable.c.clog.h"
#endif
#define QUIC_HASH_RESERVED_SIGNATURE 0

Просмотреть файл

@ -16,6 +16,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "inline.c.clog.h"
#endif
uint16_t
MaxUdpPayloadSizeFromMTU(

Просмотреть файл

@ -23,6 +23,9 @@ Environment:
#include <syslog.h>
#include "quic_trace.h"
#include "quic_platform_dispatch.h"
#ifdef QUIC_CLOG
#include "platform_linux.c.clog.h"
#endif
#define QUIC_MAX_LOG_MSG_LEN 1024 // Bytes

Просмотреть файл

@ -14,6 +14,9 @@ Environment:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "platform_winkernel.c.clog.h"
#endif
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemBasicInformation = 0

Просмотреть файл

@ -14,6 +14,9 @@ Environment:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "platform_winuser.c.clog.h"
#endif
uint64_t QuicPlatformPerfFreq;
uint64_t QuicTotalMemory;

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
#define QUIC_TEST_APIS 1
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "selfsign_capi.c.clog.h"
#endif
#include <wincrypt.h>
#include <msquic.h>

Просмотреть файл

@ -18,6 +18,9 @@ Abstract:
#include "openssl/rsa.h"
#include "openssl/x509.h"
#include "openssl/pem.h"
#ifdef QUIC_CLOG
#include "selfsign_openssl.c.clog.h"
#endif
//
// Generates a self signed cert using low level OpenSSL APIs.

Просмотреть файл

@ -12,6 +12,9 @@ Abstract:
#define QUIC_TEST_APIS 1
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "selfsign_stub.c.clog.h"
#endif
_IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_SEC_CONFIG_PARAMS*

Просмотреть файл

@ -15,6 +15,9 @@ Environment:
#define _GNU_SOURCE
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "storage_linux.c.clog.h"
#endif
QUIC_STATUS
QuicStorageOpen(

Просмотреть файл

@ -16,6 +16,9 @@ Environment:
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "storage_winkernel.c.clog.h"
#endif
//
// Copied from wdm.h

Просмотреть файл

@ -16,6 +16,9 @@ Environment:
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "storage_winuser.c.clog.h"
#endif
void
NTAPI

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "tls_mitls.c.clog.h"
#endif
#define IS_WINDOWS 1
#pragma warning(disable:4996) // Deprecated APIs

Просмотреть файл

@ -16,6 +16,9 @@ Abstract:
#include "openssl/rsa.h"
#include "openssl/x509.h"
#include "openssl/pem.h"
#ifdef QUIC_CLOG
#include "tls_openssl.c.clog.h"
#endif
uint16_t QuicTlsTPHeaderSize = 0;

Просмотреть файл

@ -15,6 +15,9 @@ Environment:
#include "platform_internal.h"
#include <security.h>
#ifdef QUIC_CLOG
#include "tls_schannel.c.clog.h"
#endif
#ifdef _KERNEL_MODE

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "tls_stub.c.clog.h"
#endif
uint16_t QuicTlsTPHeaderSize = 0;

Просмотреть файл

@ -47,6 +47,9 @@ Notes:
--*/
#include "platform_internal.h"
#ifdef QUIC_CLOG
#include "toeplitz.c.clog.h"
#endif
//
// Initializes the state required for a Toeplitz hash computation. We

Просмотреть файл

@ -1,6 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
include_directories(${PROJECT_SOURCE_DIR}/src/platform)
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
@ -14,6 +17,9 @@ set(SOURCES
TlsTest.cpp
)
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(MSQUIC_PLATFORMTEST ${SOURCES})
add_executable(msquicplatformtest ${SOURCES})
set_property(TARGET msquicplatformtest PROPERTY FOLDER "tests")
@ -33,6 +39,6 @@ elseif(QUIC_TLS STREQUAL "mitls")
target_link_libraries(msquicplatformtest kremlib evercrypt mitls quiccrypto ncrypt crypt32)
endif()
target_link_libraries(msquicplatformtest msquic platform gtest)
target_link_libraries(msquicplatformtest msquic platform gtest MSQUIC_PLATFORMTEST PLATFORM_CLOG_LIB CORE_CLOG_LIB)
add_test(msquicplatformtest msquicplatformtest)

Просмотреть файл

@ -10,6 +10,9 @@
#include "quic_tls.h"
#include "msquichelper.h"
#ifdef QUIC_CLOG
#include "CryptTest.cpp.clog.h"
#endif
#ifndef QUIC_TLS_STUB

Просмотреть файл

@ -13,6 +13,9 @@ Abstract:
#include "quic_datapath.h"
#include "msquic.h"
#ifdef QUIC_CLOG
#include "DataPathTest.cpp.clog.h"
#endif
const uint32_t ExpectedDataSize = 1 * 1024;
char* ExpectedData;

Просмотреть файл

@ -15,6 +15,9 @@
#include <logcontroller.h>
#include "quic_trace.h"
#ifdef QUIC_CLOG
#include "StorageTest.cpp.clog.h"
#endif
using namespace WEX::Common;

Просмотреть файл

@ -8,6 +8,9 @@
#include "main.h"
#include "msquic.h"
#include "quic_tls.h"
#ifdef QUIC_CLOG
#include "TlsTest.cpp.clog.h"
#endif
const uint32_t CertValidationIgnoreFlags =
QUIC_CERTIFICATE_FLAG_IGNORE_UNKNOWN_CA |

Просмотреть файл

@ -6,6 +6,9 @@
--*/
#include "main.h"
#ifdef QUIC_CLOG
#include "main.cpp.clog.h"
#endif
extern "C" _IRQL_requires_max_(PASSIVE_LEVEL) void QuicTraceRundown(void) { }

Просмотреть файл

@ -1,15 +1,26 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
include_directories(${PROJECT_SOURCE_DIR}/src/test)
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")
add_executable(msquictest quic_gtest.cpp)
set(SOURCES
quic_gtest.cpp
quic_gtest.h
)
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(MSQUICTEST_CLOG_LIB ${SOURCES})
add_executable(msquictest ${SOURCES})
set_property(TARGET msquictest PROPERTY FOLDER "tests")
target_link_libraries(msquictest msquic testlib platform gtest)
target_link_libraries(msquictest msquic testlib platform gtest PLATFORM_CLOG_LIB MSQUICTEST_CLOG_LIB)
add_test(msquictest msquictest)

Просмотреть файл

@ -6,6 +6,9 @@
--*/
#include "quic_gtest.h"
#ifdef QUIC_CLOG
#include "quic_gtest.cpp.clog.h"
#endif
bool TestingKernelMode = false;
const QUIC_API_TABLE* MsQuic;

Просмотреть файл

@ -14,6 +14,9 @@
#undef min // gtest headers conflict with previous definitions of min/max.
#undef max
#include "gtest/gtest.h"
#ifdef QUIC_CLOG
#include "quic_gtest.h.clog.h"
#endif
class WithBool : public testing::Test,
public testing::WithParamInterface<bool> {

Просмотреть файл

@ -13,6 +13,9 @@ Abstract:
#include <MsQuicTests.h>
#include "quic_trace.h"
#ifdef QUIC_CLOG
#include "control.cpp.clog.h"
#endif
const QUIC_API_TABLE* MsQuic;
HQUIC Registration;

Просмотреть файл

@ -13,6 +13,9 @@ Abstract:
#include <MsQuicTests.h>
#include "quic_trace.h"
#ifdef QUIC_CLOG
#include "driver.cpp.clog.h"
#endif
#define QUIC_TEST_TAG 'tsTQ' // QTst

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "ApiTest.cpp.clog.h"
#endif
#pragma warning(disable:6387) // '_Param_(1)' could be '0': this does not adhere to the specification for the function

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "BasicTest.cpp.clog.h"
#endif
_Function_class_(NEW_CONNECTION_CALLBACK)
static

Просмотреть файл

@ -1,6 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Include for CLOG processing
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
set(SOURCES
ApiTest.cpp
BasicTest.cpp
@ -13,12 +16,16 @@ set(SOURCES
TestConnection.cpp
TestListener.cpp
TestStream.cpp
TestHelpers.h
)
include_directories(${PROJECT_SOURCE_DIR}/src/test)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")
# Allow CLOG to preprocess all the source files.
CLOG_ADD_SOURCEFILE(TESTLIB_CLOG_LIB ${SOURCES})
add_library(testlib ${SOURCES})
set_property(TARGET testlib PROPERTY FOLDER "tests")

Просмотреть файл

@ -10,6 +10,9 @@ Abstract:
--*/
#include "precomp.h"
#ifdef QUIC_CLOG
#include "DataTest.cpp.clog.h"
#endif
struct ServerAcceptContext {
QUIC_EVENT NewConnectionReady;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше