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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN3rzu7HVxx4pUbR@smile.fi.intel.com>
Date:   Thu, 17 Aug 2023 12:43:42 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH v3 2/8] bitmap: add test for bitmap_*_region() functions

On Tue, Aug 15, 2023 at 04:36:22PM -0700, Yury Norov wrote:
> Test basic functionality of bitmap_{allocate,release,find_free}_region()
> functions.

...

> +	for (order = 0; order < 10; order++) {
> +		pos = bitmap_find_free_region(bmap, 1000, order);
> +		if (order == 0)
> +			expect_eq_uint(pos, 0);
> +		else
> +			expect_eq_uint(pos, BIT(order) < 512 ? BIT(order) : -ENOMEM);

			expect_eq_uint(pos, order < 9 ? BIT(order) : -ENOMEM);

or if the intention to show the relation to 1000,

			expect_eq_uint(pos, order < ilog2(1000) ? BIT(order) : -ENOMEM);

> +	}

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