From 1cf40caedce1fa89e07a830502b7f144a4b1dda5 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 17 Dec 2021 00:36:21 +0000 Subject: [PATCH 1/5] appveyor: gauntlet --- appveyor.yml | 30 ++++++++++++++++++++++-------- build/VStudio/build.common.props | 3 +++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b935b3e2..97b0f09d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,16 +3,28 @@ version: '{build}' environment: # Disable the winfsp-tests built-in exception filter to allow WER to collect dumps. WINFSP_TESTS_EXCEPTION_FILTER_DISABLE: 1 + matrix: - - CONFIGURATION: Debug + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + CONFIGURATION: Debug TESTING: Func - - CONFIGURATION: Release + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + CONFIGURATION: Release + TESTING: Func + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + CONFIGURATION: Release + TESTING: Func + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + CONFIGURATION: Release TESTING: Func #- CONFIGURATION: Release # TESTING: Avast #- CONFIGURATION: Release # TESTING: Perf +matrix: + fast_finish: true + init: #- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) @@ -20,10 +32,12 @@ install: # Hack to make WDK 1903 work on VS2015. # See https://github.com/appveyor-tests/WDK-10.0.14393.0/blob/31cf12217fe0c92b218c70d7027dfe145be4f4cb/appveyor.yml#L7 - ps: | - [xml]$targets = get-content "C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets" - $usingTask = $targets.ChildNodes[1].UsingTask | ? {$_.TaskName -eq "ValidateNTTargetVersion"} - $usingTask.AssemblyFile = '$(WDKContentRoot)build\bin\Microsoft.DriverKit.Build.Tasks.16.0.dll' - $targets.Save("C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets") + if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { + [xml]$targets = get-content "C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets" + $usingTask = $targets.ChildNodes[1].UsingTask | ? {$_.TaskName -eq "ValidateNTTargetVersion"} + $usingTask.AssemblyFile = '$(WDKContentRoot)build\bin\Microsoft.DriverKit.Build.Tasks.16.0.dll' + $targets.Save("C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets") + } # Submodules - git submodule update --init --recursive # Kernel and user mode dumps @@ -35,7 +49,7 @@ install: # Boot configuration - appveyor AddMessage "Change boot configuration and reboot" -Category Information - bcdedit /set testsigning on -- if %TESTING%==Func verifier /standard /driver winfsp-x64.sys +- if %TESTING%==Func verifier /standard /driver winfsp-x64.sys & exit 0 - ps: Restart-Computer -Force - ps: Start-Sleep -s 60 @@ -47,7 +61,7 @@ build_script: #- C:\cygwin\setup-x86.exe -qnNd -P cygport #- C:\cygwin\bin\bash --login -c "make -C '%CD%\opt\cygfuse' dist" # remove ARM64 project configurations to build in VS2015 -- tools\gensrc\remove-build-arm64.bat +- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" tools\gensrc\remove-build-arm64.bat # build winfsp - tools\build.bat %CONFIGURATION% diff --git a/build/VStudio/build.common.props b/build/VStudio/build.common.props index 1a54bd29..e49d538d 100644 --- a/build/VStudio/build.common.props +++ b/build/VStudio/build.common.props @@ -13,6 +13,9 @@ 4996 + + sha256 + From c8ff0d4c884ae9847b616b8accf1f936388bd5b2 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 17 Dec 2021 12:00:26 +0000 Subject: [PATCH 2/5] appveyor: gauntlet --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 97b0f09d..96f3d629 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,7 @@ install: $usingTask = $targets.ChildNodes[1].UsingTask | ? {$_.TaskName -eq "ValidateNTTargetVersion"} $usingTask.AssemblyFile = '$(WDKContentRoot)build\bin\Microsoft.DriverKit.Build.Tasks.16.0.dll' $targets.Save("C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets") + Add-AppveyorMessage "Hack to make WDK 1903 work on VS2015" } # Submodules - git submodule update --init --recursive From fbd7036efa068c5a4c34d20f803e83e024c8db69 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 17 Dec 2021 12:52:32 +0000 Subject: [PATCH 3/5] appveyor: gauntlet: VS2017 support --- appveyor.yml | 3 ++- tools/build.bat | 15 +++++++++------ tools/vcvarsall.bat | 10 ++++++++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 96f3d629..e7001834 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,8 +61,9 @@ build_script: #- C:\cygwin64\bin\bash --login -c "make -C '%CD%\opt\cygfuse' dist" #- C:\cygwin\setup-x86.exe -qnNd -P cygport #- C:\cygwin\bin\bash --login -c "make -C '%CD%\opt\cygfuse' dist" -# remove ARM64 project configurations to build in VS2015 +# remove ARM64 project configurations to build in VS2015/VS2017 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" tools\gensrc\remove-build-arm64.bat +- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" tools\gensrc\remove-build-arm64.bat # build winfsp - tools\build.bat %CONFIGURATION% diff --git a/tools/build.bat b/tools/build.bat index 9fbe474d..ba6660e0 100755 --- a/tools/build.bat +++ b/tools/build.bat @@ -26,10 +26,16 @@ if X%~nx0==Xbuild-choco.bat ( set BuildArm64=yes if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( - echo WARNING: APPVEYOR BUILD ON UNSUPPORTED VERSION OF VISUAL STUDIO. - echo: set BuildArm64=no ) +if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( + set BuildArm64=no +) +if X%BuildArm64%==Xno ( + echo WARNING: APPVEYOR BUILD ON UNSUPPORTED VERSION OF VISUAL STUDIO. + echo WARNING: ARM64 BUILD PRODUCTS ARE COPIES OF X64 BUILD PRODUCTS. + echo: +) call "%~dp0vcvarsall.bat" x64 @@ -60,11 +66,8 @@ if X%SignedPackage%==X ( devenv winfsp.sln /build "%Configuration%|x86" if errorlevel 1 goto fail if X%BuildArm64%==Xno ( - echo: - echo WARNING: APPVEYOR BUILD ON UNSUPPORTED VERSION OF VISUAL STUDIO. - echo WARNING: ARM64 BUILD PRODUCTS ARE COPIES OF X64 BUILD PRODUCTS. - echo: copy build\%Configuration%\*-x64.* build\%Configuration%\*-a64.* >nul + if errorlevel 1 goto fail ) for %%f in (build\%Configuration%\%MyProductFileName%-a64.sys build\%Configuration%\%MyProductFileName%-x64.sys build\%Configuration%\%MyProductFileName%-x86.sys) do ( diff --git a/tools/vcvarsall.bat b/tools/vcvarsall.bat index 4df393db..5bbc212f 100755 --- a/tools/vcvarsall.bat +++ b/tools/vcvarsall.bat @@ -3,8 +3,14 @@ set vcvarsall="%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" set vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %vswhere% ( - for /f "usebackq tokens=*" %%i in (`%vswhere% -find VC\**\vcvarsall.bat`) do ( - set vcvarsall="%%i" + for /f "usebackq tokens=*" %%i in (`%vswhere% -latest -find VC\**\vcvarsall.bat`) do ( + if exist "%%i" ( + set vcvarsall="%%i" + ) else ( + for /f "usebackq tokens=*" %%i in (`%vswhere% -latest -property installationPath`) do ( + set vcvarsall="%%i\VC\Auxiliary\Build\vcvarsall.bat" + ) + ) ) ) call %vcvarsall% %* From 38a8a4c2d2e6b61fde5823c89062379ac1a20cac Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 17 Dec 2021 21:47:43 +0000 Subject: [PATCH 4/5] tools: run-tests.bat: ifstest: disable SetPointIoReparseDataInvalidTest This test succeeds on Server 2012 and fails on Server 2016/2019. Investigation on Server 2019 showed that the FSCTL_SET_REPARSE_POINT input buffer length was 23 instead of less than REPARSE_DATA_BUFFER_HEADER_SIZE(==8) like ifstest claims. This suggests that WinFsp is not the problem here, but perhaps some OS changes between Server 2012 and Server 2016. NOTE that we are still using the ifstest from Server 2012 HCK, which may account for the difference. --- tools/run-tests.bat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/run-tests.bat b/tools/run-tests.bat index 31e83f67..addafe01 100755 --- a/tools/run-tests.bat +++ b/tools/run-tests.bat @@ -643,7 +643,16 @@ if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1 rem ReparsePoints.SetPointEASNotSupportedTest: EA's not supported rem ReparsePoints.EnumReparsePointsTest: enumeration of reparse points not supported rem ReparsePoints.ChangeNotificationReparseTest: change notifications of reparse points not supported -call :__ifstest %1 /g ReparsePoints -t SetPointEASNotSupportedTest -t EnumReparsePointsTest -t ChangeNotificationReparseTest /c +rem ReparsePoints.SetPointIoReparseDataInvalidTest: +rem This test succeeds on Server 2012 and fails on Server 2016/2019. +rem Investigation on Server 2019 showed that the FSCTL_SET_REPARSE_POINT +rem input buffer length was 23 instead of less than +rem REPARSE_DATA_BUFFER_HEADER_SIZE(==8) like ifstest claims. This +rem suggests that WinFsp is not the problem here, but perhaps some OS +rem changes between Server 2012 and Server 2016. NOTE that we are still +rem using the ifstest from Server 2012 HCK, which may account for the +rem difference. +call :__ifstest %1 /g ReparsePoints -t SetPointEASNotSupportedTest -t EnumReparsePointsTest -t ChangeNotificationReparseTest -t SetPointIoReparseDataInvalidTest /c if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1 rem IfsTest ReparsePoints seems to have a bug in that it cannot handle STATUS_PENDING for FSCTL_GET_REPARSE_POINT rmdir /s/q reparspt From b8038604d1f865a6fd240b5de32f397863414111 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Sat, 18 Dec 2021 10:20:15 +0000 Subject: [PATCH 5/5] tst: winfsp-tests: disable delete_ex_test and rename_ex_test on shares These tests fail on Server 2019. This is not a WinFsp problem. --- tst/winfsp-tests/info-test.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tst/winfsp-tests/info-test.c b/tst/winfsp-tests/info-test.c index 04c9a690..3bedd988 100644 --- a/tst/winfsp-tests/info-test.c +++ b/tst/winfsp-tests/info-test.c @@ -1111,6 +1111,12 @@ void delete_ex_test(void) { if (OptLegacyUnlinkRename) return; + if (OptShareName) + /* + * This test fails with shares on Server 2019. It returns + * STATUS_INVALID_PARAMETER for FileDispositionInformationEx. + */ + return; if (NtfsTests) { @@ -2225,6 +2231,12 @@ void rename_ex_test(void) { if (OptLegacyUnlinkRename) return; + if (OptShareName) + /* + * This test fails with shares on Server 2019. It returns + * STATUS_INVALID_PARAMETER for FileRenameInformationEx. + */ + return; if (NtfsTests) { @@ -2512,7 +2524,7 @@ void info_tests(void) if (!OptShareName) TEST(delete_mmap_test); TEST(delete_standby_test); - if (!OptLegacyUnlinkRename) + if (!OptLegacyUnlinkRename && !OptShareName) TEST(delete_ex_test); TEST(rename_test); TEST(rename_backslash_test); @@ -2523,7 +2535,7 @@ void info_tests(void) if (!OptShareName) TEST(rename_mmap_test); TEST(rename_standby_test); - if (!OptLegacyUnlinkRename) + if (!OptLegacyUnlinkRename && !OptShareName) TEST(rename_ex_test); if (!NtfsTests) TEST(rename_pid_test);