]> 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 17:27:09 +0000 (09:27 -0800)
(cherry picked from commit f0f5b5f045baa1b3e45df397368e827b34c10325)
(cherry picked from commit 5fc5b514e4f6ed7eb8645ecb03391444a21a416d)
(cherry picked from commit 09e1b5e1437b8830d50b3407591f5b202e6d2ef2)

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

index a6766c23ede6abf82a043496db2ae21b2de7ed69..de46eacf02097124dc81543c9dd959f5cd24bbff 100644 (file)
@@ -26,7 +26,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.
 #
@@ -48,7 +48,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"
@@ -56,16 +56,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];
@@ -116,7 +116,6 @@ if ($server) {
        foreach $name(@ns, @lwresd, @ans) {
                &start_server($name);
                &verify_server($name) if ($name =~ /^ns/);
-               
        }
 }
 
@@ -125,7 +124,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);
@@ -202,9 +201,9 @@ sub start_server {
                } else {
                        $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 dropedns "
                                if (-e "$testdir/$server/named.dropedns");
@@ -248,7 +247,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 {
@@ -310,7 +309,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 027c67ac37b0e4ca2f8f264470e51c2ae70710a2..2382e71bea00ca30c22f1b939211d8a2fbe8a636 100644 (file)
@@ -25,7 +25,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.
 #
@@ -33,11 +33,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;
@@ -50,7 +50,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;