Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ foreach (@if) {
}

print @loopback ? 'ok ':'not ok ',4,"\n";

my $SKIPPED = ( $^O eq "freebsd" and qx(sysctl security.jail.jailed) =~ m{1} ) ? " # skip FreeBSD jail has no 127.0.0.1" : "";

my @local = grep {$s->if_addr($_) eq '127.0.0.1'} @loopback;

print @local ? 'ok ': 'not ok ',5,"\n";
print @local ? 'ok ': 'not ok ',5,"$SKIPPED\n";


8 changes: 5 additions & 3 deletions t/simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ foreach (@if) {
}

ok($loopback,"loopback device");
ok($loopback->address eq '127.0.0.1','loopback address');
ok($loopback->netmask eq '255.0.0.0','loopback netmask');

# skip ('FreeBSD jail has no 127.0.0.1') if ( $^O eq "freebsd" and qx(sysctl security.jail.jailed) =~ m{1} );

SKIP: {
my $index = $loopback->index;
skip ('index not implemented on this platform',3) unless defined $index;
skip ('index not implemented on this platform',5) unless defined $index;
ok($loopback->address eq '127.0.0.1','loopback address');
ok($loopback->netmask eq '255.0.0.0','loopback netmask');

ok(defined $index,'loopback index');

Expand Down