qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 018454: tests/test-string-input-visitor: Hand


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 018454: tests/test-string-input-visitor: Handle errors pro...
Date: Mon, 11 Feb 2013 07:30:14 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0184543814354d37eab75132712c3874d71dd776
      
https://github.com/qemu/qemu/commit/0184543814354d37eab75132712c3874d71dd776
  Author: Peter Maydell <address@hidden>
  Date:   2013-02-07 (Thu, 07 Feb 2013)

  Changed paths:
    M tests/test-string-input-visitor.c

  Log Message:
  -----------
  tests/test-string-input-visitor: Handle errors provoked by fuzz test

It's OK and expected for visitors to return errors when presented with
the fuzz test's random data. Since the fuzzer doesn't care about
errors, we pass in NULL rather than an Error**. This fixes a bug in
the fuzzer where it was passing the same Error** into each visitor,
with the effect that once one visitor returned an error, each later
visitor would notice that it had been passed in an Error** representing
an already set error, and do nothing.

For the case of visit_type_str() we also need to handle the case where
an error means that the visitor doesn't set our char*. We initialize
the pointer to NULL so we can safely g_free() it regardless of whether
the visitor allocated a string for us or not.

This fixes a problem where this test failed the MacOSX malloc()
consistency checks and might segfault on other platforms [due
to calling free() on an uninitialized pointer variable when
visit_type_str() failed.].

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 2da2e52dce73c5e3a916bcc8e86451ed64f557d8
      
https://github.com/qemu/qemu/commit/2da2e52dce73c5e3a916bcc8e86451ed64f557d8
  Author: Anthony Liguori <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M tests/test-string-input-visitor.c

  Log Message:
  -----------
  Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Peter Maydell
# Via Luiz Capitulino
* luiz/queue/qmp:
  tests/test-string-input-visitor: Handle errors provoked by fuzz test


  Commit: 474c21349fdde3c477357c2317ca6ad50872827b
      
https://github.com/qemu/qemu/commit/474c21349fdde3c477357c2317ca6ad50872827b
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M hw/kvm/pci-assign.c

  Log Message:
  -----------
  error: Clean up error strings with embedded newlines

The arguments of error_report() should yield a short error string
without newlines.

A few places try to print additional help after the error message by
embedding newlines in the error string.  That's nice, but let's do it
the right way.

Since I'm touching these lines anyway, drop a stray preposition and
some tabs.  We don't use tabs for similar messages elsewhere.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 1a9522cc6ea04968e1169f0195952d0029d5dbb9
      
https://github.com/qemu/qemu/commit/1a9522cc6ea04968e1169f0195952d0029d5dbb9
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M hw/vfio_pci.c

  Log Message:
  -----------
  error: Clean up abuse of error_report() for help

Use error_printf() instead, so the help gets presented more nicely.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 312fd5f29097890179793d8bbb59ab18afbe0ad4
      
https://github.com/qemu/qemu/commit/312fd5f29097890179793d8bbb59ab18afbe0ad4
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M block/gluster.c
    M hmp.c
    M hw/9pfs/virtio-9p-proxy.c
    M hw/pci/pci.c
    M hw/qdev.c
    M hw/qxl.c
    M hw/vfio_pci.c
    M hw/vhost_net.c
    M migration.c
    M qemu-char.c
    M target-i386/cpu.c
    M target-ppc/translate_init.c
    M ui/console.c
    M ui/input.c
    M util/qemu-config.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back.  Tracked down with this Coccinelle semantic patch:

    @r@
        expression err, eno, cls, fmt;
        position p;
    @@
    (
        error_report(fmt, ...)@p
    |
        error_set(err, cls, fmt, ...)@p
    |
        error_set_errno(err, eno, cls, fmt, ...)@p
    |
        error_setg(err, fmt, ...)@p
    |
        error_setg_errno(err, eno, fmt, ...)@p
    )
    @script:python@
        fmt << r.fmt;
        p << r.p;
    @@
    if "\\n" in str(fmt):
        print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt)

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 7216ae3d1a11e07192623ad04d450e98bf1f3d10
      
https://github.com/qemu/qemu/commit/7216ae3d1a11e07192623ad04d450e98bf1f3d10
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M util/qemu-option.c

  Log Message:
  -----------
  qemu-option: Disable two helpful messages that got broken recently

commit 8be7e7e4 and commit ec7b2ccb messed up the ordering of error
message and the helpful explanation that should follow it, like this:

    $ qemu-system-x86_64 --nodefaults -S --vnc :0 --chardev null,id=,
    Identifiers consist of letters, digits, '-', '.', '_', starting with a 
letter.
    qemu-system-x86_64: -chardev null,id=,: Parameter 'id' expects an identifier

    $ qemu-system-x86_64 --nodefaults -S --vnc :0 --machine kvm_shadow_mem=dunno
    You may use k, M, G or T suffixes for kilobytes, megabytes, gigabytes and 
terabytes.
    qemu-system-x86_64: -machine kvm_shadow_mem=dunno: Parameter 
'kvm_shadow_mem' expects a size

Pity.  Disable them for now.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: cfdd1628666f1342925f9c77cbb63b7d6d049dae
      
https://github.com/qemu/qemu/commit/cfdd1628666f1342925f9c77cbb63b7d6d049dae
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Drop redundant "parse error" reports

qemu_opts_parse() reports the error already, and in a much more useful
way.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 49295ebc56a303a60c6ca2ead6f548eae3521150
      
https://github.com/qemu/qemu/commit/49295ebc56a303a60c6ca2ead6f548eae3521150
  Author: Markus Armbruster <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Exit unsuccessfully on option argument syntax error

We exit successfully after reporting syntax error for argument of
--sandbox and --add-fd.

We continue undaunted after reporting it for argument of -boot,
--option-rom and --object.

Change all five to exit unsuccessfully, like the other options.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: d5f1f286ef8c7c96614779a40af724d7109175d5
      
https://github.com/qemu/qemu/commit/d5f1f286ef8c7c96614779a40af724d7109175d5
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: improve "Unknown flags" error message

Show the actual flags value and include "block migration" in the error
message so it's clear where the error is coming from.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 9ee0cb201e6bfe03549a649fd165a85cfed34d05
      
https://github.com/qemu/qemu/commit/9ee0cb201e6bfe03549a649fd165a85cfed34d05
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: fix blk_mig_save_dirty_block() return value checking

Commit 43be3a25c931a7f61a76fbfc9d35584cbfc5fb58 changed the
blk_mig_save_dirty_block() return code handling.  The function's doc
comment says:

  /* return value:
   * 0: too much data for max_downtime
   * 1: few enough data for max_downtime
   */

Because of the 1 return value, callers must check for ret < 0 instead of
just:

  if (ret) { ... }

We do not want to bail when 1 is returned, only on error.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 2c5a7f20112615ce13a3434ab90bee1ed8d44ebd
      
https://github.com/qemu/qemu/commit/2c5a7f20112615ce13a3434ab90bee1ed8d44ebd
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M block-migration.c

  Log Message:
  -----------
  block-migration: fix block_save_iterate() return value

The .save_live_iterate() function returns 0 to continue iterating or 1
to stop iterating.

Since 16310a3cca7320edb9341c976f7819de0a8c27e0 it only ever returns 0,
leading to an infinite loop.

Return 1 if we have finished sending dirty blocks.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: f880defbb06708d30a38ce9f2667067626acdd38
      
https://github.com/qemu/qemu/commit/f880defbb06708d30a38ce9f2667067626acdd38
  Author: Stefan Weil <address@hidden(none)>
  Date:   2013-02-11 (Mon, 11 Feb 2013)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  block/vpc: Fix size calculation

The size calculated from the CHS values is not the real image (disk) size,
but usually a smaller value. This is caused by rounding effects.

Only older operating systems use CHS. Such guests won't be able to use
the whole disk. All modern operating systems use the real size.

This patch fixes https://bugs.launchpad.net/qemu/+bug/1105670/.

Signed-off-by: Stefan Weil <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/10442558ab17...f880defbb067

reply via email to

[Prev in Thread] Current Thread [Next in Thread]