X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=test%2Fetc_network_interfaces%2Fruntest.pl;fp=test%2Fetc_network_interfaces%2Fruntest.pl;h=92cd7f8d777ef52b45f609ad117cecb590a985b4;hp=ba26dcdab3c7a2fee8feaec67eb7b8281c02a1e2;hb=12a235d624c04795a542703a48f65d6d1a22c474;hpb=2701dc74793e1325c177b1829dc9705c0a76ba04 diff --git a/test/etc_network_interfaces/runtest.pl b/test/etc_network_interfaces/runtest.pl index ba26dcd..92cd7f8 100755 --- a/test/etc_network_interfaces/runtest.pl +++ b/test/etc_network_interfaces/runtest.pl @@ -59,16 +59,15 @@ sub flush_files() { ## Interface parsing: ## -# Read an interfaces file with optional /proc/net/dev and /proc/net/if_inet6 -# file content strings, which default to the provided ones. +# Read an interfaces file with optional /proc/net/dev file content string and +# the list of active interfaces, which otherwise default sub r($;$$) { - my ($ifaces, $proc_net_dev, $proc_net_if_inet6) = @_; + my ($ifaces, $proc_net_dev, $active) = @_; $proc_net_dev //= load('proc_net_dev'); - $proc_net_if_inet6 //= load('proc_net_if_inet6'); + $active //= [split(/\s+/, load('active_interfaces'))]; open my $fh1, '<', \$ifaces; open my $fh2, '<', \$proc_net_dev; - open my $fh3, '<', \$proc_net_if_inet6; - $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $fh3); + $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $active); close $fh1; }