All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: mst@redhat.com, coreyb@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, jschopp@linux.vnet.ibm.com,
	anthony@codemonkey.ws
Subject: Re: [Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases
Date: Thu, 21 Mar 2013 16:05:53 -0600	[thread overview]
Message-ID: <514B8441.7050408@redhat.com> (raw)
In-Reply-To: <1363890571-15146-10-git-send-email-stefanb@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2011 bytes --]

On 03/21/2013 12:29 PM, Stefan Berger wrote:
> BER visitor tests give us some assurance that the BER visitor
> code works, and also end up by extention helping out on our

s/extention/extension/

> code coverage of the filesystem tests.
> After the output visitor invocation the resuling buffer is

s/resuling/resulting/

> compared against a known byte stream -- this will lock the
> implementation into producing specific byte arrays.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Signed-off-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
> ---
>  tests/Makefile           |   9 +
>  tests/test-ber-visitor.c | 746 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 755 insertions(+)
>  create mode 100644 tests/test-ber-visitor.c
> 

> +tests/test-ber-visitor.o: $(addprefix include/qapi/, ber.h ber-input-visitor.h ber-output-visitor.h) $(addprefix qapi/, ber-common.c ber-input-visitor.c ber-output-visitor.c)
> +tests/test-ber-visitor$(EXESUF): tests/test-ber-visitor.o $(tools-obj-y) qapi/ber-output-visitor.o qapi/ber-input-visitor.o qapi/ber-common.o $(block-obj-y) libqemuutil.a libqemustub.a

Long lines - worth using backslash-newline continuation?

> +++ b/tests/test-ber-visitor.c
> @@ -0,0 +1,746 @@
> +/*
> + * BER Output Visitor unit-tests.
> + *
> + * Copyright (C) 2011 Red Hat Inc.
> + * Copyright (C) 2011 IBM Corporation

It's 2013 (probably applies to other files earlier in the series, as well).

> +static void test_visitor_out_string(TestInputOutputVisitor *data,
> +                                    const void *unused)
> +{
> +    char *string_in = (char *) "Q E M U", *string_out = NULL;

Does the fact that you have to cast here...

> +    Error *errp = NULL;
> +
> +    visit_type_str(data->ov, &string_in, NULL, &errp);

...indicate a lack of const-correctness on visit_type_str()?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-03-21 22:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21 18:29 [Qemu-devel] [PATCH v4 0/9] Subject: Implement and test ASN.1 BER visitors Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 1/9] Move some contents of savevm.c to qemu-file.c Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 2/9] 3 new file wrappers Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 3/9] QEMUSizedBuffer Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 4/9] QAPI: add type_sized_buffer Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 5/9] ASN.1 output visitor Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 6/9] ASN.1 input visitor Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 7/9] Extend test-visitor-serialization with ASN.1 visitor(s) Stefan Berger
2013-03-21 21:59   ` Eric Blake
2013-03-21 22:06     ` Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 8/9] Update MAINTAINERS Stefan Berger
2013-03-21 18:29 ` [Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases Stefan Berger
2013-03-21 22:05   ` Eric Blake [this message]
2013-03-22 17:07     ` Stefan Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=514B8441.7050408@redhat.com \
    --to=eblake@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=jschopp@linux.vnet.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.