ltp
ltp copied to clipboard
clone09.c: EROFS error when open FILE '/proc/sys/net/ipv4/conf/lo/tag' in container env
Reproduce Step:
- Using container file create docker img: https://github.com/richiejp/ltp/blob/alpine-container/Containerfile
- docker run -it --rm xxx /bin/sh
- run following command /opt/ltp # ./testcases/bin/clone09 tst_test.c:1684: TINFO: LTP version: 20220930-713-g126db850c tst_test.c:1568: TINFO: Timeout per run is 0h 00m 30s clone09.c:59: TINFO: create clone in a new netns with 'CLONE_NEWNET' flag clone09.c:62: TBROK: Failed to open FILE '/proc/sys/net/ipv4/conf/lo/tag' for writing: EROFS (30)
Other info in container: /opt/ltp # ls -l /proc/sys/net/ipv4/conf/lo/tag -rw-r--r-- 1 root root 0 Sep 26 07:02 /proc/sys/net/ipv4/conf/lo/tag /opt/ltp # whoami root /opt/ltp # mount proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
Maybe a change similar to what I did for #1082 should be applied here as well?
Maybe a change similar to what I did for #1082 should be applied here as well? I suggest wait @pevik @richiejp 's feedback, change code or tune the setup of container etc..
Just FYI @Martchus
Following patch change the container's setup and use normal user instead of root, then if you run case with normal user the error will not happen.
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Just FYI @Martchus Following patch change the container's setup and use normal user instead of root, then if you run case with normal user the error will not happen. https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/ merge in LTP.