qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, mst@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v2 4/4] log: Permit -dfilter 0..0xffffffffffffffff
Date: Mon, 20 Jun 2016 18:29:33 +0200	[thread overview]
Message-ID: <1466440173-21990-5-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1466440173-21990-1-git-send-email-armbru@redhat.com>

Works fine since the previous commit fixed the underlying range data
type.  Of course it filters out nothing, but so does
0..1,2..0xffffffffffffffff, and we don't bother rejecting that either.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/test-logging.c | 5 +++--
 util/log.c           | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/test-logging.c b/tests/test-logging.c
index b6fa94e..cdf13c6 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -73,8 +73,9 @@ static void test_parse_range(void)
     g_assert_false(qemu_log_in_addr_range(UINT64_MAX - 1));
 
     qemu_set_dfilter_ranges("0..0xffffffffffffffff", &err);
-    error_free_or_abort(&err);
-
+    g_assert(qemu_log_in_addr_range(0));
+    g_assert(qemu_log_in_addr_range(UINT64_MAX));
+ 
     qemu_set_dfilter_ranges("2..1", &err);
     error_free_or_abort(&err);
 
diff --git a/util/log.c b/util/log.c
index 4da635c..b6c75b1 100644
--- a/util/log.c
+++ b/util/log.c
@@ -204,7 +204,7 @@ void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp)
         default:
             g_assert_not_reached();
         }
-        if (lob > upb || (lob == 0 && upb == UINT64_MAX)) {
+        if (lob > upb) {
             error_setg(errp, "Invalid range");
             goto out;
         }
-- 
2.5.5

  parent reply	other threads:[~2016-06-20 16:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 16:29 [Qemu-devel] [PATCH v2 0/4] range: Make it simpler & safer Markus Armbruster
2016-06-20 16:29 ` [Qemu-devel] [PATCH v2 1/4] log: Clean up misuse of Range for -dfilter Markus Armbruster
2016-06-20 16:29 ` [Qemu-devel] [PATCH v2 2/4] range: Eliminate direct Range member access Markus Armbruster
2016-06-20 16:29 ` [Qemu-devel] [PATCH v2 3/4] range: Replace internal representation of Range Markus Armbruster
2016-06-20 16:29 ` Markus Armbruster [this message]
2016-06-20 18:25   ` [Qemu-devel] [PATCH v2 4/4] log: Permit -dfilter 0..0xffffffffffffffff Eric Blake

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=1466440173-21990-5-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).