[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2] virdbustest: Don't pass number of arguments as long long



On Thu, Jul 25, 2013 at 01:25:32PM +0200, Guido Günther wrote:
> since sizeof(int) != sizeof(long long) on 32bit archs.
> 
> This unbreaks virdbustest which otherwise fails like:
> 
>  (gdb) bt
>  #0  __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50
>  #1  0x405907d2 in ?? () from /lib/i386-linux-gnu/libdbus-1.so.3
>  #2  0x4057c140 in ?? () from /lib/i386-linux-gnu/libdbus-1.so.3
>  #3  0x4057e7ec in dbus_message_iter_append_basic () from /lib/i386-linux-gnu/libdbus-1.so.3
>  #4  0x400742ec in virDBusMessageIterEncode (args=0xbfd4b8f0 "k\321\004\b.", types=0x804d260 "",
>      rootiter=0xbfd4b844) at util/virdbus.c:560
>  #5  virDBusMessageEncodeArgs (msg=msg entry=0x893c278, types=types entry=0x804d25c "sais",
>      args=args entry=0xbfd4b8d8 "r\320\004\b\003") at util/virdbus.c:921
>  #6  0x40075917 in virDBusMessageEncode (msg=0x893c278, types=0x804d25c "sais") at util/virdbus.c:959
>  #7  0x0804a4a1 in testMessageArray (args=0x0) at virdbustest.c:195
>  #8  0x0804c404 in virtTestRun (title=title entry=0x804cfcb "Test message array ",
>      nloops=nloops entry=1, body=body entry=0x804a3f0 <testMessageArray>, data=data entry=0x0)
>      at testutils.c:168
>  #9  0x08049346 in mymain () at virdbustest.c:384
>  #10 0x0804cb2e in virtTestMain (argc=argc entry=1, argv=argv entry=0xbfd4bb24,
>      func=func entry=0x80492c0 <mymain>) at testutils.c:764
>  #11 0x080491af in main (argc=1, argv=0xbfd4bb24) at virdbustest.c:393
> ---
>  tests/virdbustest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/virdbustest.c b/tests/virdbustest.c
> index e054716..fb241ee 100644
> --- a/tests/virdbustest.c
> +++ b/tests/virdbustest.c
> @@ -195,7 +195,7 @@ static int testMessageArray(const void *args ATTRIBUTE_UNUSED)
>      if (virDBusMessageEncode(msg,
>                               "sais",
>                               in_str1,
> -                             (long long)3, in_int32a, in_int32b, in_int32c,
> +                             3, in_int32a, in_int32b, in_int32c,
>                               in_str2) < 0) {
>          VIR_DEBUG("Failed to encode arguments");
>          goto cleanup;

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]