Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963AbcLMU0T (ORCPT ); Tue, 13 Dec 2016 15:26:19 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:43048 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753461AbcLMU0O (ORCPT ); Tue, 13 Dec 2016 15:26:14 -0500 x-originating-ip: 72.167.245.219 From: Matthew Wilcox To: linux-kernel@vger.kernel.org, Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Konstantin Khlebnikov , Ross Zwisler , "Kirill A . Shutemov" , Tejun Heo Subject: [PATCH 3/5] radix tree test suite: Add new tag check Date: Tue, 13 Dec 2016 14:21:30 -0800 Message-Id: <1481667692-14500-4-git-send-email-mawilcox@linuxonhyperv.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1481667692-14500-1-git-send-email-mawilcox@linuxonhyperv.com> References: <1481667692-14500-1-git-send-email-mawilcox@linuxonhyperv.com> X-CMAE-Envelope: MS4wfDWEW8apudIMMuPP0rADEhVLH0goLXGBEI2XC4v0h5o0l1hbO9vhlyPcMS+Jw6O34xoH46DN1E0iFCPxZlE5hq/WFSINsQ+lVhKnghxDsCi3zNknI/sF OC2jEvJxAJqW8RQGyzPEr0f4dLkD7FMamxPenzYu827qrSSALSzbWMqCsFRWOlwltiBtVeLFRJQ1/sy9FWsz04AtSk+inAb6ztSw7BVoOAdIR710LxZ5Dt/i o3mOe0f7SlCjPMPjpq7RhpVZuOeFpjVWPAFz4K5V8rBRkD+U9TM0KaXfU9/ArdNTQKfvhaCFMyTxumI09P0mS1QzeLjEEgbEtVxcEWKoVRf6RW79hXTi7XNh lY8cirU0MUS9xeFstBJgIbBpMSR48e9E3rRsduqC9mgAU237a6v0lG6p2b8JltjErKFCSPnh3Tw1TuR4fjoRaflwuYYXiDLgV7WlfFjOpMpO52pwP/OvlnqN C4UCyxd64riWtAF+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 27 From: Matthew Wilcox 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 --- 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