|
From: | Stefan Berger |
Subject: | Re: [Qemu-devel] [PATCH 2/3] asn1 ber visitors |
Date: | Wed, 27 Feb 2013 18:24:45 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 02/27/2013 05:57 PM, mdroth wrote:
On Tue, Feb 26, 2013 at 05:03:56PM -0600, address@hidden wrote:These patches implement asn1 ber visitors for encoding and decoding data. References: <address@hidden> Content-Disposition: inline; filename=asn1_all.diff Signed-off-by: Stefan Berger <address@hidden> Signed-off-by: Joel Schopp <address@hidden> --- Makefile.objs | 10 ber/Makefile.objs | 2 ber/ber-common.c | 56 ++ ber/ber-input-visitor.c | 969 ++++++++++++++++++++++++++++++++++++++++++++ ber/ber-input-visitor.h | 30 + ber/ber-output-visitor.c | 563 +++++++++++++++++++++++++ ber/ber-output-visitor.h | 28 +Please break the input/output implementations out into separate patches, and follow those up with test cases. See: tests/test-{string,qmp}-{input,output}-visitor.c tests/test-visitor-serialization.c
I saw this with the other test cases... The problem with the ASN.1 encoding is that writing ASN.1 into a buffer doesn't make much sense, unless of course you were to compare it against a binary string that was generated through other means, which I didn't do. So instead I wrote test cases that write the ASN.1 stream using the output visitor and then immediately feed the streams into the input visitor and then I compare the outcome against expected outcome, e.g., that a stucture's fields were properly filled. I hope this makes more sense in the ASN.1 case.
Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |