lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 28 Nov 2017 13:32:58 -0800 From: Matthew Wilcox <willy@...radead.org> To: unlisted-recipients:; (no To-header on input) Cc: Matthew Wilcox <mawilcox@...rosoft.com>, Chris Mi <chrism@...lanox.com>, Jiri Pirko <jiri@...lanox.com>, "David S . Miller" <davem@...emloft.net>, Cong Wang <xiyou.wangcong@...il.com>, Jamal Hadi Salim <jhs@...atatu.com>, Daniel Borkmann <daniel@...earbox.net>, Eric Biggers <ebiggers@...gle.com>, Lai Jiangshan <laijs@...fujitsu.com>, Tejun Heo <tj@...nel.org>, Rehas Sachdeva <aquannie@...il.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH 03/17] idr test suite: Fix ida_test_random() From: Matthew Wilcox <mawilcox@...rosoft.com> The test was checking the wrong errno; ida_get_new_above() returns EAGAIN, not ENOMEM on memory allocation failure. Double the number of threads to increase the chance that we actually exercise this path during the test suite (it was a bit sporadic before). Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com> --- tools/testing/radix-tree/idr-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c index 30cd0b296f1a..193450b29bf0 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -380,7 +380,7 @@ void ida_check_random(void) do { ida_pre_get(&ida, GFP_KERNEL); err = ida_get_new_above(&ida, bit, &id); - } while (err == -ENOMEM); + } while (err == -EAGAIN); assert(!err); assert(id == bit); } @@ -489,7 +489,7 @@ static void *ida_random_fn(void *arg) void ida_thread_tests(void) { - pthread_t threads[10]; + pthread_t threads[20]; int i; for (i = 0; i < ARRAY_SIZE(threads); i++) -- 2.15.0
Powered by blists - more mailing lists