WSL/test/windows/lxsstest.h
WSL Team 697572d664 Initial open source commit for WSL.
Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016.

The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021:

Number of commits on the main branch: 2930
Number of contributors: 31

Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.
2025-05-15 12:09:45 -07:00

54 lines
1.2 KiB
C

/*++
Copyright (c) Microsoft. All rights reserved.
Module Name:
lxsstest.h
Abstract:
Common definitions for lxss tests.
--*/
#pragma once
#define STR2WSTR_INNER(str) L##str
#define STR2WSTR(str) STR2WSTR_INNER(str)
//
// Logging macros
//
#define LogError(str, ...) \
{ \
WEX::Logging::Log::Error(WEX::Common::String().Format(STR2WSTR(str), __VA_ARGS__)); \
}
#define LogInfo(str, ...) \
{ \
WEX::Logging::Log::Comment(WEX::Common::String().Format(STR2WSTR(str), __VA_ARGS__)); \
}
#define LogWarning(str, ...) \
{ \
WEX::Logging::Log::Warning(WEX::Common::String().Format(STR2WSTR(str), __VA_ARGS__)); \
}
#define LogPass(str, ...) \
{ \
WEX::Logging::Log::Result(WEX::Logging::TestResults::Passed, WEX::Common::String().Format(STR2WSTR(str), __VA_ARGS__)); \
}
#define LogSkipped(str, ...) \
{ \
WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, WEX::Common::String().Format(STR2WSTR(str), __VA_ARGS__)); \
}
//
// Helper macros
//
#define ALLOC(_size) HeapAlloc(GetProcessHeap(), 0, (_size))
#define FREE(_ptr) WI_VERIFY(HeapFree(GetProcessHeap(), 0, (_ptr)) != FALSE)