summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.include3
-rwxr-xr-xtests/docker/test-full79
-rw-r--r--tests/qapi-schema/doc-bad-section.err0
-rw-r--r--tests/qapi-schema/doc-bad-section.exit1
-rw-r--r--tests/qapi-schema/doc-bad-section.json11
-rw-r--r--tests/qapi-schema/doc-bad-section.out13
-rw-r--r--tests/qapi-schema/doc-good.json1
-rw-r--r--tests/qapi-schema/doc-good.out4
-rw-r--r--tests/qapi-schema/doc-good.texi11
-rw-r--r--tests/qapi-schema/test-qapi.py6
-rw-r--r--tests/test-uuid.c8
11 files changed, 44 insertions, 93 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index b4bcc872f2..f8e20d9f5d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -416,6 +416,7 @@ qapi-schema += command-int.json
 qapi-schema += comments.json
 qapi-schema += doc-bad-alternate-member.json
 qapi-schema += doc-bad-command-arg.json
+qapi-schema += doc-bad-section.json
 qapi-schema += doc-bad-symbol.json
 qapi-schema += doc-bad-union-member.json
 qapi-schema += doc-before-include.json
@@ -433,10 +434,10 @@ qapi-schema += doc-invalid-end2.json
 qapi-schema += doc-invalid-return.json
 qapi-schema += doc-invalid-section.json
 qapi-schema += doc-invalid-start.json
-qapi-schema += doc-missing.json
 qapi-schema += doc-missing-colon.json
 qapi-schema += doc-missing-expr.json
 qapi-schema += doc-missing-space.json
+qapi-schema += doc-missing.json
 qapi-schema += doc-no-symbol.json
 qapi-schema += double-data.json
 qapi-schema += double-type.json
diff --git a/tests/docker/test-full b/tests/docker/test-full
index 816d5a3eec..b4e42d25d7 100755
--- a/tests/docker/test-full
+++ b/tests/docker/test-full
@@ -1,8 +1,8 @@
 #!/bin/bash
 #
-# Compile all the targets with as many features enabled as possible
+# Compile all the targets.
 #
-# Copyright 2016, 2017 Red Hat Inc.
+# Copyright (c) 2016 Red Hat Inc.
 #
 # Authors:
 #  Fam Zheng <famz@redhat.com>
@@ -13,77 +13,6 @@
 
 . common.rc
 
-cd "$BUILD_DIR" || exit 1
+cd "$BUILD_DIR"
 
