From: Rebecca Mckeever <remckee0@gmail.com>
To: Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>,
Rebecca Mckeever <remckee0@gmail.com>
Subject: [PATCH 0/8] memblock tests: update and extend memblock simulator
Date: Sun, 14 Aug 2022 00:53:52 -0500 [thread overview]
Message-ID: <cover.1660454730.git.remckee0@gmail.com> (raw)
These patches update existing tests in memblock simulator, add
additional tests for memblock functions that are already being tested,
and add test coverage for additional memblock functions.
Updated tests for:
- memblock_alloc()
- memblock_alloc_try_nid()
- memblock_alloc_from()
The updates to memblock_alloc() tests include the addition of an assert
that checks whether the entire chunk of allocated memory is cleared. For
memblock_alloc_try_nid() and memblock_alloc_from(), the assert that checks
whether the allocated memory is cleared now checks the entire chunk of
allocated memory instead of just the first byte. To make this more robust,
setup_memblock() and dummy_physical_memory_init() fill the entire MEM_SIZE
simulated physical memory with nonzero values by calling fill_memblock().
setup_memblock() is called at the beginning of most tests. Tests that
don't call setup_memblock() call fill_memblock() directly.
Additional tests for:
- memblock_add()
- memblock_reserve()
- memblock_remove()
- memblock_free()
- memblock_alloc()
Introducing test coverage for:
- memblock_alloc_raw()
- memblock_alloc_try_nid_raw()
- memblock_set_bottom_up()
- memblock_bottom_up()
- memblock_trim_memory()
The tests for the memblock_alloc_*raw() functions test both top-down and
bottom-up allocation directions. To add coverage for memblock_alloc_raw(),
the alloc_api was updated so that it runs through all the existing tests
twice: once for memblock_alloc() and once for memblock_alloc_raw(). When
the tests run memblock_alloc_raw(), they test that the entire memory
region is nonzero instead of testing that it is zero.
Similarly, the alloc_nid_api was updated to run through its tests twice,
once for memblock_alloc_try_nid() and once for
memblock_alloc_try_nid_raw(). When the tests run
memblock_alloc_try_nid_raw(), they test that the entire memory region is
nonzero instead of testing that it is zero.
The patchset also adds labels to verbose output for generic
memblock_alloc*() tests that indicate which allocation direction is set.
The function names of those tests do not include this information.
Rebecca Mckeever (8):
memblock tests: update tests to check if memblock_alloc zeroed memory
memblock tests: update zeroed memory check for memblock_alloc_* tests
memblock tests: add labels to verbose output for generic alloc tests
memblock tests: add additional tests for basic api and memblock_alloc
memblock tests: update alloc_api to test memblock_alloc_raw
memblock tests: update alloc_nid_api to test
memblock_alloc_try_nid_raw
memblock tests: add tests for memblock_*bottom_up functions
memblock tests: add tests for memblock_trim_memory
tools/testing/memblock/tests/alloc_api.c | 184 ++++-
.../memblock/tests/alloc_helpers_api.c | 20 +-
tools/testing/memblock/tests/alloc_nid_api.c | 268 +++---
tools/testing/memblock/tests/basic_api.c | 773 +++++++++++++++++-
tools/testing/memblock/tests/common.c | 7 +
tools/testing/memblock/tests/common.h | 46 ++
6 files changed, 1108 insertions(+), 190 deletions(-)
--
2.25.1
next reply other threads:[~2022-08-14 5:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-14 5:53 Rebecca Mckeever [this message]
2022-08-14 5:53 ` [PATCH 1/8] memblock tests: update tests to check if memblock_alloc zeroed memory Rebecca Mckeever
2022-08-15 8:50 ` Huang, Shaoqin
2022-08-16 2:15 ` Rebecca Mckeever
2022-08-16 2:24 ` Huang, Shaoqin
2022-08-14 5:53 ` [PATCH 2/8] memblock tests: update zeroed memory check for memblock_alloc_* tests Rebecca Mckeever
2022-08-15 8:59 ` Huang, Shaoqin
2022-08-14 5:53 ` [PATCH 3/8] memblock tests: add labels to verbose output for generic alloc tests Rebecca Mckeever
2022-08-15 9:15 ` Huang, Shaoqin
2022-08-16 2:39 ` Rebecca Mckeever
2022-08-16 3:08 ` Huang, Shaoqin
2022-08-19 5:03 ` Rebecca Mckeever
2022-08-19 8:39 ` Huang, Shaoqin
2022-08-14 5:53 ` [PATCH 4/8] memblock tests: add additional tests for basic api and memblock_alloc Rebecca Mckeever
2022-08-15 10:19 ` Huang, Shaoqin
2022-08-14 5:53 ` [PATCH 5/8] memblock tests: update alloc_api to test memblock_alloc_raw Rebecca Mckeever
2022-08-14 5:53 ` [PATCH 6/8] memblock tests: update alloc_nid_api to test memblock_alloc_try_nid_raw Rebecca Mckeever
2022-08-16 1:24 ` Huang, Shaoqin
2022-08-14 5:53 ` [PATCH 7/8] memblock tests: add tests for memblock_*bottom_up functions Rebecca Mckeever
2022-08-16 1:46 ` Huang, Shaoqin
2022-08-14 5:54 ` [PATCH 8/8] memblock tests: add tests for memblock_trim_memory Rebecca Mckeever
2022-08-16 1:46 ` Huang, Shaoqin
2022-08-20 8:40 ` Rebecca Mckeever
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=cover.1660454730.git.remckee0@gmail.com \
--to=remckee0@gmail.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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).