public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Stefan Lendl <s.lendl@proxmox.com>
Subject: [pve-devel] applied: [PATCH pve-network] tests: mocking cfs_lock_file to pass subnet tests
Date: Wed, 29 Nov 2023 15:09:46 +0100	[thread overview]
Message-ID: <34aaf8fb-8b72-4f49-98cb-3141cd0771ea@proxmox.com> (raw)
In-Reply-To: <20231124131612.234972-2-s.lendl@proxmox.com>

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@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
written.




      reply	other threads:[~2023-11-29 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24 13:16 [pve-devel] " Stefan Lendl
2023-11-29 14:09 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34aaf8fb-8b72-4f49-98cb-3141cd0771ea@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.lendl@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal