diff options
author | ccardenas <ccardenas@cvs.openbsd.org> | 2018-09-09 04:11:56 +0000 |
---|---|---|
committer | ccardenas <ccardenas@cvs.openbsd.org> | 2018-09-09 04:11:56 +0000 |
commit | 34f0b48ad209c787730cd57ba5bb0cb843f0d6f7 (patch) | |
tree | 0f5e07a6bdba616e5394a8339d45109af11c098b /regress/usr.sbin | |
parent | 9f2c0e3fb65afa1963763a3a22dd2774e36dc916 (diff) |
Add tests for disk format.
Thanks to Ori Bernstein.
Diffstat (limited to 'regress/usr.sbin')
7 files changed, 32 insertions, 3 deletions
diff --git a/regress/usr.sbin/vmd/config/Makefile b/regress/usr.sbin/vmd/config/Makefile index 2b41e49ac83..c829731e3be 100644 --- a/regress/usr.sbin/vmd/config/Makefile +++ b/regress/usr.sbin/vmd/config/Makefile @@ -1,11 +1,13 @@ -# $OpenBSD: Makefile,v 1.5 2018/07/20 22:18:49 bluhm Exp $ +# $OpenBSD: Makefile,v 1.6 2018/09/09 04:11:55 ccardenas Exp $ VMD ?= /usr/sbin/vmd -VMD_PASS=boot-keyword memory-round memory-just-enough cdrom-keyword +VMD_PASS=boot-keyword memory-round memory-just-enough cdrom-keyword \ + format-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 cdrom-name-too-long + switch-no-interface switch-no-add cdrom-name-too-long \ + bad-format missing-format REGRESS_TARGETS= diff --git a/regress/usr.sbin/vmd/config/vmd-fail-bad-format.conf b/regress/usr.sbin/vmd/config/vmd-fail-bad-format.conf new file mode 100644 index 00000000000..8edc0e7361c --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-fail-bad-format.conf @@ -0,0 +1,8 @@ +# $OpenBSD: vmd-fail-bad-format.conf,v 1.1 2018/09/09 04:11:55 ccardenas Exp $ +# Pass on cdrom keyword + +vm "x" { + memory 1G + disk "foo.img" format "rotten" + disable +} diff --git a/regress/usr.sbin/vmd/config/vmd-fail-bad-format.ok b/regress/usr.sbin/vmd/config/vmd-fail-bad-format.ok new file mode 100644 index 00000000000..1f79afafa1e --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-fail-bad-format.ok @@ -0,0 +1 @@ +6: unrecognized disk format rotten diff --git a/regress/usr.sbin/vmd/config/vmd-fail-missing-format.conf b/regress/usr.sbin/vmd/config/vmd-fail-missing-format.conf new file mode 100644 index 00000000000..5e1fd7af968 --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-fail-missing-format.conf @@ -0,0 +1,8 @@ +# $OpenBSD: vmd-fail-missing-format.conf,v 1.1 2018/09/09 04:11:55 ccardenas Exp $ +# Pass on cdrom keyword + +vm "x" { + memory 1G + disk "foo.img" format + disable +} diff --git a/regress/usr.sbin/vmd/config/vmd-fail-missing-format.ok b/regress/usr.sbin/vmd/config/vmd-fail-missing-format.ok new file mode 100644 index 00000000000..c88cb26bf39 --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-fail-missing-format.ok @@ -0,0 +1 @@ +6: syntax error diff --git a/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.conf b/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.conf new file mode 100644 index 00000000000..fbfb51098ad --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.conf @@ -0,0 +1,8 @@ +# $OpenBSD: vmd-pass-format-keyword.conf,v 1.1 2018/09/09 04:11:55 ccardenas Exp $ +# Pass on cdrom keyword + +vm "x" { + memory 1G + disk "foo.img" format "raw" + disable +} diff --git a/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.ok b/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.ok new file mode 100644 index 00000000000..403d828b763 --- /dev/null +++ b/regress/usr.sbin/vmd/config/vmd-pass-format-keyword.ok @@ -0,0 +1 @@ +configuration OK |