From: Razvan Becheriu Date: Fri, 4 Aug 2023 01:57:19 +0000 (+0300) Subject: [#2995] fixed ARM for perfdhcp -D option X-Git-Tag: Kea-2.5.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a7bf4e89920a12205d5fe05d2f02d0063626dab;p=thirdparty%2Fkea.git [#2995] fixed ARM for perfdhcp -D option --- diff --git a/doc/sphinx/man/perfdhcp.8.rst b/doc/sphinx/man/perfdhcp.8.rst index b3c3db088f..465d6f051f 100644 --- a/doc/sphinx/man/perfdhcp.8.rst +++ b/doc/sphinx/man/perfdhcp.8.rst @@ -410,7 +410,7 @@ Options Controlling a Test ``-D max-drop`` Aborts the test immediately if "max-drop" requests have been dropped. - Use ``-D 0`` to abort if even a single request has + Use ``-D 1`` to abort if even a single request has been dropped. "max-drop" must be a positive integer. If "max-drop" includes the suffix ``%``, it specifies the maximum percentage of requests that may be dropped before aborting. In this case, testing of diff --git a/src/bin/perfdhcp/tests/command_options_unittest.cc b/src/bin/perfdhcp/tests/command_options_unittest.cc index 08720d5038..b068a5c5bb 100644 --- a/src/bin/perfdhcp/tests/command_options_unittest.cc +++ b/src/bin/perfdhcp/tests/command_options_unittest.cc @@ -726,6 +726,9 @@ TEST_F(CommandOptionsTest, MaxDrop) { // Too many -D options EXPECT_THROW(process(opt, "perfdhcp -D 99% -D 13% -l ethx -D 10% all"), isc::InvalidParameter); + // Value is out of bounds + EXPECT_THROW(process(opt, "perfdhcp -D 0 -l ethx all"), + isc::InvalidParameter); // Percentage is out of bounds EXPECT_THROW(process(opt, "perfdhcp -D101% -D 13% -l ethx all"), isc::InvalidParameter);