Skip to content

TestDiskUsage is flaky with snapshotters #47119

@vvoland

Description

@vvoland

Description

It sometimes fails when run with c8d snapshotters:

=== FAIL: amd64.integration.system TestDiskUsage/empty (0.00s)
    disk_usage_test.go:41: assertion failed: 
        --- du
        +++ →
          types.DiskUsage{
        - 	LayersSize: 4096,
        + 	LayersSize: 0,
          	Images:     {},
          	Containers: {},
          	... // 3 identical fields
          }
        
    --- FAIL: TestDiskUsage/empty (0.00s)

=== FAIL: amd64.integration.system TestDiskUsage (2.60s)

It seems to be related to the same thing that was happening in some other test: 28d057c

This test is parallel to other tests from the same suite so other tests are running at the same time.
My hypothesis is that even this test spawns a new docker daemon, the containerd daemon and its storage is still shared and some other tests cause the creation of empty directory which produces the overall size of 4096 (minimum allocation unit on ext4).
If that's true, removing t.Parallel should help, but perhaps we should look into it and investigate if we need more separation between docker and containerd daemons in tests.

Reproduce

Expected behavior

No response

docker version

v25.0.0

docker info

-

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To do

    Status

    Optional

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions