Re: [PATCH 07/32] mm: Bring back vmalloc_exec

From: Kent Overstreet
Date: Sun May 21 2023 - 18:08:24 EST


On Sun, May 21, 2023 at 02:33:34PM -0700, Eric Biggers wrote:
> FYI, I had a go with your test framework today, but I ran into too many problems
> to really bother with it. In case you want to improve it, these are the
> problems I ran into (so far). The command I was trying to run, after having run
> './root_image create' as root as the README says to do, was
> 'build-test-kernel run -I ~/src/ktest/tests/bcachefs/perf.ktest':

Thanks for giving it a shot...

> - Error due to ~/src/ktest/tests/bcachefs/bcachefs-tools not existing. Worked
> around by cloning the bcachefs-tools repo to this location. (Note, it's not a
> git submodule, so updating the git submodules didn't help.)

a require-git line was missing, fixed that...

> - Error due to "Root image not found". Worked around by recursively chown'ing
> /var/lib/ktest from root to my user. (Note, the README says to run
> 'root_image create' as root, which results in root ownership.)

Not sure about this one - root ownership is supposed to be fine because
qemu opens the root image read only, we use qemu's block device
in-memory snapshot mode. Was it just not readable by your user?

> - Error due to "cannot set up guest memory 'pc.ram': Cannot allocate memory".
> Worked around by editing tests/bcachefs/perf.ktest to change config-mem from
> 32G to 16G. (I have 32G memory total on this computer.)

I think 32G is excessive for the tests that actually need to be in this
file, dropping that back to 16G.

> - Error due to "failed to open /dev/vfio/10: No such file or directory".
> Enabling CONFIG_VFIO and CONFIG_VFIO_PCI in my host kernel didn't help. It
> seems the test is hardcoded to expect PCI passthrough to be set up with a
> specific device. I'd have expected it to just set up a standard virtual disk.

Some of the tests in that file do need a fast device, but the tests
we're interested in do not - I'll split that up.

I just pushed fixes for everything except the root_image issue if you
want to give it another go.

Cheers,
Kent