-build_qemu \
-    --enable-attr \
-    --enable-bluez \
-    --enable-brlapi \
-    --enable-bsd-user \
-    --enable-bzip2 \
-    --enable-cap-ng \
-    --enable-coroutine-pool \
-    --enable-crypto-afalg \
-    --enable-curl \
-    --enable-curses \
-    --enable-debug \
-    --enable-debug-info \
-    --enable-debug-tcg \
-    --enable-docs \
-    --enable-fdt \
-    --enable-gcrypt \
-    --enable-glusterfs \
-    --enable-gnutls \
-    --enable-gprof \
-    --enable-gtk \
-    --enable-guest-agent \
-    --enable-jemalloc \
-    --enable-kvm \
-    --enable-libiscsi \
-    --enable-libnfs \
-    --enable-libssh2 \
-    --enable-libusb \
-    --enable-linux-aio \
-    --enable-linux-user \
-    --enable-live-block-migration \
-    --enable-lzo \
-    --enable-modules \
-    --enable-numa \
-    --enable-opengl \
-    --enable-pie \
-    --enable-profiler \
-    --enable-qom-cast-debug \
-    --enable-rbd \
-    --enable-rdma \
-    --enable-replication \
-    --enable-sdl \
-    --enable-seccomp \
-    --enable-smartcard \
-    --enable-snappy \
-    --enable-spice \
-    --enable-stack-protector \
-    --enable-system \
-    --enable-tcg \
-    --enable-tcg-interpreter \
-    --enable-tools \
-    --enable-tpm \
-    --enable-trace-backend=ftrace \
-    --enable-usb-redir \
-    --enable-user \
-    --enable-vde \
-    --enable-vhost-net \
-    --enable-vhost-scsi \
-    --enable-vhost-user \
-    --enable-vhost-vsock \
-    --enable-virtfs \
-    --enable-vnc \
-    --enable-vnc-jpeg \
-    --enable-vnc-png \
-    --enable-vnc-sasl \
-    --enable-vte \
-    --enable-werror \
-    --enable-xen \
-    --enable-xen-pci-passthrough \
-    --enable-xen-pv-domain-build \
-    --enable-xfsctl \
-&& make check $MAKEFLAGS && install_qemu
+build_qemu && make check $MAKEFLAGS && install_qemu
diff --git a/tests/qapi-schema/doc-bad-section.err b/tests/qapi-schema/doc-bad-section.err
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.err
diff --git a/tests/qapi-schema/doc-bad-section.exit b/tests/qapi-schema/doc-bad-section.exit
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.exit
@@ -0,0 +1 @@
+0
diff --git a/tests/qapi-schema/doc-bad-section.json b/tests/qapi-schema/doc-bad-section.json
new file mode 100644
index 0000000000..560df4b087
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.json
@@ -0,0 +1,11 @@
+# = section within an expression comment
+# BUG: not rejected
+
+##
+# @Enum:
+# == Produces *invalid* texinfo
+# @one: The _one_ {and only}
+#
+# @two is undocumented
+##
+{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
diff --git a/tests/qapi-schema/doc-bad-section.out b/tests/qapi-schema/doc-bad-section.out
new file mode 100644
index 0000000000..089bde1381
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.out
@@ -0,0 +1,13 @@
+enum Enum ['one', 'two']
+enum QType ['none', 'qnull', 'qnum', 'qstring', 'qdict', 'qlist', 'qbool']
+    prefix QTYPE
+object q_empty
+doc symbol=Enum
+    body=
+== Produces *invalid* texinfo
+    arg=one
+The _one_ {and only}
+    arg=two
+
+    section=None
+@two is undocumented
diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
index cfdc0a8a81..97ab4625ff 100644
--- a/tests/qapi-schema/doc-good.json
+++ b/tests/qapi-schema/doc-good.json
@@ -51,7 +51,6 @@
 
 ##
 # @Enum:
-# == Produces *invalid* texinfo
 # @one: The _one_ {and only}
 #
 # @two is undocumented
diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
index 63ca25a8b9..1d2c250527 100644
--- a/tests/qapi-schema/doc-good.out
+++ b/tests/qapi-schema/doc-good.out
@@ -77,12 +77,12 @@ Examples:
 - {braces}
 doc symbol=Enum
     body=
-== Produces *invalid* texinfo
+
     arg=one
 The _one_ {and only}
     arg=two
 
-    section=
+    section=None
 @two is undocumented
 doc symbol=Base
     body=
diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.texi
index c410626e4a..1778312581 100644
--- a/tests/qapi-schema/doc-good.texi
+++ b/tests/qapi-schema/doc-good.texi
@@ -76,7 +76,7 @@ Examples:
 
 @deftp {Enum} Enum
 
-@subsection Produces @strong{invalid} texinfo
+
 
 @b{Values:}
 @table @asis
@@ -101,7 +101,6 @@ Not documented
 the first member
 @end table
 
-
 @end deftp
 
 
@@ -118,7 +117,6 @@ Another paragraph (but no @code{var}: line)
 Not documented
 @end table
 
-
 @end deftp
 
 
@@ -127,7 +125,6 @@ Not documented
 
 
 
-
 @end deftp
 
 
@@ -143,7 +140,6 @@ Not documented
 @item The members of @code{Variant2} when @code{base1} is @t{"two"}
 @end table
 
-
 @end deftp
 
 
@@ -160,7 +156,6 @@ One of @t{"one"}, @t{"two"}
 @item @code{data: Variant2} when @code{type} is @t{"two"}
 @end table
 
-
 @end deftp
 
 
@@ -182,7 +177,6 @@ argument
 Not documented
 @end table
 
-
 @b{Note:}
 @code{arg3} is undocumented
 
@@ -209,14 +203,12 @@ Duis aute irure dolor
 <- out
 @end example
 
-
 @b{Examples:}
 @example
 - *verbatim*
 - @{braces@}
 @end example
 
-
 @b{Since:}
 2.10
 
@@ -237,7 +229,6 @@ If you're bored enough to read this, go see a video of boxed cats
 <- out
 @end example
 
-
 @end deftypefn
 
 
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index c7724d3437..fe0ca08d78 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -61,8 +61,8 @@ for doc in schema.docs:
         print 'doc symbol=%s' % doc.symbol
     else:
         print 'doc freeform'
-    print '    body=\n%s' % doc.body
+    print '    body=\n%s' % doc.body.text
     for arg, section in doc.args.iteritems():
-        print '    arg=%s\n%s' % (arg, section)
+        print '    arg=%s\n%s' % (arg, section.text)
     for section in doc.sections:
-        print '    section=%s\n%s' % (section.name, section)
+        print '    section=%s\n%s' % (section.name, section.text)
diff --git a/tests/test-uuid.c b/tests/test-uuid.c
index d3a2791fd4..22b4b0727d 100644
--- a/tests/test-uuid.c
+++ b/tests/test-uuid.c
@@ -93,12 +93,18 @@ static inline bool uuid_is_valid(QemuUUID *uuid)
 
 static void test_uuid_generate(void)
 {
+    QemuUUID uuid_not_null = { { {
+        0x58, 0x6e, 0xce, 0x27, 0x7f, 0x09, 0x41, 0xe0,
+        0x9e, 0x74, 0xe9, 0x01, 0x31, 0x7e, 0x9d, 0x42
+    } } };
     QemuUUID uuid;
     int i;
 
     for (i = 0; i < 100; ++i) {
         qemu_uuid_generate(&uuid);
         g_assert(uuid_is_valid(&uuid));
+        g_assert_false(qemu_uuid_is_null(&uuid));
+        g_assert_false(qemu_uuid_is_equal(&uuid_not_null, &uuid));
     }
 }
 
@@ -168,8 +174,8 @@ static void test_uuid_unparse_strdup(void)
 int main(int argc, char **argv)
 {
     g_test_init(&argc, &argv, NULL);
-    g_test_add_func("/uuid/generate", test_uuid_generate);
     g_test_add_func("/uuid/is_null", test_uuid_is_null);
+    g_test_add_func("/uuid/generate", test_uuid_generate);
     g_test_add_func("/uuid/parse", test_uuid_parse);
     g_test_add_func("/uuid/unparse", test_uuid_unparse);
     g_test_add_func("/uuid/unparse_strdup", test_uuid_unparse_strdup);