qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v17 2/6] radix tree test suite: add tests for xb


From: Wei Wang
Subject: Re: [Qemu-devel] [PATCH v17 2/6] radix tree test suite: add tests for xbitmap
Date: Wed, 29 Nov 2017 22:20:42 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 11/07/2017 01:00 AM, Matthew Wilcox wrote:
On Fri, Nov 03, 2017 at 04:13:02PM +0800, Wei Wang wrote:
From: Matthew Wilcox <address@hidden>

Add the following tests for xbitmap:
1) single bit test: single bit set/clear/find;
2) bit range test: set/clear a range of bits and find a 0 or 1 bit in
the range.

Signed-off-by: Wei Wang <address@hidden>
Cc: Matthew Wilcox <address@hidden>
Cc: Andrew Morton <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
---
  tools/include/linux/bitmap.h            |  34 ++++
  tools/include/linux/kernel.h            |   2 +
  tools/testing/radix-tree/Makefile       |   7 +-
  tools/testing/radix-tree/linux/kernel.h |   2 -
  tools/testing/radix-tree/main.c         |   5 +
  tools/testing/radix-tree/test.h         |   1 +
  tools/testing/radix-tree/xbitmap.c      | 278 ++++++++++++++++++++++++++++++++
Umm.  No.  You've duplicated xbitmap.c into the test framework, so now it can
slowly get out of sync with the one in lib/.  That's not OK.

Put it back the way it was, with the patch I gave you as patch 1/n
(relocating xbitmap.c from tools/testing/radix-tree to lib/).
Then add your enhancements as patch 2/n.  All you should need to
change in your 1/n from
http://git.infradead.org/users/willy/linux-dax.git/commit/727e401bee5ad7d37e0077291d90cc17475c6392
is a bit of Makefile tooling.  Leave the test suite embedded in the file;
that way people might remember to update the test suite when adding
new functionality.


Thanks for you suggestions. Please have a check the v18 patches:
The original implementation is put in patch 4, and the proposed changes are separated into patch 5 (we can merge them to patch 4 later if they look good to you), and the new APIs are in patch 6.

Best,
Wei



reply via email to

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