]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1021] changed option parameter
authorRazvan Becheriu <razvan@isc.org>
Wed, 19 Feb 2020 11:29:41 +0000 (13:29 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 20 Feb 2020 06:36:29 +0000 (08:36 +0200)
src/bin/perfdhcp/command_options.cc
src/bin/perfdhcp/tests/basic_scen_unittest.cc
src/bin/perfdhcp/tests/command_options_unittest.cc

index 071dba923498a3cd7cf72f63fca6610afd453a79..ede03b197d3acbf2764d388bf2060eae713a0294 100644 (file)
@@ -232,7 +232,7 @@ CommandOptions::initialize(int argc, char** argv, bool print_cmd_line) {
     // In this section we collect argument values from command line
     // they will be tuned and validated elsewhere
     while((opt = getopt_long(argc, argv,
-                             "hv46aA:r:t:R:b:n:p:d:D:l:P:a:L:N:M:s:iBc1"
+                             "huv46A:r:t:R:b:n:p:d:D:l:P:a:L:N:M:s:iBc1"
                              "T:X:O:o:E:S:I:x:W:w:e:f:F:g:",
                              long_options, NULL)) != -1) {
         stream << " -" << static_cast<char>(opt);
@@ -257,7 +257,7 @@ CommandOptions::initialize(int argc, char** argv, bool print_cmd_line) {
             }
             break;
 
-        case 'a':
+        case 'u':
             addr_unique_ = true;
             break;
 
@@ -1105,7 +1105,7 @@ CommandOptions::printCommandLine() const {
 void
 CommandOptions::usage() const {
     std::cout <<
-        "perfdhcp [-hva] [-4|-6] [-A<encapsulation-level>] [-e<lease-type>]\n"
+        "perfdhcp [-huv] [-4|-6] [-A<encapsulation-level>] [-e<lease-type>]\n"
         "         [-r<rate>] [-f<renew-rate>]\n"
         "         [-F<release-rate>] [-t<report>] [-R<range>] [-b<base>]\n"
         "         [-n<num-request>] [-p<test-period>] [-d<drop-time>]\n"
@@ -1143,7 +1143,7 @@ CommandOptions::usage() const {
         "-1: Take the server-ID option from the first received message.\n"
         "-4: DHCPv4 operation (default). This is incompatible with the -6 option.\n"
         "-6: DHCPv6 operation. This is incompatible with the -4 option.\n"
-        "-a: Enable checking address uniqueness. Lease valid lifetime\n"
+        "-u: Enable checking address uniqueness. Lease valid lifetime\n"
         "    should not be shorter than test duration.\n"
         "-b<base>: The base mac, duid, IP, etc, used to simulate different\n"
         "    clients.  This can be specified multiple times, each instance is\n"
index 32bafa47cc1d47369d8cbfde0ca9a1bdc20df579..cd06e72259e303f7d71c27124b851c73ee083c77 100644 (file)
@@ -245,7 +245,7 @@ TEST_F(BasicScenTest, Address4Unique) {
     // send more than 1 discover+request but with the same address
     // counter of a unique addresses should be 1
     CommandOptions opt;
-    processCmdLine(opt, "perfdhcp -a -l fake -r 10 -n 10 -g single 127.0.0.1");
+    processCmdLine(opt, "perfdhcp -u -l fake -r 10 -n 10 -g single 127.0.0.1");
     NakedBasicScen bs(opt);
     bs.run();
     EXPECT_GE(bs.fake_sock_.sent_cnt_, 5); // Discovery + Request
@@ -261,7 +261,7 @@ TEST_F(BasicScenTest, Address6Unique) {
     // send more than 1 solicit+request but with the same address
     // counter of a unique addresses should be 1
     CommandOptions opt;
-    processCmdLine(opt, "perfdhcp -6 -a -l fake -r 10 -n 10 -g single ::1");
+    processCmdLine(opt, "perfdhcp -6 -u -l fake -r 10 -n 10 -g single ::1");
     NakedBasicScen bs(opt);
     bs.run();
     EXPECT_GE(bs.fake_sock_.sent_cnt_, 5); // Solicit + Request
index 3223faa23c581977555a93348895aa38c1340d22..4b46698b66356d86886aa1d7163fe505229cce5b 100644 (file)
@@ -266,7 +266,7 @@ TEST_F(CommandOptionsTest, HelpVersion) {
 
 TEST_F(CommandOptionsTest, CheckAddressUniqueness) {
     CommandOptions opt;
-    EXPECT_NO_THROW(process(opt, "perfdhcp -6 -a -l ethx all"));
+    EXPECT_NO_THROW(process(opt, "perfdhcp -6 -u -l ethx all"));
     EXPECT_TRUE(opt.getAddrUnique());
 }