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

package info (click to toggle)
runc 1.0.0~rc93%2Bds1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 3,172 kB
  • sloc: sh: 1,679; ansic: 1,039; makefile: 139
file content (24 lines) | stat: -rw-r--r-- 865 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
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
---
 tests/integration/dev.bats | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/integration/dev.bats b/tests/integration/dev.bats
index 11c53c9..3b371b5 100644
--- a/tests/integration/dev.bats
+++ b/tests/integration/dev.bats
@@ -59,6 +59,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": "rwm"}]
 			| .linux.devices = [{"path": "/dev/kmsg", "type": "c", "major": 1, "minor": 11}]
 			| .process.args |= ["sh"]