[libvirt] Problems with pdwtags on Ubuntu 10.04

Matthias Bolte matthias.bolte at googlemail.com
Tue May 18 17:57:19 UTC 2010


The "help avoid accidental remote_protocol.x changes" commit 180d4b2b
added a make check rule that tried using pdwtags from the dwarves
package to protect against accidental remote_protocol.x changes.

I installed dwarves package on Ubuntu 10.04 and make check fails for me now.

The temporary file remote_protocol-structs-t is empty for me. It seems
that pdwtags doesn't output the expected format for the embedded perl
script. pdwtags output doesn't contain /* DD */ comments between the
structs. A snippet from the pdwtags output looks like this:



struct remote_nonnull_network {
	remote_nonnull_string      name;                 /*     0     8 */
	remote_uuid                uuid;                 /*     8    16 */

	/* size: 24, cachelines: 1 */
	/* last cacheline: 24 bytes */
};

typedef struct remote_nonnull_network remote_nonnull_network;

struct remote_nonnull_nwfilter {
	remote_nonnull_string      name;                 /*     0     8 */
	remote_uuid                uuid;                 /*     8    16 */

	/* size: 24, cachelines: 1 */
	/* last cacheline: 24 bytes */
};

typedef struct remote_nonnull_nwfilter remote_nonnull_nwfilter;



If i run pdwtags with the --verbose flag then the output looks like this:



/* <44e> remote/remote_protocol.h:71 */
typedef struct remote_nonnull_domain remote_nonnull_domain;

/* <459> remote/remote_protocol.h:73 */
struct remote_nonnull_network {
	remote_nonnull_string      name;                 /*     0     8 */
	remote_uuid                uuid;                 /*     8    16 */

	/* size: 24, cachelines: 1 */
	/* last cacheline: 24 bytes */
};

/* <482> remote/remote_protocol.h:77 */
typedef struct remote_nonnull_network remote_nonnull_network;

/* <48d> remote/remote_protocol.h:79 */
struct remote_nonnull_nwfilter {
	remote_nonnull_string      name;                 /*     0     8 */
	remote_uuid                uuid;                 /*     8    16 */

	/* size: 24, cachelines: 1 */
	/* last cacheline: 24 bytes */
};

/* <4b6> remote/remote_protocol.h:83 */
typedef struct remote_nonnull_nwfilter remote_nonnull_nwfilter;



Now there are "markers" that can be used for splitting, but they still
differ from the expected format.

The attached patch fixes this issue for me on Ubuntu, but I doubt that
this can be the general solution.

Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_pdwtags_usage_on_ubuntu.diff
Type: text/x-diff
Size: 734 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100518/bf911f34/attachment-0001.bin>


More information about the libvir-list mailing list