Skip to content

frontend: fix testMultiStageImplicitFrom to account for busybox changes#3436

Merged
crazy-max merged 1 commit intomoby:masterfrom
thaJeztah:fix_tests
Dec 27, 2022
Merged

frontend: fix testMultiStageImplicitFrom to account for busybox changes#3436
crazy-max merged 1 commit intomoby:masterfrom
thaJeztah:fix_tests

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

It looks like there's some changes between busybox:1.34.0 and up; version 1.34.0 of the image did not have a /usr/bin directory (only /usr/sbin);

docker run --rm -it busybox:1.34.0 ls -al /usr/
total 12
drwxr-xr-x    3 root     root          4096 Sep 13  2021 .
drwxr-xr-x    1 root     root          4096 Dec 27 14:45 ..
drwxr-xr-x    2 daemon   daemon        4096 Sep 13  2021 sbin

But 1.34.1 and up do;

docker run --rm -it busybox:1.34.1 ls -al usr/
total 16
drwxr-xr-x    4 root     root          4096 Dec 21 18:28 .
drwxr-xr-x    1 root     root          4096 Dec 27 14:44 ..
drwxr-xr-x    2 root     root          4096 Dec 21 18:28 bin
drwxr-xr-x    2 daemon   daemon        4096 Dec 21 18:28 sbin

It's not immediately apparent what caused this change, or if it's in busybox itself, or in the official image only;
mirror/busybox@1_34_0...1_34_1

But either way, this change caused a test to fail:

sandbox.go:238: time="2022-12-27T13:45:25.294022820Z" level=debug msg="> creating 4gr5bno8rj7l3k7h9jxe3jhal [/bin/sh -c mkdir /usr/bin && echo -n foo > /usr/bin/go]" span="[golang 2/2] RUN mkdir /usr/bin && echo -n foo > /usr/bin/go"
sandbox.go:238: time="2022-12-27T13:45:25.433886983Z" level=debug msg="sandbox set key processing took 70.062631ms for container 5b4o358g2ryquk4s6ami38gqo"
sandbox.go:238: mkdir: can't create directory '/usr/bin': File exists

It looks like there's some changes between `busybox:1.34.0` and up; version
1.34.0 of the image did not have a `/usr/bin` directory (only `/usr/sbin`);

    docker run --rm -it busybox:1.34.0 ls -al /usr/
    total 12
    drwxr-xr-x    3 root     root          4096 Sep 13  2021 .
    drwxr-xr-x    1 root     root          4096 Dec 27 14:45 ..
    drwxr-xr-x    2 daemon   daemon        4096 Sep 13  2021 sbin

But 1.34.1 and up do;

    docker run --rm -it busybox:1.34.1 ls -al usr/
    total 16
    drwxr-xr-x    4 root     root          4096 Dec 21 18:28 .
    drwxr-xr-x    1 root     root          4096 Dec 27 14:44 ..
    drwxr-xr-x    2 root     root          4096 Dec 21 18:28 bin
    drwxr-xr-x    2 daemon   daemon        4096 Dec 21 18:28 sbin

It's not immediately apparent what caused this change, or if it's in
busybox itself, or in the official image only;
mirror/busybox@1_34_0...1_34_1

But either way, this change caused a test to fail:

    sandbox.go:238: time="2022-12-27T13:45:25.294022820Z" level=debug msg="> creating 4gr5bno8rj7l3k7h9jxe3jhal [/bin/sh -c mkdir /usr/bin && echo -n foo > /usr/bin/go]" span="[golang 2/2] RUN mkdir /usr/bin && echo -n foo > /usr/bin/go"
    sandbox.go:238: time="2022-12-27T13:45:25.433886983Z" level=debug msg="sandbox set key processing took 70.062631ms for container 5b4o358g2ryquk4s6ami38gqo"
    sandbox.go:238: mkdir: can't create directory '/usr/bin': File exists

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

Looks like it added a /usr/bin/env symlink;

docker run --rm -it busybox:1.34.1 ls -al usr/bin/
total 8
drwxr-xr-x    2 root     root          4096 Dec 21 18:34 .
drwxr-xr-x    4 root     root          4096 Dec 21 18:34 ..
lrwxrwxrwx    1 root     root            13 Dec 21 18:34 env -> ../../bin/env

@thaJeztah
Copy link
Copy Markdown
Member Author

This one's green, @crazy-max - do you want a second review, or "good to go"?

@crazy-max crazy-max merged commit abcab14 into moby:master Dec 27, 2022
@thaJeztah thaJeztah deleted the fix_tests branch December 27, 2022 18:30
@tonistiigi tonistiigi mentioned this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants