crun icon indicating copy to clipboard operation
crun copied to clipboard

tests/test_start: fix an expected failure issue

Open chuanchang opened this issue 3 years ago • 5 comments

Signed-off-by: Alex Jia [email protected]

chuanchang avatar May 31 '22 07:05 chuanchang

@chuanchang Could you add commit from c44937bc02d3911a7512cc2f68a76d04708a3688 to this PR cause CI would fail without it.

flouthoc avatar May 31 '22 08:05 flouthoc

with cwd = "/doesnotexist" setting, we should get an expect failure, but It has a little weird, this case is run successfully with non-root uesr on Fedora 35 and root user on RHEL 8.6, however, we can get an expected error with non-root user on RHEL 8.y, I'm not sure if it's an issue.

with root user, I can get the expected error for manual testing on RHEL 8.6

[root@kvm-07-guest13 mycnt]# grep cwd config.json 
		"cwd": "/doesnotexist",
[root@kvm-07-guest13 mycnt]# crun run test
2022-05-31T09:24:10.000544590Z: chdir `/doesnotexist`: No such file or directory

but the cwd-not-exist is run successfully on RHEL 8.6.

RHEL 8.6 with root user

[root@kvm-07-guest13 crun]# python3 tests/test_start.py
1..19
2022-05-31T09:29:54.000689855Z: error opening file `/root/crun/.testsuite-run-168590/root/test-tmpvcdfnfo1/status`: No such file or directory
ok 1 - start
2022-05-31T09:29:54.000839316Z: error opening file `/root/crun/.testsuite-run-168590/root/test-tmpd493239t/status`: No such file or directory
ok 2 - start-override-config
ok 3 - run-twice
ok 4 - sd-notify
ok 5 - sd-notify-file
ok 6 - sd-notify-env
ok 7 - sd-notify-proxy
ok 8 - listen_pid_env
ok 9 - cwd-relative
ok 10 - cwd-relative-subdir
ok 11 - cwd-absolute
ok 12 - cwd-not-exist
ok 13 - empty-home
ok 14 - delete-in-created-state
ok 15 - run-rootless-netns-with-userns #SKIP
ok 16 - not-allowed-ipc-sysctl
ok 17 - not-allowed-net-sysctl
ok 18 - uts-sysctl
ok 19 - unknown-sysctl

Fedora 35 with non-root user

[ajia@Fedora35 crun]$ git rev-parse HEAD
6bbbddde3c7689f3bb59cedf7beb45c77cfad508

[ajia@Fedora35 crun]$ python3 tests/test_start.py
1..19
2022-05-31T09:25:16.000211848Z: error opening file `/home/ajia/Workspaces/crun/.testsuite-run-1238496/root/test-tmpcgg3n9ha/status`: No such file or directory
ok 1 - start
2022-05-31T09:25:16.000327550Z: error opening file `/home/ajia/Workspaces/crun/.testsuite-run-1238496/root/test-tmp573zv3o3/status`: No such file or directory
ok 2 - start-override-config
ok 3 - run-twice
ok 4 - sd-notify
ok 5 - sd-notify-file
ok 6 - sd-notify-env
ok 7 - sd-notify-proxy #SKIP
ok 8 - listen_pid_env
ok 9 - cwd-relative
ok 10 - cwd-relative-subdir
ok 11 - cwd-absolute
ok 12 - cwd-not-exist
ok 13 - empty-home
ok 14 - delete-in-created-state
ok 15 - run-rootless-netns-with-userns
ok 16 - not-allowed-ipc-sysctl #SKIP
ok 17 - not-allowed-net-sysctl #SKIP
ok 18 - uts-sysctl #SKIP
ok 19 - unknown-sysctl #SKIP

RHEL 8.6 with non-root user

[test@kvm-07-guest13 crun]$ python3 tests/test_start.py
1..19
2022-05-31T09:31:48.000298566Z: error opening file `/home/test/crun/.testsuite-run-168797/root/test-tmpigfoaa95/status`: No such file or directory
ok 1 - start
2022-05-31T09:31:48.000435849Z: error opening file `/home/test/crun/.testsuite-run-168797/root/test-tmp20i9nart/status`: No such file or directory
ok 2 - start-override-config
ok 3 - run-twice
ok 4 - sd-notify
ok 5 - sd-notify-file
ok 6 - sd-notify-env
ok 7 - sd-notify-proxy #SKIP
ok 8 - listen_pid_env
ok 9 - cwd-relative
ok 10 - cwd-relative-subdir
ok 11 - cwd-absolute
not ok 12 - cwd-not-exist
ok 13 - empty-home
ok 14 - delete-in-created-state
ok 15 - run-rootless-netns-with-userns
ok 16 - not-allowed-ipc-sysctl #SKIP
ok 17 - not-allowed-net-sysctl #SKIP
ok 18 - uts-sysctl #SKIP
ok 19 - unknown-sysctl #SKIP

chuanchang avatar May 31 '22 08:05 chuanchang

@chuanchang could you please rebase?

giuseppe avatar Jul 29 '22 11:07 giuseppe

@chuanchang are you still working on this PR?

giuseppe avatar Aug 24 '22 13:08 giuseppe

Sorry, I'm missing this PR, I will rebase codes then commit a new patch, thanks!

chuanchang avatar Aug 30 '22 12:08 chuanchang

@chuanchang Looks like this is still failing?

rhatdan avatar Nov 04 '22 10:11 rhatdan

@chuanchang still working on this?

giuseppe avatar Jan 12 '23 20:01 giuseppe

got no feedback, closing it. Please reopen if anything changes

giuseppe avatar May 25 '23 13:05 giuseppe