test: add windows build/test for functional tests#2090
Open
benmcclelland wants to merge 3 commits into
Open
Conversation
We have been getting a few bug reports on windows, so this is an attempt to have some test coverage for windows.
13f7903 to
f770b9e
Compare
On Windows, opening a path like "file/" where "file" is a regular file
returns ERROR_DIRECTORY instead of POSIX ENOTDIR.
Go does not map ERROR_DIRECTORY to syscall.ENOTDIR, so the existing
errors.Is(err, syscall.ENOTDIR) checks in the posix backend all missed
this case, causing HTTP 500 instead of ErrNoSuchKey.
Introduce an isErrNotDir build-tag helper pair (isnotdir_other.go /
isnotdir_windows.go, following the existing parentdir_* pattern) and
replace all ENOTDIR checks in posix.go with the new helper.
Add a --windows-test-mode / --windows flag to the integration test
runner. When set:
- PresignedAuth_Put_GetObject_with_UTF8_chars: strips '*' from object
names (illegal on Windows filesystems)
- PutObject_special_chars: filters out ':', '?', '<', '>', '|', '*'
- PutObject_false_negative_object_names: skips the literal-backslash
case (treated as a path separator on Windows)
- DeleteObject_non_empty_dir_obj and CopyObject_non_existing_dir_object
are skipped entirely (rely on POSIX trailing-slash dir semantics)
Add a --skip-racey flag to the full-flow test subcommand and enable
for sidecar tests that skip the racey tests that are expected to be
flakey with sidecar setups.
Fix genRandString to use an atomic counter seeded from
time.Now().UnixNano() instead of re-seeding math/rand on every call.
On Windows the system timer resolution can be 100ns–15ms, so concurrent
goroutines received identical seeds, generated identical access keys,
and caused 409 Conflict on user creation.
2a6f68c to
4220c44
Compare
4220c44 to
ce2116d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have been getting a few bug reports on windows, so this is an attempt to have some test coverage for windows.