Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime-tools' validation tests #1758

Closed
wants to merge 1 commit into from

Conversation

alban
Copy link
Contributor

@alban alban commented Mar 15, 2018

For now, the results of the tests are printed without returning an error.

Signed-off-by: Alban Crequy alban@kinvolk.io


This is superseding #1757: trying to use Travis CI instead of CircleCI.

I see the following in the logs: https://travis-ci.org/kinvolk/runc/jobs/353911723

  348 passing (57s)
  82 pending
  13 failing

set -e
set -x

REPOPATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems overly complicated. The Makefile calling this script knows where the compiled runc is. Can't we set the RUNTIME enviroment variable in the Makefile rule?

RUNTIME=... script/oci-runtime-validation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I'll try that.

@alban
Copy link
Contributor Author

alban commented Apr 13, 2018

I rebased this PR and this ran the tests on Travis again. The tests show the following errors:

Issues in runc:

Limitation of the TravisCI platform

  • validation/linux_cgroups_blkio.t
  • validation/linux_cgroups_relative_blkio.t

Bug in the certification tests:

  • validation/linux_masked_paths.t
  • validation/linux_readonly_paths.t
  • validation/start.t

To investigate:

  • validation/linux_rootfs_propagation_unbindable.t
  • validation/linux_seccomp.t
  • validation/misc_props.t
  • validation/process_capabilities_fail.t
validation/delete.t ................................... 3/5 22s
  not ok attempting to `delete` a container that is not `stopped` MUST generate an error
    reference: 'https://github.com/opencontainers/runtime-spec/blob/v1.0.0/runtime.md#delete'
  
  not ok attempting to `delete` a container that is not `stopped` MUST have no effect on the container
    error: exit status 1
    reference: 'https://github.com/opencontainers/runtime-spec/blob/v1.0.0/runtime.md#delete'
    stderr: |
      container "b5f6712e-5a5e-4cdc-8e96-0032d8cfb327" does not exist
failed to create the container
container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:367: setting cgroup config for procHooks process caused \\\"failed to write 8:0 500 to blkio.weight_device: write /sys/fs/cgroup/blkio/cgrouptest/blkio.weight_device: operation not supported\\\"\""
exit status 1
validation/linux_cgroups_blkio.t ...................... 0/1
  not ok validation/linux_cgroups_blkio.t
    timeout: 30000
    file: validation/linux_cgroups_blkio.t
    command: validation/linux_cgroups_blkio.t
    args: []
    stdio:
      - 0
      - pipe
      - 2
    cwd: /home/travis/gopath/src/github.com/opencontainers/runtime-tools
    exitCode: 1
failed to create the container
container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:367: setting cgroup config for procHooks process caused \\\"failed to write 8:0 500 to blkio.weight_device: write /sys/fs/cgroup/blkio/testdir/cgrouptest/container/blkio.weight_device: operation not supported\\\"\""
exit status 1
validation/linux_cgroups_relative_blkio.t ............. 0/1
  not ok validation/linux_cgroups_relative_blkio.t
    timeout: 30000
    file: validation/linux_cgroups_relative_blkio.t
    command: validation/linux_cgroups_relative_blkio.t
    args: []
    stdio:
      - 0
      - pipe
      - 2
    cwd: /home/travis/gopath/src/github.com/opencontainers/runtime-tools
    exitCode: 1
validation/linux_masked_paths.t ................... 252/275
  not ok test count !== plan
    +++ found                                                           
    --- wanted                                                          
    -1                                                                  
    +274                                                                
    results:
      ok: false
      count: 274
      pass: 274
      fail: 1
      bailout: false
      todo: 0
      skip: 22
      plan:
        start: null
        end: null
        skipAll: false
        skipReason: ''
        comment: ''
      failures:
        - tapError: no plan
validation/linux_readonly_paths.t ................. 252/283
  not ok test count !== plan
failed to create the container
container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:46: preparing rootfs caused \\\"invalid argument\\\"\""
exit status 1
validation/linux_rootfs_propagation_shared.t ...... 252/282
  not ok shared root propogation exposes "/target672871882/mount411111073/example250057595"
failed to create the container
container_linux.go:348: starting container process caused "error adding seccomp rule for syscall personality: requested action matches default action of filter"
exit status 1
validation/linux_rootfs_propagation_unbindable.t ...... 0/1
  not ok validation/linux_rootfs_propagation_unbindable.t
    timeout: 30000
    file: validation/linux_rootfs_propagation_unbindable.t
    command: validation/linux_rootfs_propagation_unbindable.t
    args: []
    stdio:
      - 0
      - pipe
      - 2
    cwd: /home/travis/gopath/src/github.com/opencontainers/runtime-tools
    exitCode: 1
validation/linux_seccomp.t ............................ 0/1
  not ok validation/linux_seccomp.t
    timeout: 30000
    file: validation/linux_seccomp.t
    command: validation/linux_seccomp.t
    args: []
    stdio:
      - 0
      - pipe
      - 2
    cwd: /home/travis/gopath/src/github.com/opencontainers/runtime-tools
    exitCode: 1
validation/misc_props.t ............................... 2/3 3s
  not ok runtimes that are reading or processing this configuration file MUST generate an error when invalid or unsupported values are encountered
    reference: >-
      https://github.com/opencontainers/runtime-spec/blob/v1.0.0/config.md#valid-values
Any value which cannot be mapped to a relevant kernel interface MUST cause an error
Refer to: https://github.com/opencontainers/runtime-spec/blob/v1.0.0/config.md#linux-process
validation/process_capabilities_fail.t ............ 252/288
  not ok validation/process_capabilities_fail.t
    timeout: 30000
    file: validation/process_capabilities_fail.t
    command: validation/process_capabilities_fail.t
    args: []
    stdio:
      - 0
      - pipe
      - 2
    cwd: /home/travis/gopath/src/github.com/opencontainers/runtime-tools
    exitCode: 1
exit status 2
validation/start.t .................................... 6/7
  not ok test count !== plan

For now, the results of the tests are printed without returning an error.

Signed-off-by: Alban Crequy <alban@kinvolk.io>
@alban
Copy link
Contributor Author

alban commented Jul 19, 2018

I have run the tests again on my laptop:

Issues in runc:

@AkihiroSuda
Copy link
Member

What's current status?

@AkihiroSuda
Copy link
Member

ping

@alban
Copy link
Contributor Author

alban commented Jul 25, 2022

Obsolete patch: the CI significantly changed since 2018.

@alban alban closed this Jul 25, 2022
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.

3 participants