Skip to content

tests: Fix weird error on centos-9#3740

Merged
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
kinvolk:rata/fix-basename-test
Feb 11, 2023
Merged

tests: Fix weird error on centos-9#3740
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
kinvolk:rata/fix-basename-test

Conversation

@rata
Copy link
Copy Markdown
Member

@rata rata commented Feb 10, 2023

centos-9 unit test sometimes fails with:

            === RUN   TestPodSkipDevicesUpdate
                systemd_test.go:114: container stderr not empty: basename: missing operand
                    Try 'basename --help' for more information.
            --- FAIL: TestPodSkipDevicesUpdate (0.11s)

I'm not sure why the container output is an error in basename. It seems
likely that the bashrc in that distro is kind of broken. Let's just run
a sleep command and forget about bash.

Fixes: #3742

Signed-off-by: Rodrigo Campos rodrigoca@microsoft.com

@rata
Copy link
Copy Markdown
Member Author

rata commented Feb 10, 2023

I think this should do the trick (if sleep command there has the infinity option, unsure if all distros have it). But let's see... I'm pushing this commit to other open PRs I have, to run it more times

@rata rata force-pushed the rata/fix-basename-test branch from d1a72f8 to 8e4df13 Compare February 10, 2023 12:33
@rata
Copy link
Copy Markdown
Member Author

rata commented Feb 10, 2023

Pushing to foce it to run again

@rata
Copy link
Copy Markdown
Member Author

rata commented Feb 10, 2023

Well, that seems fixed but there is yet another issue, now in integration tests:

not ok 98 ps after the container stopped
# (in test file tests/integration/ps.bats, line 83)
#   `[ "$status" -eq 0 ]' failed
# runc spec (status=0):
# 
# runc run -d --console-socket /tmp/bats-run-14514/runc.NS9L5h/tty/sock test_busybox (status=0):
# 
# runc state test_busybox (status=0):
# {
#   "ociVersion": "1.0.2-dev",
#   "id": "test_busybox",
#   "pid": 26143,
#   "status": "running",
#   "bundle": "/tmp/bats-run-14514/runc.NS9L5h/bundle",
#   "rootfs": "/tmp/bats-run-14514/runc.NS9L5h/bundle/rootfs",
#   "created": "2023-02-10T12:47:29.713368222Z",
#   "owner": ""
# }
# runc ps test_busybox (status=0):
# UID        PID  PPID  C STIME TTY          TIME CMD
# root     26143     1  0 12:47 pts/0    00:00:00 sh
# runc kill test_busybox KILL (status=0):
# 
# runc ps test_busybox (status=1):
# time="2023-02-10T12:47:29Z" level=error msg="unable to get all container pids: open /sys/fs/cgroup/devices/machine.slice/runc-cgroups-integration-test-25194.scope: no such file or directory"

Opened another issue for that one :(

centos-9 unit test sometimes fails with:

	=== RUN   TestPodSkipDevicesUpdate
	    systemd_test.go:114: container stderr not empty: basename: missing operand
	        Try 'basename --help' for more information.
	--- FAIL: TestPodSkipDevicesUpdate (0.11s)

I'm not sure why the container output is an error in basename. It seems
likely that the bashrc in that distro is kind of broken. Let's just run
a sleep command and forget about bash.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
@rata rata force-pushed the rata/fix-basename-test branch from 8e4df13 to 4d0a60c Compare February 10, 2023 13:50
@rata
Copy link
Copy Markdown
Member Author

rata commented Feb 10, 2023

All green now!

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@AkihiroSuda AkihiroSuda merged commit 514ea70 into opencontainers:main Feb 11, 2023
@rata rata deleted the rata/fix-basename-test branch February 20, 2023 15:36
@kolyshkin kolyshkin added the backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 label Apr 4, 2023
@kolyshkin
Copy link
Copy Markdown
Contributor

Backported to 1.1 in #3791

@kolyshkin kolyshkin added backport/1.1-done A PR in main branch which has been backported to release-1.1 and removed backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 labels Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.1-done A PR in main branch which has been backported to release-1.1 easy-to-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test on centos-9: TestPodSkipDevicesUpdate stderr: basename: missing operand

3 participants