Skip to content

Commit 41831e7

Browse files
authored
Merge pull request #4377 from AkihiroSuda/distro-should-not-install-recvtty-etc
mv contrib/cmd tests/cmd (except memfd-bind)
2 parents 376e875 + f76489f commit 41831e7

File tree

14 files changed

+32
-28
lines changed

14 files changed

+32
-28
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
vendor/pkg
22
/runc
33
/runc-*
4-
/contrib/cmd/recvtty/recvtty
5-
/contrib/cmd/sd-helper/sd-helper
6-
/contrib/cmd/seccompagent/seccompagent
7-
/contrib/cmd/fs-idmap/fs-idmap
84
/contrib/cmd/memfd-bind/memfd-bind
9-
/contrib/cmd/pidfd-kill/pidfd-kill
10-
/contrib/cmd/remap-rootfs/remap-rootfs
5+
/tests/cmd/recvtty/recvtty
6+
/tests/cmd/sd-helper/sd-helper
7+
/tests/cmd/seccompagent/seccompagent
8+
/tests/cmd/fs-idmap/fs-idmap
9+
/tests/cmd/pidfd-kill/pidfd-kill
10+
/tests/cmd/remap-rootfs/remap-rootfs
1111
man/man8
1212
release
1313
Vagrantfile

Makefile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,26 @@ runc-bin: runc-dmz
7979
$(GO_BUILD) -o runc .
8080

8181
.PHONY: all
82-
all: runc recvtty sd-helper seccompagent fs-idmap memfd-bind pidfd-kill remap-rootfs
82+
all: runc memfd-bind recvtty sd-helper seccompagent fs-idmap pidfd-kill remap-rootfs
8383

84-
.PHONY: recvtty sd-helper seccompagent fs-idmap memfd-bind pidfd-kill remap-rootfs
85-
recvtty sd-helper seccompagent fs-idmap memfd-bind pidfd-kill remap-rootfs:
84+
.PHONY: memfd-bind
85+
memfd-bind:
8686
$(GO_BUILD) -o contrib/cmd/$@/$@ ./contrib/cmd/$@
8787

88+
.PHONY: recvtty sd-helper seccompagent fs-idmap pidfd-kill remap-rootfs
89+
recvtty sd-helper seccompagent fs-idmap pidfd-kill remap-rootfs:
90+
$(GO_BUILD) -o tests/cmd/$@/$@ ./tests/cmd/$@
91+
8892
.PHONY: clean
8993
clean:
9094
rm -f runc runc-* libcontainer/dmz/binary/runc-dmz
91-
rm -f contrib/cmd/recvtty/recvtty
92-
rm -f contrib/cmd/sd-helper/sd-helper
93-
rm -f contrib/cmd/seccompagent/seccompagent
94-
rm -f contrib/cmd/fs-idmap/fs-idmap
9595
rm -f contrib/cmd/memfd-bind/memfd-bind
96-
rm -f contrib/cmd/pidfd-kill/pidfd-kill
97-
rm -f contrib/cmd/remap-rootfs/remap-rootfs
96+
rm -f tests/cmd/recvtty/recvtty
97+
rm -f tests/cmd/sd-helper/sd-helper
98+
rm -f tests/cmd/seccompagent/seccompagent
99+
rm -f tests/cmd/fs-idmap/fs-idmap
100+
rm -f tests/cmd/pidfd-kill/pidfd-kill
101+
rm -f tests/cmd/remap-rootfs/remap-rootfs
98102
sudo rm -rf release
99103
rm -rf man/man8
100104

docs/terminals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,4 +351,4 @@ a [Go implementation in the `go-runc` bindings][containerd/go-runc.Socket], as
351351
well as [a simple client][recvtty].
352352

353353
[containerd/go-runc.Socket]: https://godoc.org/github.com/containerd/go-runc#Socket
354-
[recvtty]: /contrib/cmd/recvtty
354+
[recvtty]: /tests/cmd/recvtty
File renamed without changes.

