]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt46602] Minor formatting changes to Perl files
authorStephen Morris <stephen@isc.org>
Fri, 15 Dec 2017 18:42:52 +0000 (18:42 +0000)
committerStephen Morris <stephen@isc.org>
Fri, 16 Feb 2018 15:19:44 +0000 (15:19 +0000)
bin/tests/system/start.pl
bin/tests/system/stop.pl

index 179e8d09e5f3f79c8fe61e85b98e925d8d9363c3..3748f487e078ec31ff64f831f8c1d864bcca38c0 100644 (file)
@@ -17,7 +17,7 @@ use Cwd 'abs_path';
 use Getopt::Long;
 
 # Usage:
-#   perl start.pl [--noclean] --restart] [--port port]  test [server [options]]
+#   perl start.pl [--noclean] [--restart] [--port port]  test [server [options]]
 #
 #   --noclean       Do not cleanup files in server directory.
 #
@@ -31,7 +31,7 @@ use Getopt::Long;
 #                   "named" nameservers, this can be overridden by the presence
 #                   of the file "named.port" in the server directory containing
 #                   the number of the query port.)
-#           
+#
 #   test            Name of the test directory.
 #
 #   server          Name of the server directory.  This will be of the form
@@ -39,7 +39,7 @@ use Getopt::Long;
 #                   If not given, the script will start all the servers in the
 #                   test directory.
 #
-#   options         Alternate options for the server,
+#   options         Alternate options for the server.
 #
 #                   NOTE: options must be specified with '-- "<option list>"',
 #                   for instance: start.pl . ns1 -- "-c n.conf -d 43"
@@ -47,16 +47,16 @@ use Getopt::Long;
 #                   ALSO NOTE: this variable will be filled with the contents
 #                   of the first non-commented/non-blank line of args in a file
 #                   called "named.args" in an ns*/ subdirectory. Only the FIRST
-#                          non-commented/non-blank line is used (everything else in the
-#                          file is ignored. If "options" is already set, then
-#                          "named.args" is ignored.
+#                   non-commented/non-blank line is used (everything else in the
+#                   file is ignored). If "options" is already set, then
+#                   "named.args" is ignored.
 
 my $usage = "usage: $0 [--noclean] [--restart] [--port <port>] test-directory [server-directory [server-options]]";
 my $noclean = '';
 my $restart = '';
-my $defaultport = 5300;
+my $queryport = 5300;
 
-GetOptions('noclean' => \$noclean, 'restart' => \$restart, 'port=i' => \$defaultport) or die "$usage\n";
+GetOptions('noclean' => \$noclean, 'restart' => \$restart, 'port=i' => \$queryport) or die "$usage\n";
 
 my $test = $ARGV[0];
 my $server = $ARGV[1];
@@ -105,7 +105,6 @@ if ($server) {
        foreach $name(@ns, @ans) {
                &start_server($name);
                &verify_server($name) if ($name =~ /^ns/);
-               
        }
 }
 
@@ -114,7 +113,7 @@ if ($server) {
 sub check_ports {
        my $server = shift;
        my $options = "";
-       my $port = $defaultport;
+       my $port = $queryport;
        my $file = "";
 
        $file = $testdir . "/" . $server . "/named.port" if ($server);
@@ -193,17 +192,17 @@ sub start_server {
                        $command .= "-X named.lock ";
                        $command .= "-m record,size,mctx ";
                        $command .= "-T clienttest ";
-                       $command .= "-T nosoa " 
+                       $command .= "-T nosoa "
                                if (-e "$testdir/$server/named.nosoa");
-                       $command .= "-T noaa " 
+                       $command .= "-T noaa "
                                if (-e "$testdir/$server/named.noaa");
-                       $command .= "-T noedns " 
+                       $command .= "-T noedns "
                                if (-e "$testdir/$server/named.noedns");
-                       $command .= "-T dropedns " 
+                       $command .= "-T dropedns "
                                if (-e "$testdir/$server/named.dropedns");
-                       $command .= "-T maxudp512 " 
+                       $command .= "-T maxudp512 "
                                if (-e "$testdir/$server/named.maxudp512");
-                       $command .= "-T maxudp1460 " 
+                       $command .= "-T maxudp1460 "
                                if (-e "$testdir/$server/named.maxudp1460");
                        $command .= "-c named.conf -d 99 -g -U 4";
                }
@@ -218,7 +217,7 @@ sub start_server {
        } elsif ($server =~ /^ans/) {
                $cleanup_files = "{ans.run}";
                 if (-e "$testdir/$server/ans.py") {
-                        $command = "$PYTHON -u ans.py 10.53.0.$' $defaultport";
+                        $command = "$PYTHON -u ans.py 10.53.0.$' $queryport";
                 } elsif (-e "$testdir/$server/ans.pl") {
                         $command = "$PERL ans.pl";
                 } else {
@@ -280,7 +279,7 @@ sub start_server {
 sub verify_server {
        my $server = shift;
        my $n = $server;
-       my $port = $defaultport;
+       my $port = $queryport;
        my $tcp = "+tcp";
 
        $n =~ s/^ns//;
index c79d41c7df940722b4510e3ad3a33f412f7c9b96..e06ff54427097784390ddfb8118d9589d8bf28f3 100644 (file)
@@ -18,7 +18,7 @@ use Cwd 'abs_path';
 use Getopt::Long;
 
 # Usage:
-#   perl stop.pl [[-use-rndc] [--port port] test [server]
+#   perl stop.pl [-use-rndc [--port port]] test [server]
 #
 #   --use-rndc      Attempt to stop the server via the "rndc stop" command.
 #
@@ -26,11 +26,11 @@ use Getopt::Long;
 #                   command port over which the attempt should be made.  If
 #                   not specified, port 9953 is used.
 #
-#   test            Name of the test directory,
+#   test            Name of the test directory.
 #
-#   server          Name of the server directory
+#   server          Name of the server directory.
 
-my $usage = "usage: $0 [--use-rndc] [--port port] test-directory [server-directory]";
+my $usage = "usage: $0 [--use-rndc [--port port]] test-directory [server-directory]";
 
 my $use_rndc = 0;
 my $port = 9953;
@@ -43,7 +43,7 @@ my $server = $ARGV[1];
 die "$usage\n" unless defined($test);
 die "No test directory: \"$test\"\n" unless (-d $test);
 die "No server directory: \"$server\"\n" if (defined($server) && !-d "$test/$server");
-    
+
 # Global variables
 my $testdir = abs_path($test);
 my @servers;