mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tst: winfsp-tests: silo testing
This commit is contained in:
parent
a3765d6360
commit
53b44dcb5c
@ -17,7 +17,7 @@ if not X%2==X set Chkpnt=%2
|
|||||||
) > %~dp0..\build\VStudio\build\%Config%\deploy-setup.bat
|
) > %~dp0..\build\VStudio\build\%Config%\deploy-setup.bat
|
||||||
|
|
||||||
(
|
(
|
||||||
echo docker run -it --rm --isolation=process -v%Deploy%:%Deploy%:RO %CImage% cmd.exe
|
echo docker run -it --rm --isolation=process -v%Deploy%:%Deploy%:RW %CImage% cmd.exe /k cd %Deploy%
|
||||||
) > %~dp0..\build\VStudio\build\%Config%\docker-run.bat
|
) > %~dp0..\build\VStudio\build\%Config%\docker-run.bat
|
||||||
|
|
||||||
set Files=
|
set Files=
|
||||||
|
@ -158,7 +158,10 @@ static void posix_map_sid_test(void)
|
|||||||
|
|
||||||
CloseHandle(Token);
|
CloseHandle(Token);
|
||||||
|
|
||||||
for (size_t i = 0; sizeof map / sizeof map[0] > i; i++)
|
size_t n = sizeof map / sizeof map[0];
|
||||||
|
if (RunningInContainer)
|
||||||
|
n -= 2; /* container: disable tests for "user manager\containeradministrator" */
|
||||||
|
for (size_t i = 0; n > i; i++)
|
||||||
{
|
{
|
||||||
Success = ConvertStringSidToSidW(map[i].SidStr, &Sid0);
|
Success = ConvertStringSidToSidW(map[i].SidStr, &Sid0);
|
||||||
ASSERT(Success);
|
ASSERT(Success);
|
||||||
|
@ -254,8 +254,13 @@ static void volpath_mount_test(void)
|
|||||||
/*
|
/*
|
||||||
* This test does FspFileSystemSetMountPoint and therefore
|
* This test does FspFileSystemSetMountPoint and therefore
|
||||||
* cannot be used with --external or --mountpoint.
|
* cannot be used with --external or --mountpoint.
|
||||||
|
*
|
||||||
|
* Also the MountMgr appears to be buggy and fail with spurious
|
||||||
|
* STATUS_NOT_SUPPORTED and STATUS_INVALID_PARAMETER error codes
|
||||||
|
* under Windows Containers (at least with ServerCore 1909). So
|
||||||
|
* disable if RunningInContainer.
|
||||||
*/
|
*/
|
||||||
if (NtfsTests || OptMountPoint)
|
if (NtfsTests || OptMountPoint || RunningInContainer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (WinFspDiskTests)
|
if (WinFspDiskTests)
|
||||||
@ -322,7 +327,12 @@ void volpath_tests(void)
|
|||||||
/*
|
/*
|
||||||
* This test does FspFileSystemSetMountPoint and therefore
|
* This test does FspFileSystemSetMountPoint and therefore
|
||||||
* cannot be used with --external or --mountpoint.
|
* cannot be used with --external or --mountpoint.
|
||||||
|
*
|
||||||
|
* Also the MountMgr appears to be buggy and fail with spurious
|
||||||
|
* STATUS_NOT_SUPPORTED and STATUS_INVALID_PARAMETER error codes
|
||||||
|
* under Windows Containers (at least with ServerCore 1909). So
|
||||||
|
* disable if RunningInContainer.
|
||||||
*/
|
*/
|
||||||
if (!NtfsTests && !OptMountPoint)
|
if (!NtfsTests && !OptMountPoint && !RunningInContainer)
|
||||||
TEST(volpath_mount_test);
|
TEST(volpath_mount_test);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
int NtfsTests = 0;
|
int NtfsTests = 0;
|
||||||
int WinFspDiskTests = 1;
|
int WinFspDiskTests = 1;
|
||||||
int WinFspNetTests = 1;
|
int WinFspNetTests = 1;
|
||||||
|
int RunningInContainer = 0;
|
||||||
|
|
||||||
BOOLEAN OptExternal = FALSE;
|
BOOLEAN OptExternal = FALSE;
|
||||||
BOOLEAN OptFuseExternal = FALSE;
|
BOOLEAN OptFuseExternal = FALSE;
|
||||||
@ -258,6 +259,12 @@ int main(int argc, char *argv[])
|
|||||||
if (0 == getenv("WINFSP_TESTS_EXCEPTION_FILTER_DISABLE"))
|
if (0 == getenv("WINFSP_TESTS_EXCEPTION_FILTER_DISABLE"))
|
||||||
SetUnhandledExceptionFilter(UnhandledExceptionHandler);
|
SetUnhandledExceptionFilter(UnhandledExceptionHandler);
|
||||||
|
|
||||||
|
RunningInContainer = ERROR_SUCCESS == RegGetValueW(
|
||||||
|
HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control",
|
||||||
|
L"ContainerType",
|
||||||
|
RRF_RT_REG_DWORD, 0,
|
||||||
|
0, 0);
|
||||||
|
|
||||||
for (int argi = 1; argc > argi; argi++)
|
for (int argi = 1; argc > argi; argi++)
|
||||||
{
|
{
|
||||||
const char *a = argv[argi];
|
const char *a = argv[argi];
|
||||||
@ -266,6 +273,7 @@ int main(int argc, char *argv[])
|
|||||||
if (0 == strcmp("--ntfs", a) || 0 == strcmp("--external", a))
|
if (0 == strcmp("--ntfs", a) || 0 == strcmp("--external", a))
|
||||||
{
|
{
|
||||||
OptExternal = TRUE;
|
OptExternal = TRUE;
|
||||||
|
OptFuseExternal = FALSE;
|
||||||
NtfsTests = 1;
|
NtfsTests = 1;
|
||||||
WinFspDiskTests = 0;
|
WinFspDiskTests = 0;
|
||||||
WinFspNetTests = 0;
|
WinFspNetTests = 0;
|
||||||
@ -404,6 +412,10 @@ int main(int argc, char *argv[])
|
|||||||
if (!NtfsTests && OptShareName)
|
if (!NtfsTests && OptShareName)
|
||||||
ABORT("option --share requires --ntfs/--external");
|
ABORT("option --share requires --ntfs/--external");
|
||||||
|
|
||||||
|
if (RunningInContainer)
|
||||||
|
/* container: disable network file system tests */
|
||||||
|
WinFspNetTests = 0;
|
||||||
|
|
||||||
DisableBackupRestorePrivileges();
|
DisableBackupRestorePrivileges();
|
||||||
|
|
||||||
AddNetShareIfNeeded();
|
AddNetShareIfNeeded();
|
||||||
|
@ -213,6 +213,7 @@ VOID GetTestDirectoryEx(PWSTR DirBuf, ULONG DirBufSize, PWSTR DriveBuf);
|
|||||||
extern int NtfsTests;
|
extern int NtfsTests;
|
||||||
extern int WinFspDiskTests;
|
extern int WinFspDiskTests;
|
||||||
extern int WinFspNetTests;
|
extern int WinFspNetTests;
|
||||||
|
extern int RunningInContainer;
|
||||||
|
|
||||||
extern BOOLEAN OptExternal;
|
extern BOOLEAN OptExternal;
|
||||||
extern BOOLEAN OptFuseExternal;
|
extern BOOLEAN OptFuseExternal;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user