summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorShivam Kalra <shivamkalra98@zohomail.in>2026-02-16 19:39:56 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-26 21:37:53 -0800
commitfbfc0d615368ddf71899dbea2205e741c79b23e8 (patch)
treee5497108d9877a69793b8ce4df6d7dad364ef2b6 /rust/kernel/alloc/kvec
parent47ac2a4b5cd8f0cb826f6368c2fc0eeb97e5d55f (diff)
rust: alloc: add KUnit tests for KVVec shrink_to
Add comprehensive KUnit tests for the shrink_to method for KVVec. The tests verify: - Basic shrinking from multiple pages to fewer pages with data integrity preservation - Empty vector shrinking to zero capacity - No-op behavior when shrinking to a larger capacity than current - Respect for min_capacity parameter when larger than vector length These tests ensure that the shrinking logic correctly identifies when memory can be reclaimed (by freeing at least one page) and that data integrity is maintained throughout shrink operations. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Shivam Kalra <shivamkalra98@zohomail.in> Link: https://patch.msgid.link/20260216-binder-shrink-vec-v3-v6-2-ece8e8593e53@zohomail.in Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions