From: Matthew Wilcox <mawilcox@linuxonhyperv.com>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <mawilcox@microsoft.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
Konstantin Khlebnikov <koct9i@gmail.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Tejun Heo <tj@kernel.org>
Subject: [PATCH 3/5] radix tree test suite: Add new tag check
Date: Tue, 13 Dec 2016 14:21:30 -0800 [thread overview]
Message-ID: <1481667692-14500-4-git-send-email-mawilcox@linuxonhyperv.com> (raw)
In-Reply-To: <1481667692-14500-1-git-send-email-mawilcox@linuxonhyperv.com>
From: Matthew Wilcox <mawilcox@microsoft.com>
We have a check that setting a tag on a single entry at root succeeds,
but we were missing a check that clearing a tag on that same entry also
succeeds.
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
---
tools/testing/radix-tree/tag_check.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/radix-tree/tag_check.c b/tools/testing/radix-tree/tag_check.c
index ed5f87d..fd98c13 100644
--- a/tools/testing/radix-tree/tag_check.c
+++ b/tools/testing/radix-tree/tag_check.c
@@ -324,6 +324,9 @@ static void single_check(void)
assert(ret == 1);
ret = radix_tree_gang_lookup_tag(&tree, (void **)items, 0, BATCH, 1);
assert(ret == 1);
+ item_tag_clear(&tree, 0, 0);
+ ret = radix_tree_gang_lookup_tag(&tree, (void **)items, 0, BATCH, 0);
+ assert(ret == 0);
item_kill_tree(&tree);
}
--
2.10.2
next prev parent reply other threads:[~2016-12-13 20:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 22:21 [PATCH 0/5] Additional radix tree patches for 4.10 Matthew Wilcox
2016-12-13 22:21 ` [PATCH 1/5] radix tree test suite: Cache recently freed objects Matthew Wilcox
2016-12-13 22:21 ` [PATCH 2/5] radix-tree: Ensure counts are initialised Matthew Wilcox
2016-12-13 22:21 ` Matthew Wilcox [this message]
2016-12-13 22:21 ` [PATCH 4/5] radix tree test suite: Delete unused rcupdate.c Matthew Wilcox
2016-12-13 22:21 ` [PATCH 5/5] Reimplement IDR and IDA using the radix tree Matthew Wilcox
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=1481667692-14500-4-git-send-email-mawilcox@linuxonhyperv.com \
--to=mawilcox@linuxonhyperv.com \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=koct9i@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tj@kernel.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).