* (feature) Simplify restrictions: only -i >= 1 and -p >= 10 are enforced now
* (bugfix) Fix compatibility issue with AIX (#69, @blentzgh)
* (bugfix) Fix -q not suppressing some ICMP error messages (#83)
+ * (bugfix) Fix -M expecting an argument, when it shouldn't
2017-01-11 David Schweikert <david@schweikert.ch>
* Version 3.15
#!/usr/bin/perl -w
-use Test::Command tests => 4;
+use Test::Command tests => 7;
# -i n interval between sending ping packets (in millisec) (default 25)
# -l loop sending pings forever
# -m ping multiple interfaces on target host
+# -M don't fragment
# fping -i n
{
});
}
+# fping -M
+{
+my $cmd = Test::Command->new(cmd => "fping -M 127.0.0.1");
+$cmd->exit_is_num(0);
+$cmd->stdout_is_eq("127.0.0.1 is alive\n");
+$cmd->stderr_is_eq("");
+}
+
# fping -m -> test-14-internet-hosts
exit 0;
}
-plan tests => 18;
+plan tests => 21;
my $re_num = qr{\d+(?:\.\d+)?};
$cmd->stdout_is_eq("google-public-dns-a.google.com is alive\n");
$cmd->stderr_is_eq("");
}
+
+# fping -M
+{
+my $cmd = Test::Command->new(cmd => "fping -r 0 -b 10000 -M 8.8.8.8");
+$cmd->exit_is_num(1);
+$cmd->stdout_is_eq("8.8.8.8 is unreachable\n");
+$cmd->stderr_is_eq("8.8.8.8: error while sending ping: Message too long\n");
+}
/* get command line options */
- while( ( c = getopt( argc, argv, "gedhlmnNqusaAvDRz:t:H:i:p:f:r:c:b:C:Q:B:S:I:T:O:M:o" ) ) != EOF )
+ while( ( c = getopt( argc, argv, "ADMNRadeghlmnoqsuvzB:C:H:I:O:Q:S:T:b:c:f:i:p:r:t:" ) ) != EOF )
{
switch( c )
{