File: 0003-skip-integration-when-no-dev-kmsg.patch

package info (click to toggle)
runc 1.3.0%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,672 kB
  • sloc: sh: 2,236; ansic: 1,125; makefile: 200
file content (26 lines) | stat: -rw-r--r-- 887 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Shengjing Zhu <zhsj@debian.org>
Date: Thu, 4 Feb 2021 17:35:38 +0800
Subject: skip integration when no /dev/kmsg

By default, privileged lxc container doesn't have /dev/kmsg

Forwarded: not-needed
---
 tests/integration/dev.bats | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/integration/dev.bats b/tests/integration/dev.bats
index 6493c1c..409a417 100644
--- a/tests/integration/dev.bats
+++ b/tests/integration/dev.bats
@@ -72,6 +72,10 @@ function teardown() {
 @test "runc run [device cgroup allow rw char device]" {
 	requires root
 
+	if [[ ! -c /dev/kmsg ]]; then
+		skip "no /dev/kmsg"
+	fi
+
 	update_config ' .linux.resources.devices = [{"allow": false, "access": "rwm"},{"allow": true, "type": "c", "major": 1, "minor": 11, "access": "rw"}]
 			| .linux.devices = [{"path": "/dev/kmsg", "type": "c", "major": 1, "minor": 11}]
 			| .process.args |= ["sh"]