Skip to content

Fix test_canonicalize_rootfs#280

Merged
utam0k merged 1 commit into
youki-dev:mainfrom
stepancheg:pr280
May 19, 2025
Merged

Fix test_canonicalize_rootfs#280
utam0k merged 1 commit into
youki-dev:mainfrom
stepancheg:pr280

Conversation

@stepancheg
Copy link
Copy Markdown
Contributor

@stepancheg stepancheg commented Apr 29, 2025

Test failed on my macOS laptop:

thread 'runtime::tests::test_canonicalize_rootfs' panicked at src/runtime/mod.rs:301:13:
assertion `left == right` failed
  left: "/var/folders/_h/j_17023n23s3_50cq_gwhrrc0000gq/T/.tmpDxkid2/rootfs"
 right: "/private/var/folders/_h/j_17023n23s3_50cq_gwhrrc0000gq/T/.tmpDxkid2/rootfs"

@stepancheg stepancheg force-pushed the pr280 branch 2 times, most recently from 7782d17 to d12a4d2 Compare April 29, 2025 20:47
@stepancheg
Copy link
Copy Markdown
Contributor Author

I don't know why DCO complains:

image

Comment thread src/runtime/mod.rs
let rootfs_name = "rootfs";
let bundle = tempfile::tempdir().expect("failed to create tmp test bundle dir");
let rootfs_absolute_path = bundle.path().join(rootfs_name);
let bundle = fs::canonicalize(bundle.path()).expect("failed to canonicalize bundle");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder why macOS needs fs::canonicalize().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

$ echo $TMPDIR; realpath $TMPDIR
/var/folders/_h/j_17023n23s3_50cq_gwhrrc0000gq/T/
/private/var/folders/_h/j_17023n23s3_50cq_gwhrrc0000gq/T

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May I ask you to add the comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@stepancheg
Copy link
Copy Markdown
Contributor Author

Same problem reported in #163.

Signed-off-by: Stepan Koltsov <stepan.koltsov@gmail.com>
Copy link
Copy Markdown
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

Thanks!

@utam0k utam0k merged commit f116109 into youki-dev:main May 19, 2025
25 checks passed
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.

2 participants