[pve-devel] applied: [PATCH pve-network] tests: mocking cfs_lock_file to pass subnet tests

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 29 15:09:46 CET 2023

Am 24/11/2023 um 14:16 schrieb Stefan Lendl:
> IPAM tries to lock file in clusterfs which it can't when testing as
> non-root.
> Mocking cfs_lock_file to emulate locking behavior.
> Signed-off-by: Stefan Lendl <s.lendl at proxmox.com>
> ---
>  src/test/run_test_subnets.pl | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)

applied, many thanks, we now can build as non-root which is a big
step forward.

But building in contained environments like the one from sbuild
still fails, I now added a few commits to improve the error reporting
situation in some tests, and found that it's basically the reading
of /etc/network/interfaces inside PVE::Network::SDN::Controllers's
generate_controller_config. Here we could move out getting the file
location ($current_config_file) to a extra sub and mock that then
in the test system, if you'd like to check that out.

As ideally, no files outside the test directories would be parsed or

More information about the pve-devel mailing list