Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/int: fix wrt busybox's nogroup->nobody change #2580

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Sep 9, 2020

Apparently, newer busybox image changed "nogroup" group name to "nobody",
breaking a few test cases that depended on the name.

Fix those tests by switching to numeric IDs.

1. tests/int: fix runc exec --preserve-fds

This test started to fail, as it expected the output from
id to be

uid=1000 gid=1000 groups=100(users),65534(nogroup)

while the actual output is now

uid=1000 gid=1000 groups=100(users),65534(nobody)

Apparently, busybox image changed group name.

As we're only interested in ids, not names, and to fix the test,
let's use id -G.

2. tests/int/dev.bats: fixes for new busybox

These tests expect group name to be "nogroup", while recent busybox
changed that to "nobody".

Use numeric uids/gids to fix.

This test started to fail, as it expected the output from
`id` to be

	uid=1000 gid=1000 groups=100(users),65534(nogroup)

while the actual output is now

	uid=1000 gid=1000 groups=100(users),65534(nobody)

Apparently, busybox image changed group name.

As we're only interested in ids, not names, and to fix the test,
let's use `id -G`.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

@AkihiroSuda @mrunalp PTAL

@kolyshkin
Copy link
Contributor Author

Found while looking at CI for #2580

mrunalp
mrunalp previously approved these changes Sep 9, 2020
@mrunalp
Copy link
Contributor

mrunalp commented Sep 9, 2020

@AkihiroSuda ptal

@kolyshkin
Copy link
Contributor Author

Another failure caused by the same change:

not ok 28 runc run [redundant default /dev/tty]
# (in test file tests/integration/dev.bats, line 22)
#   `[[ "${lines[0]}" =~ "crw-rw-rw".+"1".+"nobody".+"nogroup".+"5,".+"0".+"/dev/tty" ]]' failed
....
# crw-rw-rw-    1 nobody   nobody      5,   0 Sep  9 01:06 /dev/tty

These tests expect group name to be "nogroup", while recent busybox
changed that to "nobody".

Use numeric uids/gids to fix.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin changed the title tests/int: fix runc exec --preserve-fds tests/int: fix wrt busybox's nogroup->nobody change Sep 9, 2020
@mrunalp mrunalp merged commit 165ecd2 into opencontainers:master Sep 9, 2020
@chuanchang
Copy link

chuanchang commented Sep 10, 2020

I also hit the same issue, it's nobody not nogroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants