Enable app verifier on VSTS; Fix debug log handle use (#1291)

This commit is contained in:
Justin Kotalik 2018-08-22 15:39:59 -07:00 committed by GitHub
parent eebbb6a602
commit 3b3f128306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View File

@ -14,7 +14,6 @@
#include "atlbase.h"
#include "config_utility.h"
inline HANDLE g_hStandardOutput = INVALID_HANDLE_VALUE;
inline HANDLE g_logFile = INVALID_HANDLE_VALUE;
inline HMODULE g_hModule;
inline SRWLOCK g_logFileLock;
@ -149,7 +148,6 @@ VOID
DebugInitialize(HMODULE hModule)
{
g_hModule = hModule;
g_hStandardOutput = GetStdHandle(STD_OUTPUT_HANDLE);
HKEY hKey;
InitializeSRWLock(&g_logFileLock);
@ -290,10 +288,10 @@ DebugPrint(
OutputDebugStringA( strOutput.QueryStr() );
DWORD nBytesWritten = 0;
if (IsEnabled(ASPNETCORE_DEBUG_FLAG_CONSOLE))
{
WriteFile(g_hStandardOutput, strOutput.QueryStr(), strOutput.QueryCB(), &nBytesWritten, nullptr);
auto outputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
WriteFile(outputHandle, strOutput.QueryStr(), strOutput.QueryCB(), &nBytesWritten, nullptr);
}
if (g_logFile != INVALID_HANDLE_VALUE)

View File

@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
DeletePublishOutput(deploymentResult);
}
[ConditionalFact]
[ConditionalFact(Skip = "https://github.com/aspnet/IISIntegration/issues/933")]
public async Task AppOfflineDroppedWhileSiteFailedToStartInRequestHandler_SiteStops_InProcess()
{
var deploymentResult = await DeployApp(HostingModel.InProcess);

View File

@ -3,7 +3,7 @@ param($Mode)
function Setup-appverif($application)
{
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
$onlyLog = 0x181;
$onlyLog = 0x1E1;
$codes = @(
# Exceptions
0x650,
@ -62,8 +62,8 @@ if (!(Test-Path $cdb))
if ($Mode -eq "Setup")
{
#Setup-appverif w3wp.exe
#Setup-appverif iisexpress.exe
Setup-appverif w3wp.exe
Setup-appverif iisexpress.exe
if (!(Test-Path $ldHive ))
{
@ -81,14 +81,15 @@ if ($Mode -eq "Shutdown")
{
Remove-Item $ldHive -Recurse -Force
#Shutdown-appverif w3wp.exe
#Shutdown-appverif iisexpress.exe
Shutdown-appverif w3wp.exe
Shutdown-appverif iisexpress.exe
foreach ($dump in (Get-ChildItem -Path $DumpFolder -Filter "*.dmp"))
{
if (Test-Path $cdb)
{
& $cdb -z $dump.FullName -y "https://msdl.microsoft.com/download/symbols" -c ".loadby sos coreclr;!sym noisy;.reload /f;.dumpcab -a $($dump.FullName).cab;q;"
Remove-Item $dump.FullName
}
}
}