Commit Graph

28 Commits

Author SHA1 Message Date
Kenta Tada 30817421ef Modify check-config.sh in accordance with Moby Project updates
This commit modifies check-config.sh to keep up with current kernel config.

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2018-11-30 16:38:19 +09:00
Akihiro Suda dd5eb3b9e3 make: validate C format
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-01-24 10:49:50 +09:00
Aleksa Sarai ed68ee1e10
release: import umoci's release.sh script
This script is far easier to use than the previous `make release`
target, not to mention that it also automatically signs all of the
artefacts and makes everything really easy to do for maintainers.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-08-16 14:35:52 +10:00
Michael Crosby 5930d5b427 Remove shfmt
We don't have that many scripts and for the amount of errors this is
causing on a weekly basis for contributors its not worth the overhead.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 11:08:44 -07:00
Aleksa Sarai 7b0c6e035a
*: fix shfmt
Recent changes in upstream shfmt have started causing our scripts to no
longer be "correctly formatted". Fix up with `shfmt -w`.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-07-04 01:44:16 +10: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
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
Daniel Martí b9d13467b9 Add shfmt to the validate make target
We need to run on a directory since shell files might have no extension.
There are few shell files, so speed should not be an issue.

Fixes #1166.
2016-11-17 13:55:59 +00:00
Daniel Martí cdb66f5421 Run shfmt on all shell files 2016-11-17 11:51:12 +00:00
Zhao Lei a9ec7c631c [check-config] No warning in blank argument
If user run current script whthout argument, the script will search
config in default dir list, but output following message:
 | # script/check-config.sh
 | warning: /proc/config.gz seems not a kernel config, searching other paths for kernel config ...
            ^^^^^^^^^^^^^^^
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 | ...

We can make output better by restruct the code struct:
1: Specify nothing
   Show info, and search default dir
2: Specify a config file
   Use it directly
3: Specify a wrong config file
   Show warning, and search default dir
4: Specify a dir
   Info, and search specified dir

Test:
 | # script/check-config.sh
 | info: no config specified, searching for kernel config ...
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 |
 | # script/check-config.sh /linux/.config
 | info: reading kernel config from /linux/.config ...
 |
 | # script/check-config.sh /linux/.configgg
 | warning: /linux/.configgg seems not a kernel config, searching other paths for kernel config ...
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 |
 | # script/check-config.sh /linux
 | info: input is a directory, searching for kernel config in this directory...
 | info: reading kernel config from /linux/.config ...
 |

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-09-06 16:29:43 +08:00
Zhao Lei 6683e16c03 [check-config] Search possible files in dir
If we give a dir as argument for check-config, it will treat the
dir as a config file, and grep config contents from the dir,
and get wrong result, as:
 | # script/check-config.sh /linux
 | info: reading kernel config from /linux ...
 |
 | Generally Necessary:
 | - cgroup hierarchy: properly mounted [/sys/fs/cgroup]
 | - CONFIG_NAMESPACES: missing
 | - CONFIG_NET_NS: missing
 | - CONFIG_PID_NS: missing
 | - CONFIG_IPC_NS: missing
 | - CONFIG_UTS_NS: missing
 | - CONFIG_CGROUPS: missing
 | - CONFIG_CGROUP_CPUACCT: missing
 | - CONFIG_CGROUP_DEVICE: missing
 | - CONFIG_CGROUP_FREEZER: missing
 | - CONFIG_CGROUP_SCHED: missing
 | ...

We can search possible config files in the dir,
after patch:
 | # script/check-config.sh /linux
 | warning: /linux seems not a kernel config, searching other paths for kernel config ...
 | info: reading kernel config from /linux/.config ...
 |
 | Generally Necessary:
 | - cgroup hierarchy: properly mounted [/sys/fs/cgroup]
 | - CONFIG_NAMESPACES: enabled
 | - CONFIG_NET_NS: enabled
 | - CONFIG_PID_NS: enabled
 | - CONFIG_IPC_NS: enabled
 | - CONFIG_UTS_NS: enabled
 | - CONFIG_CGROUPS: enabled
 | - CONFIG_CGROUP_CPUACCT: enabled
 | - CONFIG_CGROUP_DEVICE: enabled
 | - CONFIG_CGROUP_FREEZER: enabled
 | - CONFIG_CGROUP_SCHED: enabled
 | ...

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-09-06 15:54:45 +08:00
Qiang Huang 0c80599812 Combine runctestimage and runcimage
There is no need that keep them separate, it also
fixes #1006.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-30 09:46:47 +08:00
Michael Crosby b9bc020f0d Update Dockerfile to 1.6.2
With this change we need a fix in go 1.6 to allow us to receive SIGCONT
signals.

Ref: https://github.com/golang/go/issues/8953

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:10:47 -07:00
Aleksa Sarai 089b05a512 godeps: update seccomp to 60c9953736798c4a04e90d0f3da2f933d44fd4c4
This update allows more distributions to build runC with seccomp out of
the box (the include path and library paths are not always the Go
defaults).  In addition, update the test's Dockerfile to have pkg-config
installed.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-25 07:58:28 +10:00
Mrunal Patel d1997d99cd Merge pull request #826 from hqhq/hq_add_check_config
Add check_config.sh for runc
2016-05-18 16:42:30 -07: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
Qiang Huang a04c569b90 Add check_config.sh for runc
It copied from docker and removed unnecessary configs.

Closes: https://github.com/opencontainers/runc/issues/819

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-16 19:15:45 +08:00
Aleksa Sarai dd4a897f5d *: enable full test suite on make test
Enable the full test suite to run on `make test`. They also all run
inside a Docker container for maximum reproducibility.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-03 17:15:49 +10:00
Mike Brown e9f89e163f adds integration tests
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2016-04-21 19:09:27 -05:00
Tianon Gravi ca423f1348 Switch from mixed jessie/testing to jessie+backports for libseccomp
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2016-04-13 12:37:54 -07:00
Jessica Frazelle 5f89a91559
update go version to 1.5.3 in dockerfile and cleanup
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-15 10:56:34 -08:00
Antonio Murdaca 9ff7b82f9b script: test_Dockerfile: install criu from source
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-22 23:59:31 +02:00
Antonio Murdaca 8d38af2c33 script: test_Dockerfile: update criu version
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-18 17:51:03 +02:00
Matthew Heon 59264040bd Update tests to not error on library v2.2.0 and lower
As v2.1.0 is no longer required for successful testing, do not build it in the
Dockerfile - instead just use the version Ubuntu ships.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2015-08-13 09:36:21 -04:00
Matthew Heon 2ae581ae62 Convert Seccomp support to use Libseccomp
This removes the existing, native Go seccomp filter generation and replaces it
with Libseccomp. Libseccomp is a C library which provides architecture
independent generation of Seccomp filters for the Linux kernel.

This adds a dependency on v2.2.1 or above of Libseccomp.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2015-08-13 07:56:27 -04:00
Alexander Morozov 1735ad788f Replace dind with smaller script
It just mounts /tmp into tmpfs. We need this because criu tests has
problems on overlayfs.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-30 13:23:26 -07:00
Alexander Morozov adc6564042 Move test_Dockerfile to script dir
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00
Alexander Morozov 48ddedba65 Add ci target
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00