[PATCH] lib: kunit_iov_iter: Fix test fail on powerpc

Christian A. Ehrhardt posted 1 patch 1 month, 3 weeks ago
lib/tests/kunit_iov_iter.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH] lib: kunit_iov_iter: Fix test fail on powerpc
Posted by Christian A. Ehrhardt 1 month, 3 weeks ago
Increase buffer size to accomodate machines with
64K PAGE_SIZE.

Cc: David Gow <davidgow@google.com>
Fixes: 0913b7554726 ("lib: kunit_iov_iter: add tests for extract_iter_to_sg")
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
---
 lib/tests/kunit_iov_iter.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/tests/kunit_iov_iter.c b/lib/tests/kunit_iov_iter.c
index 37bd6eb25896..f02f7b7aa796 100644
--- a/lib/tests/kunit_iov_iter.c
+++ b/lib/tests/kunit_iov_iter.c
@@ -1128,7 +1128,7 @@ static void __init iov_kunit_iter_to_sg_kvec(struct kunit *test)
 	struct kvec kvec;
 	size_t bufsize;
 
-	bufsize = 0x100000;
+	bufsize = 0x200000;
 	iov_kunit_iter_to_sg_init(test, bufsize, false, &data);
 
 	kvec.iov_base = data.buffer;
@@ -1146,7 +1146,7 @@ static void __init iov_kunit_iter_to_sg_bvec(struct kunit *test)
 	struct bio_vec *bvec;
 	struct iov_iter iter;
 
-	bufsize = 0x100000;
+	bufsize = 0x200000;
 	iov_kunit_iter_to_sg_init(test, bufsize, false, &data);
 
 	bvec = kunit_kmalloc_array(test, data.npages, sizeof(*bvec),
@@ -1173,7 +1173,7 @@ static void __init iov_kunit_iter_to_sg_folioq(struct kunit *test)
 	struct iov_iter iter;
 	size_t bufsize;
 
-	bufsize = 0x100000;
+	bufsize = 0x200000;
 	iov_kunit_iter_to_sg_init(test, bufsize, false, &data);
 
 	folioq = iov_kunit_create_folioq(test);
@@ -1190,7 +1190,7 @@ static void __init iov_kunit_iter_to_sg_xarray(struct kunit *test)
 	struct iov_iter iter;
 	size_t bufsize;
 
-	bufsize = 0x100000;
+	bufsize = 0x200000;
 	iov_kunit_iter_to_sg_init(test, bufsize, false, &data);
 
 	xarray = iov_kunit_create_xarray(test);
@@ -1206,7 +1206,7 @@ static void __init iov_kunit_iter_to_sg_ubuf(struct kunit *test)
 	struct iov_iter iter;
 	size_t bufsize;
 
-	bufsize = 0x100000;
+	bufsize = 0x200000;
 	iov_kunit_iter_to_sg_init(test, bufsize, true, &data);
 
 	iov_iter_ubuf(&iter, READ, data.ubuf, bufsize);
-- 
2.43.0
Re: [PATCH] lib: kunit_iov_iter: Fix test fail on powerpc
Posted by Andrew Morton 1 month, 3 weeks ago
On Tue, 21 Apr 2026 09:07:07 +0200 "Christian A. Ehrhardt" <lk@c--e.de> wrote:

> Increase buffer size to accomodate machines with
> 64K PAGE_SIZE.

Thanks.  I added

Reported-by: David Gow <davidgow@google.com>
Closes: https://lore.kernel.org/34a81ec2-af84-465d-9b5e-7bb5bf01680f@davidgow.net
Tested-by: David Gow <davidgow@google.com>
Re: [PATCH] lib: kunit_iov_iter: Fix test fail on powerpc
Posted by Josh Law 1 month, 3 weeks ago
Ran this on my computer too! 
(And a couple of other diff arch vms)

Tested-by: Josh Law <joshlaw48@gmail.com>

Thanks!
Re: [PATCH] lib: kunit_iov_iter: Fix test fail on powerpc
Posted by Josh Law 1 month, 3 weeks ago
Well, I'm *now* aware that David said that it may take some config to 
get this suite working on NON suse systems. 

It is always good to add (or fix) tests anyhow.

I say this patch (code) wise, LGTM. But since I don't own this subsystem.

Reviewed-by: Josh Law <joshlaw48@gmail.com>

Thanks!