From: David Hildenbrand <david@redhat.com>
To: Rebecca Mckeever <remckee0@gmail.com>,
Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 8/8] memblock tests: add tests for memblock_trim_memory
Date: Tue, 23 Aug 2022 11:54:59 +0200 [thread overview]
Message-ID: <c9536f33-2f66-af0a-472a-c982a2341738@redhat.com> (raw)
In-Reply-To: <4157021eecdd3abb503d4b1d1449844baac2d7b9.1660897732.git.remckee0@gmail.com>
On 19.08.22 10:34, Rebecca Mckeever wrote:
> Add tests for memblock_trim_memory() for the following scenarios:
> - all regions aligned
> - one region unalign that is smaller than the alignment
s/region unalign/unaligned region/
> - one region unaligned at the base
> - one region unaligned at the end
"unaligned region" ?
[...]
>
> +/*
> + * A test that tries to trim memory when both ends of the memory region are
> + * aligned. Expect that the memory will not be trimmed. Expect the counter to
> + * not be updated.
> + */
> +static int memblock_trim_memory_aligned_check(void)
> +{
> + struct memblock_region *rgn;
> + phys_addr_t alignment = SMP_CACHE_BYTES;
Could make that "const" -- same applies to other functions.
> +
> + rgn = &memblock.memory.regions[0];
> +
> + struct region r = {
> + .base = alignment,
> + .size = alignment * 4
> + };
> +
[[[.]
> +static int memblock_trim_memory_checks(void)
> +{
> + prefix_reset();
> + prefix_push(FUNC_TRIM);
> + test_print("Running %s tests...\n", FUNC_TRIM);
Just a note that this could have been
test_print("Running " FUNC_TRIM " tests...\n");
But it's good to keep this consistent for all tests.
Nice test cases!
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2022-08-23 12:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 8:34 [PATCH v2 0/8] memblock tests: update and extend memblock simulator Rebecca Mckeever
2022-08-19 8:34 ` [PATCH v2 1/8] memblock tests: update tests to check if memblock_alloc zeroed memory Rebecca Mckeever
2022-08-23 9:36 ` David Hildenbrand
2022-08-23 13:25 ` Mike Rapoport
2022-08-19 8:34 ` [PATCH v2 2/8] memblock tests: update zeroed memory check for memblock_alloc_* tests Rebecca Mckeever
2022-08-19 8:34 ` [PATCH v2 3/8] memblock tests: add labels to verbose output for generic alloc tests Rebecca Mckeever
2022-08-23 9:37 ` David Hildenbrand
2022-08-19 8:34 ` [PATCH v2 4/8] memblock tests: add additional tests for basic api and memblock_alloc Rebecca Mckeever
2022-08-23 9:39 ` David Hildenbrand
2022-08-19 8:34 ` [PATCH v2 5/8] memblock tests: update alloc_api to test memblock_alloc_raw Rebecca Mckeever
2022-08-23 9:49 ` David Hildenbrand
2022-08-25 21:35 ` Rebecca Mckeever
2022-08-26 9:28 ` David Hildenbrand
2022-08-19 8:34 ` [PATCH v2 6/8] memblock tests: update alloc_nid_api to test memblock_alloc_try_nid_raw Rebecca Mckeever
2022-08-23 9:50 ` David Hildenbrand
2022-08-19 8:34 ` [PATCH v2 7/8] memblock tests: add tests for memblock_*bottom_up functions Rebecca Mckeever
2022-08-19 8:34 ` [PATCH v2 8/8] memblock tests: add tests for memblock_trim_memory Rebecca Mckeever
2022-08-23 9:54 ` David Hildenbrand [this message]
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=c9536f33-2f66-af0a-472a-c982a2341738@redhat.com \
--to=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=remckee0@gmail.com \
--cc=rppt@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).