youki-dev / youki

A container runtime written in Rust
https://youki-dev.github.io/youki/
Apache License 2.0
6.35k stars 349 forks source link

Test for recursive mount attrs #1534

Open higuruchi opened 1 year ago

higuruchi commented 1 year ago

Add test for recursive mount attrs option implemented in https://github.com/containers/youki/pull/1398.

lengrongfu commented 1 year ago

currently completed part.

  • [x] rro
  • [x] rrw
  • [x] rnosuid
  • [ ] rsuid
  • [x] rnodev
  • [x] rdev
  • [x] rnoexec
  • [x] rexec
  • [x] rnodiratime
  • [x] rdiratime
  • [ ] rrelatime
  • [ ] rnorelatime
  • [ ] rnoatime
  • [ ] ratime
  • [ ] rstrictatime
  • [ ] rnostrictatime
  • [ ] rnosymfollow
  • [ ] rsymfollow
utam0k commented 1 year ago

@lengrongfu I have updated! Thanks for your kind reminder.

CreepyPvP commented 1 year ago

Hi, id like to contribute to this issue. What tests are still open (and because iam new to this project / container runtimes in general a good point to get started)?

utam0k commented 1 year ago

@CreepyPvP How about ratime or rsymfollow?

CreepyPvP commented 1 year ago

Hi, iam currently adding a test for ratime. I keep getting this error while creating container:

ERROR libcontainer::process::container_init_process: failed to prepare rootfs err=Mount(Syscall(MountSetattr { source: EINVAL }))
ERROR libcontainer::process::container_intermediate_process: failed to initialize container process: failed to prepare rootfs
ERROR libcontainer::process::container_main_process: failed to wait for init ready: failed to receive. "waiting for init ready". BrokenChannel
ERROR youki: error in executing command: failed to create container

The error does not appear if ratime doesn't get set or gets cleared. I modified the check_recursive_rnoatime test to set ratime instead, tho it then starts failing as well.

The MOUNT_ATTR__ATIME seems to get set correctly toattr_clr and i could not find another reason for an EINVAL according to this https://man7.org/linux/man-pages/man2/mount_setattr.2.html.

Maybe I missed something. Here is the test i've been running: https://github.com/CreepyPvP/youki/tree/atime