]> 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)
committerEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 03:52:55 +0000 (19:52 -0800)
(cherry picked from commit f0f5b5f045baa1b3e45df397368e827b34c10325)
(cherry picked from commit 5fc5b514e4f6ed7eb8645ecb03391444a21a416d)

bin/tests/system/start.pl
bin/tests/system/stop.pl

index 8cafb3a60cbfcbca8c87374739c77747e6bf6fb3..8955bbc848419b96e9c24b2744550182784c863b 100644 (file)
@@ -28,7 +28,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.
 #
@@ -42,7 +42,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
@@ -50,7 +50,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"
@@ -58,16 +58,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];
@@ -118,7 +118,6 @@ if ($server) {
        foreach $name(@ns, @lwresd, @ans) {
                &start_server($name);
                &verify_server($name) if ($name =~ /^ns/);
-               
        }
 }
 
@@ -127,7 +126,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);
@@ -205,17 +204,17 @@ sub start_server {
                        $command .= "-D $server ";
                        $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";
                }
@@ -257,7 +256,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 {
@@ -319,7 +318,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 2bf38a633345936fc68fc486435b52472275df95..2374cb149b4f555347a91a950b8f3e02dd4f34d9 100644 (file)
@@ -27,7 +27,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.
 #
@@ -35,11 +35,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;
@@ -52,7 +52,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;