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

Fix darwin issues #186

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Fix darwin issues #186

merged 3 commits into from
Sep 10, 2021

Conversation

thehajime
Copy link
Contributor

This PR is related to containerd/containerd#4526, which tries to support darwin runtime of containerd.

The patches contains several fixes:

  • a fix to incorrect option for du command
% TMPDIR=/tmp/fs go test ./fs -v -run TestUsage
(snip)
=== CONT  TestUsage/HardlinkSparefile
    du_test.go:134: Failed calling du: exit status 64
du: illegal option -- -
usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g] [-x] [-I mask] [file ...]
=== CONT  TestUsage/Hardlinks
    du_test.go:134: Failed calling du: exit status 64
(snip)
  • utimes usage similar to FreeBSD (bb87682)

As macOS is similar to FreeBSD, the fixes are actually following the way FreeBSD did, but darwin itself has slightly different internals, thus adapting those caes.

Even du command fixes, the test with TestUsage still fails with SparseFiles, but will address this issue later.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
This fix is similar to what FreeBSD support does (bb87682), but
prepares a separate file to handle the darwin case.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants