Commit Graph

156 Commits

Author SHA1 Message Date
Aleksa Sarai ffe5cdc4f1
tests: add various !terminal tests
Previously we weren't testing that detached io works properly -- which
will be quite important in the case for rootless containers.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-10-25 00:12:21 +11:00
Mrunal Patel d5fc10a011 Merge pull request #1608 from crosbymichael/gids
add additional-gids to runc exec
2017-10-16 09:18:52 -07:00
Michael Crosby ff4481dbf6 Merge pull request #1540 from cloudfoundry-incubator/rootless-cgroups
Support cgroups with limits as rootless
2017-10-16 12:03:49 -04:00
Aleksa Sarai 23f4d3161b
tests: improve rootless_cg testing
This ensures that we don't hard-code the set of cgroups on the host, as
well as making the permissions granted by rootless.sh much more
restrictive (to improve the scope of testing).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-10-16 20:46:17 +11:00
Michael Crosby 5f9284cb98 Check for negative gid
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-11 11:10:12 -04:00
Sumit Sanghrajka f55f79d6ba Use Int64SliceFlag instead of StringFlag to get additional gids.
Signed-off-by: Sumit Sanghrajka <sumit.sanghrajka@gmail.com>
2017-10-10 15:56:17 -04:00
Sumit Sanghrajka 7a386c2b60 Add --additional-gids to runc exec.
This flag allows specifying additional gids for the process.
Without this flag, the user will have to provide process.json which allows additional gids.
Closes #1306

Signed-off-by: Sumit Sanghrajka <sumit.sanghrajka@gmail.com>
2017-10-10 15:56:04 -04:00
Mrunal Patel beb8716fcb Merge pull request #1528 from leitwolf7/fix-integration
make localintegration fails on Ubuntu 17.04
2017-10-10 12:41:40 -07:00
Will Martin ca4f427af1 Support cgroups with limits as rootless
Signed-off-by: Ed King <eking@pivotal.io>
Signed-off-by: Gabriel Rosenhouse <grosenhouse@pivotal.io>
Signed-off-by: Konstantinos Karampogias <konstantinos.karampogias@swisscom.com>
2017-10-05 11:22:54 +01:00
Konstantinos Karampogias 605dc5c811 Set initial console size based on process spec
Signed-off-by: Will Martin <wmartin@pivotal.io>
Signed-off-by: Petar Petrov <pppepito86@gmail.com>
Signed-off-by: Ed King <eking@pivotal.io>
Signed-off-by: Roberto Jimenez Sanchez <jszroberto@gmail.com>
Signed-off-by: Thomas Godkin <tgodkin@pivotal.io>
2017-10-04 12:32:16 +01:00
leitwolf7 e6e2439261 Merge branch 'master' into fix-integration 2017-09-21 22:25:58 +02:00
Mrunal Patel d5b43c3981 Merge pull request #1455 from dqminh/epoll-io
tty: move IO of master pty to be done with epoll
2017-09-11 11:32:42 -07:00
Aleksa Sarai eb5bd4fa6a
tests: add tests for rootless multi-mapping configurations
Enable several previously disabled tests (for the idmap execution mode)
for rootless containers, in addition to making all tests use the
additional mappings. At the moment there's no strong need to add any
additional tests purely for rootless_idmap.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-09-09 12:45:33 +10:00
Aleksa Sarai d0aec23c7e
tests: generalise rootless runner
This is necessary in order to add proper opportunistic tests, and is a
placeholder until we add tests for new{uid,gid}map configurations.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-09-09 12:45:33 +10:00
Adrian Reber ec260653b7 lazy-migration: add test case
The lazy-pages test case is not as straight forward as the other test
cases. This is related to the fact that restoring requires a different
name if restored on the same host. During 'runc checkpoint' the
container is not destroyed before all memory pages have been transferred
to the destination and thus the same container name cannot be used.

As real world usage will rather migrate a container from one system to
another than lazy migrate a container on the same host this is only
problematic for this test case.

Another reason is that it requires starting 'runc checkpoint' and 'criu
lazy-pages' in the background as those process need to be running to
start the final restore 'runc restore'.

CRIU upstream is currently discussing to automatically start 'criu
lazy-pages' which would simplify the lazy-pages test case a bit.

The handling and checking of the background processes make the test case
not the most elegant as at one point a 'sleep 2' is required to make
sure that 'runc checkpoint' had time to do its thing before looking at
log files.

Before running the actual test criu is called in feature checking mode
to make sure lazy migration is in the test case criu enabled. If not,
the test is skipped.

Signed-off-by: Adrian Reber <areber@redhat.com>
2017-09-06 12:35:39 +00:00
Daniel Dao 91eafcbc65
tty: move IO of master pty to be done with epoll
This moves all console code to use github.com/containerd/console library to
handle console I/O. Also move to use EpollConsole by default when user requests
a terminal so we can still cope when the other side temporarily goes away.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-07-28 12:35:02 +01:00
leitwolf7 9c36ffbcb5 make localintegration fails on Ubuntu 17.04
Fix 2 string comparision issues in output validation.

Signed-off-by: leitwolf7 <leitwolf@wolke7.net>
2017-07-19 16:12:19 -04:00
Zhang Wei 9192b052b2 Fix integration when missing criu
If criu isn't installed in the host, integration tests won't be able
to go on, it should skip checkpoint/restore tests instead of interrupt.

Output before:

```
$ make localintegration
bats -t tests/integration
/usr/lib/bats/bats-exec-suite: line 20: let: count+=: syntax error:
operand expected (error token is "+=")
Makefile:103: recipe for target 'localintegration' failed
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-07-14 20:15:20 +08:00
Daniel Dao 900f6f46e1
print out errors in checkpoint/restore log
print out errors in checkpoint/restore log when it failed similar to how we did i
in `checkpoint --pre-dump` tests

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-06-25 16:01:36 +01:00
Andrei Vagin 76d87976d9 tests: remove wait_for_container from checkpoint.bats
It isn't required there, all operations what are called are synchronous.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-10 02:50:45 +03:00
Andrei Vagin a541df7cb7 tests: redirect runc log message to stderr
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-10 02:50:45 +03:00
Michael Crosby 854b41d81e Update spec to 239c4e44f2
This provides updates to runc for the spec changes with *Process and
OOMScoreAdj

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 16:29:47 -07:00
Christy Perez 9ed7e9b176 shfmt'ing files
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2017-05-24 16:43:08 -05:00
Mrunal Patel 639454475c Merge pull request #1355 from avagin/cr-console
Dump and restore containers with external terminals
2017-05-18 11:22:52 -07:00
Antonio Murdaca d1a743674a
Ignore error when force deleting a non-existing container
This patch mimics the behavior of "rm -rf" so that if a container
doesn't exist and you force delete it, it won't error out.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-16 22:23:00 +02:00
Andrei Vagin a9e15e7e07 criu: check that stdout, stdin pipes are restore correctly
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-03 00:55:24 +03:00
Andrei Vagin abd0515816 tests: don't call wait_for_container after synchronous operations
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-02 21:48:07 +03:00
Andrei Vagin 459a17b838 test: check C/R for a container with an external terminal
We have two test cases with and without pre-dump. Terminals and
pre-dump features are orthogonal, so we can modify one of these test cases.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-02 04:48:47 +03:00
Kenfe-Mickael Laventure 1e7e276aff Allow updating container pids limit
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-28 06:44:44 -07:00
Aleksa Sarai d9807ae420
vendor: clean up to be better written
vndr doesn't support non-top-level imports, and in addition we really
should be using tagged releases far more than we currently are
(*especially* when it come to the OCI specs).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-04-25 10:46:48 +10:00
Aleksa Sarai ba38383a39
tests: add rootless integration tests
This adds targets for rootless integration tests, as well as all of the
required setup in order to get the tests to run. This includes quite a
few changes, because of a lot of assumptions about things running as
root within the bats scripts (which is not true when setting up rootless
containers).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-03-23 20:46:22 +11:00
Aleksa Sarai 2ce33574d0
integration: added root requires
This is in preperation of allowing us to run the integration test suite
on rootless containers.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-03-23 20:46:21 +11:00
Qiang Huang e0c7b6ceb7 Only allow single container operation
As per the discussions in #1156 , we think it's a bad
idea to allow multi container operations in runc. So
revert it.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-03-08 10:02:39 +08:00
Qiang Huang cf883a87e7 Merge pull request #1340 from dqminh/vndr-take2
Carry #998: Use vndr tool for vendoring
2017-02-24 21:48:51 -08:00
Qiang Huang 707dd48b2f Merge pull request #1001 from x1022as/predump
add pre-dump and parent-path to checkpoint
2017-02-24 10:55:06 -08:00
Alexander Morozov 993cbf9db0
move from Godeps to vndr
This uses the standard go vendor location instead of old Godeps
location.

Also remove usage of symlink GOPATH. Since our README mentions that you
should build it inside GOPATH, i think its a reasonable to assume that
you dont need to create a tmp GOPATH.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-02-24 11:25:21 +00:00
Mohammad Arab 18ebc51b3c Reset Swap when memory is set to unlimited (-1)
Kernel validation fails if memory set to -1 which is unlimited but
swap is not set so.

Signed-off-by: Mohammad Arab <boynux@gmail.com>
2017-02-15 08:11:57 +01:00
Deng Guangxing 98f004182b add pre-dump and parent-path to checkpoint
CRIU gets pre-dump to complete iterative migration.
pre-dump saves process memory info only. And it need parent-path
to specify the former memory files.

This patch add pre-dump and parent-path arguments to runc checkpoint

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-02-14 19:45:07 +08:00
Zhang Wei 51baedf3f3 Add integration for update rt period and runtime
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-12-27 17:57:13 +08:00
Aleksa Sarai b0fc85e99d
tests: add tty bats integration
Add some tests to ensure that we always get a proper console (created
inside the container). This is done by checking that the
/proc/self/fd/[012] "symlinks" are always referencing something in
/dev/pts/*.

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:37 +11:00
Aleksa Sarai 972c176ae4
tests: fix all the things
This fixes all of the tests that were broken as part of the console
rewrite. This includes fixing the integration tests that used TTY
handling inside libcontainer, as well as the bats integration tests that
needed to be rewritten to use recvtty (as they rely on detached
containers that are running).

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:37 +11:00
Aleksa Sarai bda3055055
*: update busybox test rootfs
Switch to the actual source of the official Docker library of images, so
that we have a proper source for the test filesystem. In addition,
update to the latest released version (1.25.0 [2016-06-23]) so that we
can use more up-to-date applets in our tests (such as stat(3)).

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:36 +11:00
Daniel Martí cdb66f5421 Run shfmt on all shell files 2016-11-17 11:51:12 +00:00
Mrunal Patel 188312013f Merge pull request #1128 from datawolf/exec-with-pid-file
fix the pid-file option for runc exec/run/create command
2016-11-10 22:39:42 +00:00
rajasec 2b62358140 Adding update command in help-bats
Signed-off-by: rajasec <rajasec79@gmail.com>
2016-11-07 14:43:55 +05:30
Qiang Huang e3ba943b6d Merge pull request #1173 from WeiZhang555/update-rt-resources
Allow update rt_period_us and rt_runtime_us
2016-11-07 11:05:45 +08:00
Zhang Wei 6cd425be2b Allow update rt_period_us and rt_runtime_us
Currently runc already supports setting realtime runtime and period
before container processes start, this commit will add update support
for realtime scheduler resources.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-11-04 18:57:22 +08:00
Wang Long d5525cc38d add test cases for exec command
This patch add test `--cwd`, `--env`, `--user` option for exec command.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-04 14:15:47 +08:00
Wang Long 8676c75442 Fix the pid-file option for runc run/exec/create command
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-02 14:08:32 +08:00
Qiang Huang b15668b36d Fix all typos found by misspell
I use the same tool (https://github.com/client9/misspell)
as Daniel used a few days ago, don't why he missed these
typos at that time.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 14:14:42 +08:00
Wang Long 2c74f86e23 Employ jq and state command to make sure that pid-file contains the right information
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-25 15:48:38 +08:00
Qiang Huang 850b9c0b50 Merge pull request #1132 from datawolf/add-integration-test-for-create
add test cases for create command
2016-10-22 17:46:33 +08:00
Wang Long 5aef160c5a add test cases for list command
This patch add test `-q` option for list command.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-20 16:45:34 +08:00
Wang Long 596a4c397c add test cases for create command
This patch add test `--pid-file` option for create command.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-20 16:23:27 +08:00
Aleksa Sarai 6e97f3ad69
tests: mask: use test paths rather than /sys
In certain circumstances (such as the rootless containers patchset), it
is not possible to test things using /sys/firmware. In addition, we
should be testing our own functionality rather than testing protection
against /sys attacks (for which the system might already have extra
protections).

Instead, just make some fake paths in the rootfs that we then mask.
Oddly I noticed that one of the errors changed when doing this (because
before we tested removing a file from /sys/firmware which is -EPERM). So
the old test was broken.

Fixes: 53179559a1 ("MaskPaths: support directory")
Fixes: #1068
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-19 05:59:50 +11:00
Michael Crosby 4dcc0466e2 Merge pull request #1074 from datawolf/multi-containers
start multi-containers with `runc start` command
2016-10-17 14:31:04 -07:00
Wang Long 2f5c0afbbc pause and resume multi-containers
With this patch, `runc pasue` and `runc resume` can
pause and resume multi-containers.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-17 19:44:08 +08:00
Wang Long 74bfe500e4 start mulit-containers with `runc start` command
With this patch, `runc start` command can start mulit-containers
at one command this patch also checks the argument of the `start`
command.

root@ubuntu:# runc list
ID          PID         STATUS      BUNDLE         CREATED
a           0           stopped     /mycontainer   2016-09-23T08:56:42.754026567Z
b           62979       created     /mycontainer   2016-09-23T09:01:36.421976458Z
c           62993       running     /mycontainer   2016-09-23T09:01:38.105940389Z
d           63006       created     /mycontainer   2016-09-23T09:01:39.65441942Z
e           63020       created     /mycontainer   2016-09-23T09:01:40.989995515Z
root@ubuntu:# runc start
runc: "start" requires a minimum of 1 argument
root@ubuntu:# runc start a b c d e f
cannot start a container that has run and stopped
cannot start an already running container
container f is not exist
all or part of the containers start failed
root@ubuntu:# runc list
ID          PID         STATUS      BUNDLE         CREATED
a           0           stopped     /mycontainer   2016-09-23T08:56:42.754026567Z
b           62979       running     /mycontainer   2016-09-23T09:01:36.421976458Z
c           62993       running     /mycontainer   2016-09-23T09:01:38.105940389Z
d           63006       running     /mycontainer   2016-09-23T09:01:39.65441942Z
e           63020       running     /mycontainer   2016-09-23T09:01:40.989995515Z

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-08 11:57:25 +08:00
Qiang Huang 98afb7390a Add integration test for ps command
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-09-29 18:33:32 +08:00
Qiang Huang d9fec4c63b Merge pull request #1065 from keloyang/remove-ps-workaround
Remove the workaround which add a -- flag to runc ps command
2016-09-28 17:09:58 +08:00
Qiang Huang 2940d2e2e9 Merge pull request #1069 from datawolf/add-unittest
[integration] add testcases for `runc delete` command
2016-09-27 19:20:36 +08:00
Shukui Yang cc0e2d567f Remove the workaround which add a -- flag to runc exec command and add integration for exec ls -la
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-24 12:21:50 +08:00
Shukui Yang 993126259c Remove the workaround which add a -- flag to runc ps command and add integration for ps -eaf
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-24 12:20:52 +08:00
Akihiro Suda 53179559a1 MaskPaths: support directory
For example, the /sys/firmware directory should be masked because it can contain some sensitive files:
  - /sys/firmware/acpi/tables/{SLIC,MSDM}: Windows license information:
  - /sys/firmware/ibft/target0/chap-secret: iSCSI CHAP secret

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-23 16:14:41 +00:00
Wang Long e72a4e5bd2 [integration] add testcases for `runc delete` command
this patch add two testcases for the `runc delete` with
multi-containers. see : https://github.com/opencontainers/runc/pull/1053

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-09-23 15:35:50 +08:00
Qiang Huang a2a6e828a9 Merge pull request #1048 from crosbymichael/state-json
Use same state object for state and list
2016-09-22 19:48:43 +08:00
Mrunal Patel ce5d8cf941 Merge pull request #1056 from datawolf/remove-duplicate-test
remove duplicate test command on integration
2016-09-20 09:57:39 -07:00
Michael Crosby 4350d90043 Use same state object for state and list
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-19 09:18:24 -07:00
Wang Long d852210a7e remove duplicate test command on integration
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-09-19 11:18:38 +00:00
Qiang Huang c5d33b1ac7 Fix update cpuset on single processor box
Fixes: #1050

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-09-18 10:44:46 +08:00
Adam Thomason 98727fbb63 Update spec config path
Tracks schema/schema.json → schema/config-schema.json rename in
59ede1a6ac

Signed-off-by: Adam Thomason <ad@mthomason.net>
2016-09-11 16:48:12 -07:00
Aleksa Sarai 91ff092487 Merge pull request #972 from brauner/2016-08-05/add_requires_for_cgroups_kmem
tests: add requires cgroups_kmem
2016-08-12 18:50:59 +10:00
Christian Brauner 7c59766049
tests: add requires cgroups_kmem
On older kernels or kernels were CONFIG_MEMCG_KMEM is not set some cgroup tests
cannot be run. We simply test for the existence of the file
"${CGROUP_BASE_PATH}/memory/memory.kmem.limit_in_bytes" which should be
sufficient to conclude that CONFIG_MEMCG_KMEM is not set.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-10 15:17:22 +02:00
Qiang Huang 75f765e961 Use absolute cgroup path for integration test
So we can pass the test in container os local or systemd
environment.

Also fixes: #967

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-07 10:47:09 +08:00
Johnny Bieren 2448451a18 Change git -C reset to git reset w/ wking suggestion. fix indentation
Signed-off-by: Johnny Bieren <jbieren@redhat.com>
2016-07-26 09:22:14 -04:00
Kenfe-Mickael Laventure 9fc9d10e57 Add `--force` flag to `runc delete`
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-30 07:55:44 -07:00
Aleksa Sarai c77eb1c413 tests: add tests with {u,g}id != 0
This is a very important testcase, as certain permission issues can
arise if we don't test this automatically.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-06-18 12:16:42 +10:00
Mrunal Patel 96c15e6e3c Merge pull request #889 from cyphar/tests-provide-debug
tests: add debug information for failing tests
2016-06-13 16:04:44 -07:00
Mrunal Patel 10d7cfb50e bats: Fix spec validation test
Use the commit that we have in Godeps.json rather than relying on
runtime-spec HEAD

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-06-09 13:16:00 -07:00
Aleksa Sarai 7222ba6587 tests: add debug information for failing tests
bats doesn't automatically print the entirety of $output when an error
has occurred in a test. This makes debugging much harder, so add to the
runc wrapper some more debug information to make maintainers' lives
easier.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-06-07 18:52:20 +10:00
rajasec 0307c88ee9 Updating README for starting the container
Signed-off-by: rajasec <rajasec79@gmail.com>

Updating README for starting the container

Signed-off-by: rajasec <rajasec79@gmail.com>

Updating README files for container start

Signed-off-by: rajasec <rajasec79@gmail.com>

updating README files for container start

Signed-off-by: rajasec <rajasec79@gmail.com>
2016-06-05 14:41:58 +05:30
Michael Crosby c5060ff303 Merge pull request #827 from crosbymichael/create-start
Implement create and start
2016-06-03 10:38:03 -07:00
Michael Crosby 1d61abea46 Allow delete of created container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-02 12:26:12 -07:00
Michael Crosby 06fab0f860 Add integration tests for create/start
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:10:47 -07:00
Michael Crosby efcd73fb5b Fix signal handling for unit tests
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:10:47 -07:00
Michael Crosby 75fb70be01 Rename start to run
`runc run` is the command that will create and start a container in one
single command.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:06:41 -07:00
Qiang Huang 71511dc155 Improve update memory
Support update memory with:
runc update --memory 50M container-id

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-30 18:56:10 +08:00
Aleksa Sarai 72ee54918f integration: add requires() function
This is similar to the testRequires() function in the Docker test suite.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-26 19:17:39 +10:00
Aleksa Sarai 4fd8a7aafa bats: refactor run "$RUNC" -> runc
This makes it much simpler to write tests, and you don't have to worry
about some of the oddness with bats.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-26 19:17:39 +10:00
Mrunal Patel aa7e27eac9 Merge pull request #828 from hqhq/hq_fix_update_kmem
Fix update kernel memory test
2016-05-24 09:58:09 -07:00
Mrunal Patel 60eb77dd3c Merge pull request #810 from hqhq/hq_update_cli
Update cli package
2016-05-20 20:46:59 -07:00
Qiang Huang 396c88215c Fix update kernel memory test
Since kernel 4.6, we can update kernel memory without
initialization, because it's accounted by default.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-17 20:51:02 -04:00
Aleksa Sarai f89dcc665b integration: remove pointless *_inroot invocations
--root invocations make tests harder to read, and they only serve a very
specific purpose. As such, remove them from the `runc update` tests
because they don't serve a purpose.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
Aleksa Sarai c823933fe1 integration: fix cgroup parsing
On some systems, the cgroup hierarchies are grouped together
(cpu,cpuacct). In order to avoid fake failures, update the cgroup
parsing to just check whether or not the mountinfo options *contain* the
cgroup type.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
Aleksa Sarai 39aa5d0b1a tests: remove trailing whitespace
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
rajasec 8839f9f70b Adding kernel mem tcp for update command
Signed-off-by: rajasec <rajasec79@gmail.com>

Adding kernel mem tcp for update command

Signed-off-by: rajasec <rajasec79@gmail.com>

Fixing update.bats to reduce the TCP value

Signed-off-by: rajasec <rajasec79@gmail.com>

Updated the kernelTCP in bats as per json

Signed-off-by: rajasec <rajasec79@gmail.com>

Fixed some minor issue in bats file

Signed-off-by: rajasec <rajasec79@gmail.com>

Rounded off to right bytes for kernel TCP

Signed-off-by: rajasec <rajasec79@gmail.com>

Updating man file for update command

Signed-off-by: rajasec <rajasec79@gmail.com>
2016-05-10 14:11:36 +05:30
Qiang Huang 8477638aab Update cli package
The old one has bug when showing help message for IntFlags.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-10 13:58:09 +08:00
Kenfe-Mickael Laventure d78ae51a2d Add test for cgroup memory.kmem.limit_in_bytes handling
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-06 08:05:15 -07:00
Kenfe-Mickael Laventure 4190e5a920 Add new `update` command to runc.
This command allow users to update some of a container cgroups
parameters.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-06 08:05:15 -07:00
Aleksa Sarai 07d062bb7b Merge pull request #782 from hqhq/hq_specs_name
Change specs to runtime-spec in integration test
2016-04-26 23:08:38 +00:00