Skip to content

test: add windows build/test for functional tests#2090

Open
benmcclelland wants to merge 3 commits into
mainfrom
ben/windows-test
Open

test: add windows build/test for functional tests#2090
benmcclelland wants to merge 3 commits into
mainfrom
ben/windows-test

Conversation

@benmcclelland
Copy link
Copy Markdown
Member

We have been getting a few bug reports on windows, so this is an attempt to have some test coverage for windows.

We have been getting a few bug reports on windows, so this is an
attempt to have some test coverage for windows.
@benmcclelland benmcclelland force-pushed the ben/windows-test branch 10 times, most recently from 13f7903 to f770b9e Compare April 24, 2026 16:28
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.
@benmcclelland benmcclelland force-pushed the ben/windows-test branch 3 times, most recently from 2a6f68c to 4220c44 Compare April 25, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant