<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/memblock/tests/basic_api.c, branch v6.1.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-30T10:12:00+00:00</updated>
<entry>
<title>memblock tests: add tests for memblock_trim_memory</title>
<updated>2022-08-30T10:12:00+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-08-27T05:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dcd45ad2ad784c35bfba8ae93c285574bc2a8a1e'/>
<id>urn:sha1:dcd45ad2ad784c35bfba8ae93c285574bc2a8a1e</id>
<content type='text'>
Add tests for memblock_trim_memory() for the following scenarios:
- all regions aligned
- one unaligned region that is smaller than the alignment
- one unaligned region that is unaligned at the base
- one unaligned region that is unaligned at the end

Reviewed-by: Shaoqin Huang &lt;shaoqin.huang@intel.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/0e5f55154a3b66581e04ba3717978795cbc08a5b.1661578349.git.remckee0@gmail.com
</content>
</entry>
<entry>
<title>memblock tests: add tests for memblock_*bottom_up functions</title>
<updated>2022-08-30T10:12:00+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-08-27T05:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a541c6d428f775efcfe25236062c96b59e31b57a'/>
<id>urn:sha1:a541c6d428f775efcfe25236062c96b59e31b57a</id>
<content type='text'>
Add simple tests for memblock_set_bottom_up() and memblock_bottom_up().

Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Reviewed-by: Shaoqin Huang &lt;shaoqin.huang@intel.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/b03701d2faeaf00f7184e4b72903de4e5e939437.1661578349.git.remckee0@gmail.com
</content>
</entry>
<entry>
<title>memblock tests: add additional tests for basic api and memblock_alloc</title>
<updated>2022-08-30T10:12:00+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-08-27T05:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=21a233f68afe55aafa8b79705c97f7a1d37be3e1'/>
<id>urn:sha1:21a233f68afe55aafa8b79705c97f7a1d37be3e1</id>
<content type='text'>
Add tests for memblock_add(), memblock_reserve(), memblock_remove(),
memblock_free(), and memblock_alloc() for the following test scenarios.

memblock_add() and memblock_reserve():
- add/reserve a memory block in the gap between two existing memory
  blocks, and check that the blocks are merged into one region
- try to add/reserve memblock regions that extend past PHYS_ADDR_MAX

memblock_remove() and memblock_free():
- remove/free a region when it is the only available region
    + These tests ensure that the first region is overwritten with a
      "dummy" region when the last remaining region of that type is
      removed or freed.
- remove/free() a region that overlaps with two existing regions of the
  relevant type
- try to remove/free memblock regions that extend past PHYS_ADDR_MAX

memblock_alloc():
- try to allocate a region that is larger than the total size of available
  memory (memblock.memory)

Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Reviewed-by: Shaoqin Huang &lt;shaoqin.huang@intel.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/c23c0393c5b9a53fe7f676996913c629495e9727.1661578349.git.remckee0@gmail.com
</content>
</entry>
<entry>
<title>memblock tests: add verbose output to memblock tests</title>
<updated>2022-07-04T16:58:28+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-07-04T04:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76586c00e74d189964d2fde26345a4a15f2ea02e'/>
<id>urn:sha1:76586c00e74d189964d2fde26345a4a15f2ea02e</id>
<content type='text'>
Add and use functions and macros for printing verbose testing output.

If the Memblock simulator was compiled with VERBOSE=1:
- prefix_push(): appends the given string to a prefix string that will be
  printed in test_fail() and test_pass*().

- prefix_pop(): removes the last prefix from the prefix string.

- prefix_reset(): clears the prefix string.

- test_fail(): prints a message after a test fails containing the test
  number of the failing test and the prefix.

- test_pass(): prints a message after a test passes containing its test
  number and the prefix.

- test_print(): prints the given formatted output string.

- test_pass_pop(): runs test_pass() followed by prefix_pop().

- PREFIX_PUSH(): runs prefix_push(__func__).

If the Memblock simulator was not compiled with VERBOSE=1, these
functions/macros do nothing.

Add the assert wrapper macros ASSERT_EQ(), ASSERT_NE(), and ASSERT_LT().
If the assert condition fails, these macros call test_fail() before
executing assert().

