tst: winfsp-tests: add --fuse-external option

This commit is contained in:
Bill Zissimopoulos
2021-11-13 10:15:12 +00:00
parent d67a917c6f
commit ec3386c2b3
9 changed files with 136 additions and 29 deletions

View File

@@ -132,6 +132,24 @@ BOOL WINAPI ResilientDeleteFileW(
BOOL WINAPI ResilientRemoveDirectoryW(
LPCWSTR lpPathName);
static inline
BOOLEAN BestEffortCreateSymbolicLinkW(
PWSTR SymlinkFileName,
PWSTR TargetFileName,
DWORD Flags)
{
BOOLEAN Success = CreateSymbolicLinkW(
SymlinkFileName,
TargetFileName,
Flags | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE);
if (!Success && ERROR_INVALID_PARAMETER == GetLastError())
Success = CreateSymbolicLinkW(
SymlinkFileName,
TargetFileName,
Flags & ~SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE);
return Success;
}
typedef struct
{
BOOLEAN Disposition;
@@ -154,6 +172,7 @@ extern int WinFspDiskTests;
extern int WinFspNetTests;
extern BOOLEAN OptExternal;
extern BOOLEAN OptFuseExternal;
extern BOOLEAN OptResilient;
extern BOOLEAN OptCaseInsensitiveCmp;
extern BOOLEAN OptCaseInsensitive;