Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing written-after-open tests #2335

Open
QuLogic opened this issue Nov 3, 2024 · 2 comments
Open

Failing written-after-open tests #2335

QuLogic opened this issue Nov 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@QuLogic
Copy link

QuLogic commented Nov 3, 2024

Describe the bug
When I run tests from this repo, two that seem to be about written-after-open conditions fail:

--- FAIL: Test_fdReaddir_opened_file_written (0.00s)
    require.go:331: unexpected value
        expected:
        	[]byte{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x6b, 0xee, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2e, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2e, 0x2e, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x6b, 0xee, 0x1, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x66, 0x69, 0x6c, 0x65}
        was:
        	[]byte{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x6b, 0xee, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2e, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2e, 0x2e}
        
        /root/wazero/imports/wasi_snapshot_preview1/fs_test.go:5141
FAIL
FAIL	github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1	31.825s

--- FAIL: TestDirFS_Readdir (0.00s)
    --- FAIL: TestDirFS_Readdir/Sees_files_written_after_open (0.00s)
        require.go:331: expected 1, but was 0
            /root/wazero/internal/sysfs/dirfs_test.go:698
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/empty_dir (0.00s)
        require.go:331: expected 2, but was 1: linux
            /root/wazero/internal/sysfs/stat_test.go:37
    --- FAIL: TestStat/not_empty_dir (0.00s)
        require.go:331: expected 3, but was 1: linux
            /root/wazero/internal/sysfs/stat_test.go:63
FAIL
FAIL	github.com/tetratelabs/wazero/internal/sysfs	0.857s

To Reproduce
I tried this in a Fedora container:

$ podman run --rm -it fedora:rawhide
# dnf update -y
# dnf install -y go git
# git clone https://github.com/tetratelabs/wazero
# cd wazero
# make test

and also an Ubuntu container:

$ podman run --rm -it ubuntu:24.04
# apt update
# apt upgrade -yy
# apt install -yy golang git make
# git clone https://github.com/tetratelabs/wazero
# cd wazero
# make test

Both fail as above.

Expected behavior
The tests should all pass, as they (seem to?) do on CI.

Environment (please complete the relevant information):

  • Go version: 1.23.2
  • wazero Version: dc08732
  • Host architecture: amd64
  • Runtime mode: n/a
@QuLogic QuLogic added the bug Something isn't working label Nov 3, 2024
@AlexanderYastrebov
Copy link

I could not reproduce it on my machine (ubuntu 24.04.1) neither on the host nor in docker

@QuLogic
Copy link
Author

QuLogic commented Nov 10, 2024

Perhaps it's a kernel setting, or filesystem thing? It's 100% reproducible for me. The host is Fedora 40 on a btrfs filesystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants