Commit Graph

83 Commits

Author SHA1 Message Date
d22f93678b Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 9d9dff3d0d9e92adf7c2e59f94c63766659d1d47
Component: engine
2016-07-29 02:10:36 +00:00
c1a0ccd035 Better error on attach no tty
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f7541b00b0f68a52195ed9bac967f8f08d96aa51
Component: engine
2016-05-25 13:32:48 -07:00
e716bd46e9 Add ulimit support to libcontainerd addprocess
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8891afd8385aeb490f8b7d9db8c3828bc7d24dc1
Component: engine
2016-03-23 19:54:32 -07:00
8ba16d91c8 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c4570a958df42d1ad19364b1a8da55b891d850a
Component: engine
2016-03-18 13:38:32 -07:00
0cf2a141a6 make TestExecInspectIDs less racy
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 8dd8ec137eb02519091d9361af566d7f9cd9a11f
Component: engine
2016-03-08 09:51:39 -08:00
c1d2fd21f7 Fix flaky TestExec
The container started with `-d` as part of the test requires a `waitRun`
to ensure it is actually running before attempting any other operation.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 0a7755ab4e2fc8df1992813d5364fe0f201ab913
Component: engine
2016-02-23 09:51:09 -08:00
8107240b18 Require linux for TestExecAfterContainerRestart
All the other exec tests require linux except this one and it is
causing failures in the TP4 test runs.

ref:
https://jenkins.dockerproject.org/job/Docker-PRs-WoW-TP4/1076/console

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 46e41dc2f86e27ef502c2b1a679ab95d0426c8c3
Component: engine
2016-02-16 17:50:50 -08:00
25898f320a Remove stray printf
This came in with the Windows CI work and I assume was meant for local
debug, but adds a bare printf line to the test output.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 77590d4dae9223ccd8edf9b153c669f631747f24
Component: engine
2016-02-04 10:13:31 -05:00
fc2f331561 Merge pull request #19822 from Microsoft/jjh/testexeccli
Windows CI: Initial porting CLI TestExec*
Upstream-commit: 5cdc0dfce3b058874566721b1f111baaa19df18b
Component: engine
2016-02-02 08:32:28 +01:00
cb0539b747 Windows CI: Initial porting CLI TestExec*
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a9379b4af227f1966b71ee255fc8bcf272ffe43c
Component: engine
2016-02-01 10:19:21 -08:00
8bc92ae008 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 62a856e9129c9d5cf7db9ea6322c9073d68e3ea4
Component: engine
2016-01-29 23:39:07 +08:00
48b99fc11d Make test case name consistent
Replace `Tty` with `TTY` in all test case names so that we can run
a bundle of `TTY` related test cases with TESTFLAGS like
`-check.f TestExecTTY*`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: e151ad936abecce944e3f7c285fa788c2dc1bba1
Component: engine
2016-01-24 16:32:52 +08:00
1cfc0cf7f6 Merge pull request #17373 from Microsoft/10662-volumetests
Windows: Volume integration tests
Upstream-commit: 2266462f724492d3802d7043723347adeb18024e
Component: engine
2015-10-27 19:52:11 -04:00
744e201d80 Merge pull request #17257 from echo33/docker_cli_exec_test
use of checkers on docker_cli_exec_test.go
Upstream-commit: f3f63c6044057637f3eadf78c2c939ef60556db7
Component: engine
2015-10-26 23:14:38 +01:00
14116a686a Windows: Volume integration tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2af5034ce8faa1f93d81864aa25ec64527fac76b
Component: engine
2015-10-26 14:33:28 -07:00
2e3f8e6b23 use of checkers on docker_cli_exec_test.go
Signed-off-by: weiyan <weiyan3@huawei.com>
Upstream-commit: 9120a1fc3ef929b18200b4f315bb7147889a0c36
Component: engine
2015-10-26 10:01:48 +08:00
e999854115 Merge pull request #17332 from askb/17225_flakytest_TestExecEnv
Fix for the issue #17225 flaky test DockerSuite.TestExecEnv test case.
Upstream-commit: c71e97fc122d82c4bd99e47b38000d216bf360f2
Component: engine
2015-10-25 21:17:50 +01:00
b01426a7bc Fix for #17243 DockerSuite.TestExecAfterContainerRestart.
Added waitRun(containerID) statement after docker run -d and docker restart
to ensure the container is restarted before issuing a exec cmd.

Signed-off-by: Anil Belur <askb23@gmail.com>
Upstream-commit: 2a5f04dcc900888ff706e36e6360d0b51d82bed1
Component: engine
2015-10-25 21:43:31 +05:30
082dcadcb4 Fix for the issue #17225 flaky test DockerSuite.TestExecEnv test case.
This is done by calling waitRun() followed by the docker run, which ensures the container is loaded
before calling docker exec to obtain the env variable set previously.

Incorporated the change as suggeted by duglin.

Signed-off-by: Anil Belur <askb23@gmail.com>
Upstream-commit: 6d974ec19d2f484586ec57c2e2455a6de927cddf
Component: engine
2015-10-24 22:54:24 +05:30
29fa44dc8c add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ea3afdad612448fc6eefcc4bdd63563be8f16946
Component: engine
2015-10-09 20:50:27 -04:00
59099af0ea Bump runc
Fixes a race when starting a container when there is an error, the stdio
streams are not always written.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d9f5f1954cf3ba9c1f9644d7997033d5d62ab34b
Component: engine
2015-10-08 17:07:00 -04:00
ec3df7c39d While #16738 is "fixed", skip TestExecStartFails
… on windows

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dc204b87864a06d37f9515b57bd6f76dac24a016
Component: engine
2015-10-04 18:38:21 +02:00
5c97861d03 Make sure test container is running before exec
Fixes race in TestExecStartFails

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9077c8968950133fdfac9898a20f9887f8df78f2
Component: engine
2015-09-29 10:06:51 -04:00
c03ccb6893 Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9a3558a9d75ed6a2f9f1b2d80800226afaa74a5
Component: engine
2015-09-04 12:32:40 -07:00
e2e0f70ccb Merge pull request #15412 from vdemeester/dont-sleep-too-much
time.Sleep in integration tests — comment and waitRun/waitInspect
Upstream-commit: 5929502b4e05ed82e78347169f3ba705cac8ad35
Component: engine
2015-08-21 20:43:55 -04:00
589fca3f48 fix a panic when the exec fails to start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: fcf9daad91d9be24ceddbc4add4d3a8179c9b32c
Component: engine
2015-08-22 00:01:44 +08:00
8e9c7e7df9 integration-cli: modify %s to %d in formatting an int
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
Upstream-commit: 5b870d7fa6d65895a4be601a1e09812a4962d03d
Component: engine
2015-08-19 12:06:05 +09:00
22da8315f6 Remove/Comment time.Sleep in integration tests
Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 799d9605d6d37a0f5c559b0325d924ad183ff4ee
Component: engine
2015-08-18 20:36:08 +02:00
273be038ad Updated test to check for exec --privileged side-effects
Also improving documentation for same feature as part of
docker/docker#14113 docs review.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
Upstream-commit: 90326939c8089dbd7b59423415bc67cae6208b08
Component: engine
2015-08-13 16:37:20 +10:00
337be087f4 Revert "Revert "Add docker exec run a command in privileged mode""
This reverts commit 40b71adee390e9c06471b89ed845132b4ec80177.

Original commit (for which this is effectively a rebased version) is
72a500e9e5929b038816d8bd18d462a19e571c99 and was provided by Lei Jitang
<leijitang@huawei.com>.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
Upstream-commit: 03f65b3d0d66ccdc8b69a447b75508d594007600
Component: engine
2015-08-13 16:36:44 +10:00
b6bee43e0c Another try to fix InspectExecID
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fe6a7c8e57c1cf7cf7cbc501fa2006c8eaf412f1
Component: engine
2015-08-04 09:21:41 -07:00
8461105dc9 Don't mount /proc as ro
This caused a regression with LSM labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: bfc51cf6605ebcf7a4ec791fb0f3b5ae7b05c6fd
Component: engine
2015-07-30 10:57:50 -07:00
6e14356132 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 693ba98cb9118bf15caaabc69ca281c0ce604226
Component: engine
2015-07-27 14:33:32 -04:00
1b5a1d2d53 Merge pull request #14547 from duglin/ErrDeadExec
Return 404 on exec-inspect when container is dead but exec is still around
Upstream-commit: 4dbdd98b4142dbda1c6028c17a9a0d6dd8cdce04
Component: engine
2015-07-27 10:46:32 -07:00
0e9fea3c70 Remove unnecessary container cleanup in integration-cli
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: bcc0968a2c9b5feef2c09b097c461a80b50ac19a
Component: engine
2015-07-24 14:48:26 +08:00
0b00c6ae1a dockerCmd when possible
Addresses: #14603

integration-cli/docker_cli_daemon_experimental_test.go (hqhq)
integration-cli/docker_cli_daemon_test.go (hqhq)
integration-cli/docker_cli_diff_test.go (hqhq)
integration-cli/docker_cli_events_test.go (hqhq)
integration-cli/docker_cli_events_unix_test.go (hqhq)
integration-cli/docker_cli_exec_test.go (hqhq)
integration-cli/docker_cli_exec_unix_test.go (hqhq)
integration-cli/docker_cli_experimental_test.go (hqhq)
integration-cli/docker_cli_export_import_test.go (hqhq)
integration-cli/docker_cli_help_test.go (hqhq)
integration-cli/docker_cli_history_test.go (hqhq)
integration-cli/docker_cli_images_test.go (hqhq)
integration-cli/docker_cli_import_test.go (hqhq)
integration-cli/docker_cli_info_test.go (hqhq)
integration-cli/docker_cli_inspect_test.go (hqhq)
integration-cli/docker_cli_kill_test.go (hqhq)

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 668e2369cc5d57d634d0e559241ea4c4cbde65d8
Component: engine
2015-07-20 14:55:40 +08:00
68f2260858 Move inspect into the loop on InspectExecID test
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f06620ece3557eb263b221e476cef2955235ba75
Component: engine
2015-07-17 17:30:24 -07:00
a752ea3772 Merge pull request #14706 from duglin/FixInspectTest
Fix InspectExecID test
Upstream-commit: 465192cb2885acfe71509827ff2011042e0c99b9
Component: engine
2015-07-17 14:37:23 -07:00
7744d0b3be Fix InspectExecID test
The check for the end of the loop was off by one which is why we saw
errors on the following inpsect() call instead of a timeout

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c5c98c31a184837c7f5b1f43d8ef18a676a8bf30
Component: engine
2015-07-17 06:46:37 -07:00
d7c4893fc7 Add missing 'err' to Fatalf to help debug an issue
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 97c5f64001af1ac6c9035af672e45051cab55f62
Component: engine
2015-07-16 20:27:14 -07:00
b57d4c713b Add minor vet fixes
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 26ce3f4c90058a2b2f23a2cb36492cfa7963494c
Component: engine
2015-07-12 19:16:38 +02:00
1e1ad91010 Return 404 on exec-inspect when container is dead but exec is still around
When a container is removed but it had an exec, that still hasn't been
GC'd per PR #14476, and someone tries to inspect the exec we should
return a 404, not a 500+container not running.  Returning "..not running" is
not only misleading because it could lead people to think the container is
actually still around, but after 5 minutes the error will change to a 404
after the GC. This means that we're externalizing our internall soft-deletion/GC
logic which shouldn't be any of the end user's concern. They should get the
same results immediate or after 5 minutes.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d841b779fda882c3fd505f626c01cc9d60768aa6
Component: engine
2015-07-10 20:19:42 -07:00
e5af478260 More extensive testing of new GC of execs
This is a follow-on to PR #14520.

PR #14520 is the quick fix to get the testing working again.

This PR makes sure that the list of execs associated with  a container goes
from zero to one (as a new exec is run), then back to zero when the exec is
finished.  However, we should be able to query the exec while the container
is still around, and even though the exec isn't listed in the container's
inspect data.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 72b75cd4e764e25cecd3f0c100597b8868c68120
Component: engine
2015-07-10 07:27:11 -07:00
b0c29eba8b Minor fix to the exec inspect test
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 899c85b40538ff75aa5c8b8f92dff55e3bff0d0b
Component: engine
2015-07-10 06:19:03 -07:00
73973301dc Default process user to container config user.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0faa4518ed2dad592bb238838b4df2b34d2171c3
Component: engine
2015-06-29 12:52:05 -07:00
4a122abf80 TestExecStopNotHanging: log output as string
When cmd failed, log its ouput as string instead of byte array to prevent test
log like: [49 53 ....] exit status 1

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: d898372568a3e00d4bda0359393d833a9f30fe1d
Component: engine
2015-06-11 22:53:55 -04:00
d89704cf56 Revert "Add docker exec run a command in privileged mode"
This reverts commit 72a500e9e5929b038816d8bd18d462a19e571c99.

Signed-off-by: Jessica Frazelle <princess@docker.com>

Conflicts:
	daemon/execdriver/native/exec.go
	integration-cli/docker_cli_exec_test.go
	runconfig/exec.go
Upstream-commit: 40b71adee390e9c06471b89ed845132b4ec80177
Component: engine
2015-05-26 14:12:16 -07:00
6982f607b4 c.Fatal won't fail and exit test inside a goroutine, errors should be handled outside with a channel
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4203230cbbf46238e38099c9073bdcad5f69a63f
Component: engine
2015-04-29 17:02:22 +02:00
5f37bbe0bd Implement daemon suite for integration-cli
For creating and stopping test daemons automatically.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 57464c32b99b36a2963fb37da86b9870c9a56145
Component: engine
2015-04-27 15:48:29 -07:00
558ffb7c99 Merge pull request #12659 from dqminh/exec-interactive-hang
reuse same code for setting pipes in run/exec
Upstream-commit: c26695cf8a220bf33ba0efe729e2ab4b05089ea8
Component: engine
2015-04-23 16:37:49 -07:00