contrib/cmd/pidfd-kill/pidfd-kill.go renamed to tests/cmd/pidfd-kill/pidfd-kill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
const (
17-
usage = `Open Container Initiative contrib/cmd/pidfd-kill
17+
usage = `Open Container Initiative tests/cmd/pidfd-kill
1818
1919
pidfd-kill is an implementation of a consumer of runC's --pidfd-socket API.
2020
After received SIGTERM, pidfd-kill sends the given signal to init process by

contrib/cmd/recvtty/recvtty.go renamed to tests/cmd/recvtty/recvtty.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var version = ""
3939
var gitCommit = ""
4040

4141
const (
42-
usage = `Open Container Initiative contrib/cmd/recvtty
42+
usage = `Open Container Initiative tests/cmd/recvtty
4343
4444
recvtty is a reference implementation of a consumer of runC's --console-socket
4545
API. It has two main modes of operation:

contrib/cmd/remap-rootfs/remap-rootfs.go renamed to tests/cmd/remap-rootfs/remap-rootfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/opencontainers/runtime-spec/specs-go"
1414
)
1515

16-
const usage = `contrib/cmd/remap-rootfs
16+
const usage = `tests/cmd/remap-rootfs
1717
1818
remap-rootfs is a helper tool to remap the root filesystem of a Open Container
1919
Initiative bundle using user namespaces such that the file owners are remapped

contrib/cmd/sd-helper/helper.go renamed to tests/cmd/sd-helper/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func usage() {
16-
fmt.Print(`Open Container Initiative contrib/cmd/sd-helper
16+
fmt.Print(`Open Container Initiative tests/cmd/sd-helper
1717
1818
sd-helper is a tool that uses runc/libcontainer/cgroups/systemd package
1919
functionality to communicate to systemd in order to perform various operations.

contrib/cmd/seccompagent/README.md renamed to tests/cmd/seccompagent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make all
1717

1818
Run the seccomp agent in the background:
1919
```bash
20-
sudo ./contrib/cmd/seccompagent/seccompagent &
20+
sudo ./tests/cmd/seccompagent/seccompagent &
2121
```
2222

2323
Prepare a container:

tests/integration/helpers.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ eval "$IMAGES"
1313
unset IMAGES
1414

1515
: "${RUNC:="${INTEGRATION_ROOT}/../../runc"}"
16-
RECVTTY="${INTEGRATION_ROOT}/../../contrib/cmd/recvtty/recvtty"
17-
SD_HELPER="${INTEGRATION_ROOT}/../../contrib/cmd/sd-helper/sd-helper"
18-
SECCOMP_AGENT="${INTEGRATION_ROOT}/../../contrib/cmd/seccompagent/seccompagent"
19-
FS_IDMAP="${INTEGRATION_ROOT}/../../contrib/cmd/fs-idmap/fs-idmap"
20-
PIDFD_KILL="${INTEGRATION_ROOT}/../../contrib/cmd/pidfd-kill/pidfd-kill"
21-
REMAP_ROOTFS="${INTEGRATION_ROOT}/../../contrib/cmd/remap-rootfs/remap-rootfs"
16+
RECVTTY="${INTEGRATION_ROOT}/../../tests/cmd/recvtty/recvtty"
17+
SD_HELPER="${INTEGRATION_ROOT}/../../tests/cmd/sd-helper/sd-helper"
18+
SECCOMP_AGENT="${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/seccompagent"
19+
FS_IDMAP="${INTEGRATION_ROOT}/../../tests/cmd/fs-idmap/fs-idmap"
20+
PIDFD_KILL="${INTEGRATION_ROOT}/../../tests/cmd/pidfd-kill/pidfd-kill"
21+
REMAP_ROOTFS="${INTEGRATION_ROOT}/../../tests/cmd/remap-rootfs/remap-rootfs"
2222

2323
# Some variables may not always be set. Set those to empty value,
2424
# if unset, to avoid "unbound variable" error.

tests/integration/seccomp-notify.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function scmp_act_notify_template() {
214214
@test "runc run [seccomp] (SCMP_ACT_NOTIFY example config)" {
215215
# Run the script used in the seccomp agent example.
216216
# This takes a bare config.json and modifies it to run an example.
217-
"${INTEGRATION_ROOT}/../../contrib/cmd/seccompagent/gen-seccomp-example-cfg.sh"
217+
"${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/gen-seccomp-example-cfg.sh"
218218

219219
# The listenerPath the previous command uses is the default used by the
220220
# seccomp agent. However, inside bats the socket is in a bats tmp dir.

0 commit comments

Comments
 (0)