summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorccardenas <ccardenas@cvs.openbsd.org>2018-01-07 22:59:58 +0000
committerccardenas <ccardenas@cvs.openbsd.org>2018-01-07 22:59:58 +0000
commitb8bf2ba9cab44b1f009205be55cc66ec6a53a374 (patch)
tree132d1b53f26e26649a255b775ea1215e9c571034 /regress
parenta625380aa7f3b5c3edfa17ef2933ed3960803c75 (diff)
Add regression tests for cdrom keyword
ok mlarkin@
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.sbin/vmd/config/Makefile6
-rw-r--r--regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.conf6
-rw-r--r--regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.ok1
-rw-r--r--regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.conf8
-rw-r--r--regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.ok1
5 files changed, 19 insertions, 3 deletions
diff --git a/regress/usr.sbin/vmd/config/Makefile b/regress/usr.sbin/vmd/config/Makefile
index b52ca21416f..4b602083c0a 100644
--- a/regress/usr.sbin/vmd/config/Makefile
+++ b/regress/usr.sbin/vmd/config/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.3 2017/11/11 02:54:42 mlarkin Exp $
+# $OpenBSD: Makefile,v 1.4 2018/01/07 22:59:57 ccardenas Exp $
VMD ?= /usr/sbin/vmd
-VMD_PASS=boot-keyword memory-round memory-just-enough
+VMD_PASS=boot-keyword memory-round memory-just-enough cdrom-keyword
VMD_FAIL=kernel-keyword too-few-ram vm-name-too-long too-many-ifs \
boot-name-too-long disk-path-too-long too-many-disks \
- switch-no-interface switch-no-add
+ switch-no-interface switch-no-add cdrom-name-too-long
REGRESS_TARGETS=
diff --git a/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.conf b/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.conf
new file mode 100644
index 00000000000..70ad4e952aa
--- /dev/null
+++ b/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.conf
@@ -0,0 +1,6 @@
+# $OpenBSD: vmd-fail-cdrom-name-too-long.conf,v 1.1 2018/01/07 22:59:57 ccardenas Exp $
+# Fail on cdrom path (> 128)
+iso="/some/absolutepath/somewhere/abcdefghijklmnopqrstuvwxyz0123456789/abcdefghijklmnopqrstuvwxyz0123456789/abcdefghijklmnopqrstuvwxyz0123456789/cd62.iso"
+vm "x" {
+ cdrom $iso
+}
diff --git a/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.ok b/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.ok
new file mode 100644
index 00000000000..e94f1e3ef8c
--- /dev/null
+++ b/regress/usr.sbin/vmd/config/vmd-fail-cdrom-name-too-long.ok
@@ -0,0 +1 @@
+5: cdrom name too long
diff --git a/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.conf b/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.conf
new file mode 100644
index 00000000000..36db51eb885
--- /dev/null
+++ b/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.conf
@@ -0,0 +1,8 @@
+# $OpenBSD: vmd-pass-cdrom-keyword.conf,v 1.1 2018/01/07 22:59:57 ccardenas Exp $
+# Pass on cdrom keyword
+
+vm "x" {
+ memory 1G
+ cdrom "cd62.iso"
+ disable
+}
diff --git a/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.ok b/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.ok
new file mode 100644
index 00000000000..403d828b763
--- /dev/null
+++ b/regress/usr.sbin/vmd/config/vmd-pass-cdrom-keyword.ok
@@ -0,0 +1 @@
+configuration OK