Acked-by: David Hildenbrand &lt;david@redhat.com&gt;
Reviewed-by: Shaoqin Huang &lt;shaoqin.huang@intel.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/f234d443fe154d5ae8d8aa07284aff69edfb6f61.1656907314.git.remckee0@gmail.com
</content>
</entry>
<entry>
<title>memblock tests: update style of comments for memblock_free_*() functions</title>
<updated>2022-05-09T10:10:53+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-30T22:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5550c053f6cf9993119f5c82ffc25ea80364b64'/>
<id>urn:sha1:a5550c053f6cf9993119f5c82ffc25ea80364b64</id>
<content type='text'>
Update comments in memblock_free_*() functions to match the style used
in tests/alloc_*.c by rewording to make the expected outcome more apparent
and, if more than one memblock is involved, adding a visual of the
memory blocks.

If the comment has an extra column of spaces, remove the extra space at
the beginning of each line for consistency and to conform to Linux kernel
coding style.

Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>memblock tests: update style of comments for memblock_remove_*() functions</title>
<updated>2022-05-09T10:10:47+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-30T22:49:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=60bba7b193cc8241b464b4616cfece9353086eeb'/>
<id>urn:sha1:60bba7b193cc8241b464b4616cfece9353086eeb</id>
<content type='text'>
Update comments in memblock_remove_*() functions to match the style used
in tests/alloc_*.c by rewording to make the expected outcome more apparent
and, if more than one memblock is involved, adding a visual of the
memory blocks.

If the comment has an extra column of spaces, remove the extra space at
the beginning of each line for consistency and to conform to Linux kernel
coding style.

Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>memblock tests: update style of comments for memblock_reserve_*() functions</title>
<updated>2022-05-09T10:10:44+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-30T22:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4f76c8d217e6b8c689ab31e0546888c2df016e4'/>
<id>urn:sha1:e4f76c8d217e6b8c689ab31e0546888c2df016e4</id>
<content type='text'>
Update comments in memblock_reserve_*() functions to match the style used
in tests/alloc_*.c by rewording to make the expected outcome more apparent
and, if more than one memblock is involved, adding a visual of the
memory blocks.

If the comment has an extra column of spaces, remove the extra space at
the beginning of each line for consistency and to conform to Linux kernel
coding style.

Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>memblock tests: update style of comments for memblock_add_*() functions</title>
<updated>2022-05-09T10:10:38+00:00</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-30T22:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23b5c7961f7597ba063969dfd79da3f4e19c792f'/>
<id>urn:sha1:23b5c7961f7597ba063969dfd79da3f4e19c792f</id>
<content type='text'>
Update comments in memblock_add_*() functions to match the style used
in tests/alloc_*.c by rewording to make the expected outcome more apparent
and, if more than one memblock is involved, adding a visual of the
memory blocks.

Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>memblock tests: Add simulation of physical memory</title>
<updated>2022-03-09T13:18:57+00:00</updated>
<author>
<name>Karolina Drobnik</name>
<email>karolinadrobnik@gmail.com</email>
</author>
<published>2022-02-28T14:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=284d950dd6b0ea699608455e443341e82f9719c8'/>
<id>urn:sha1:284d950dd6b0ea699608455e443341e82f9719c8</id>
<content type='text'>
Allocation functions that return virtual addresses (with an exception
of _raw variant) clear the allocated memory after reserving it. This
requires valid memory ranges in memblock.memory.

Introduce memory_block variable to store memory that can be registered
with memblock data structure. Move assert.h and size.h includes to common.h
to share them between the test files.

Signed-off-by: Karolina Drobnik &lt;karolinadrobnik@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/dce115503c74a6936c44694b00014658a1bb6522.1646055639.git.karolinadrobnik@gmail.com
</content>
</entry>
<entry>
<title>memblock tests: Split up reset_memblock function</title>
<updated>2022-03-09T13:18:57+00:00</updated>
<author>
<name>Karolina Drobnik</name>
<email>karolinadrobnik@gmail.com</email>
</author>
<published>2022-02-28T14:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c3dacba5d46ef0ff83fe6b82570c433910b63ab'/>
<id>urn:sha1:2c3dacba5d46ef0ff83fe6b82570c433910b63ab</id>
<content type='text'>
All memblock data structure fields are reset in one function. In some
test cases, it's preferred to reset memory region arrays without
modifying other values like allocation direction flag.

Extract two functions from reset_memblock, so it's possible to reset
different parts of memblock:
  - reset_memblock_regions    - reset region arrays and their counters
  - reset_memblock_attributes - set other fields to their default values

Update checks in basic_api.c to use new definitions. Remove
reset_memblock call from memblock_initialization_check, so the true
initial values are tested.

Signed-off-by: Karolina Drobnik &lt;karolinadrobnik@gmail.com&gt;
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/5cc1ba9a0ade922dbf4ba450165b81a9ed17d4a9.1646055639.git.karolinadrobnik@gmail.com
</content>
</entry>
</feed>
