Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 2 | /* |
Davide Pesavento | b7bfcb9 | 2022-05-22 23:55:23 -0400 | [diff] [blame] | 3 | * Copyright (c) 2014-2022, Regents of the University of California, |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 4 | * Arizona Board of Regents, |
| 5 | * Colorado State University, |
| 6 | * University Pierre & Marie Curie, Sorbonne University, |
| 7 | * Washington University in St. Louis, |
| 8 | * Beijing Institute of Technology, |
| 9 | * The University of Memphis. |
| 10 | * |
| 11 | * This file is part of NFD (Named Data Networking Forwarding Daemon). |
| 12 | * See AUTHORS.md for complete list of NFD authors and contributors. |
| 13 | * |
| 14 | * NFD is free software: you can redistribute it and/or modify it under the terms |
| 15 | * of the GNU General Public License as published by the Free Software Foundation, |
| 16 | * either version 3 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 19 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 20 | * PURPOSE. See the GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License along with |
| 23 | * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 24 | */ |
| 25 | |
Junxiao Shi | 331ade7 | 2016-08-19 14:07:19 +0000 | [diff] [blame] | 26 | #include "nfdc/face-module.hpp" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 27 | |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 28 | #include "execute-command-fixture.hpp" |
| 29 | #include "status-fixture.hpp" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 30 | |
Davide Pesavento | e422f9e | 2022-06-03 01:30:23 -0400 | [diff] [blame] | 31 | namespace nfd::tools::nfdc::tests { |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 32 | |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 33 | using ndn::nfd::FaceQueryFilter; |
| 34 | |
Junxiao Shi | 331ade7 | 2016-08-19 14:07:19 +0000 | [diff] [blame] | 35 | BOOST_AUTO_TEST_SUITE(Nfdc) |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 36 | BOOST_AUTO_TEST_SUITE(TestFaceModule) |
| 37 | |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 38 | BOOST_FIXTURE_TEST_SUITE(ListCommand, ExecuteCommandFixture) |
| 39 | |
| 40 | const std::string NONQUERY_OUTPUT = |
| 41 | "faceid=134 remote=udp4://233.252.0.4:6363 local=udp4://192.0.2.1:6363" |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 42 | " congestion={base-marking-interval=12345ms default-threshold=54321B} mtu=1024" |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 43 | " counters={in={22562i 22031d 63n 2522915B} out={30121i 20940d 1218n 1353592B}}" |
| 44 | " flags={non-local permanent multi-access}\n" |
| 45 | "faceid=745 remote=fd://75 local=unix:///var/run/nfd.sock" |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 46 | " congestion={base-marking-interval=100ms default-threshold=65536B} mtu=8800" |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 47 | " counters={in={18998i 26701d 147n 4672308B} out={34779i 17028d 1176n 8957187B}}" |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 48 | " flags={local on-demand point-to-point local-fields lp-reliability congestion-marking}\n"; |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 49 | |
| 50 | BOOST_AUTO_TEST_CASE(NormalNonQuery) |
| 51 | { |
| 52 | this->processInterest = [this] (const Interest& interest) { |
| 53 | FaceStatus payload1; |
| 54 | payload1.setFaceId(134) |
| 55 | .setRemoteUri("udp4://233.252.0.4:6363") |
| 56 | .setLocalUri("udp4://192.0.2.1:6363") |
| 57 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 58 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_PERMANENT) |
| 59 | .setLinkType(ndn::nfd::LINK_TYPE_MULTI_ACCESS) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 60 | .setBaseCongestionMarkingInterval(12345_ms) |
| 61 | .setDefaultCongestionThreshold(54321) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 62 | .setMtu(1024) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 63 | .setNInInterests(22562) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 64 | .setNInData(22031) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 65 | .setNInNacks(63) |
| 66 | .setNOutInterests(30121) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 67 | .setNOutData(20940) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 68 | .setNOutNacks(1218) |
| 69 | .setNInBytes(2522915) |
| 70 | .setNOutBytes(1353592); |
| 71 | FaceStatus payload2; |
| 72 | payload2.setFaceId(745) |
| 73 | .setRemoteUri("fd://75") |
| 74 | .setLocalUri("unix:///var/run/nfd.sock") |
| 75 | .setFaceScope(ndn::nfd::FACE_SCOPE_LOCAL) |
| 76 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
| 77 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 78 | .setBaseCongestionMarkingInterval(100_ms) |
| 79 | .setDefaultCongestionThreshold(65536) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 80 | .setMtu(8800) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 81 | .setFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED, true) |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 82 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 83 | .setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, true) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 84 | .setNInInterests(18998) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 85 | .setNInData(26701) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 86 | .setNInNacks(147) |
| 87 | .setNOutInterests(34779) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 88 | .setNOutData(17028) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 89 | .setNOutNacks(1176) |
| 90 | .setNInBytes(4672308) |
| 91 | .setNOutBytes(8957187); |
| 92 | this->sendDataset("/localhost/nfd/faces/list", payload1, payload2); |
| 93 | }; |
| 94 | |
| 95 | this->execute("face list"); |
| 96 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 97 | BOOST_CHECK(out.is_equal(NONQUERY_OUTPUT)); |
| 98 | BOOST_CHECK(err.is_empty()); |
| 99 | } |
| 100 | |
| 101 | const std::string QUERY_OUTPUT = |
| 102 | "faceid=177 remote=tcp4://53.239.9.114:6363 local=tcp4://164.0.31.106:20396" |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 103 | " congestion={base-marking-interval=555ms default-threshold=10000B} mtu=2000" |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 104 | " counters={in={2325i 1110d 79n 4716834B} out={2278i 485d 841n 308108B}}" |
| 105 | " flags={non-local persistent point-to-point}\n"; |
| 106 | |
| 107 | BOOST_AUTO_TEST_CASE(NormalQuery) |
| 108 | { |
| 109 | this->processInterest = [this] (const Interest& interest) { |
| 110 | BOOST_CHECK(Name("/localhost/nfd/faces/query").isPrefixOf(interest.getName())); |
| 111 | BOOST_CHECK_EQUAL(interest.getName().size(), 5); |
| 112 | FaceQueryFilter filter(interest.getName().at(4).blockFromValue()); |
| 113 | FaceQueryFilter expectedFilter; |
| 114 | expectedFilter.setRemoteUri("tcp4://53.239.9.114:6363") |
| 115 | .setLocalUri("tcp4://164.0.31.106:20396") |
| 116 | .setUriScheme("tcp4"); |
| 117 | BOOST_CHECK_EQUAL(filter, expectedFilter); |
| 118 | |
| 119 | FaceStatus payload; |
| 120 | payload.setFaceId(177) |
| 121 | .setRemoteUri("tcp4://53.239.9.114:6363") |
| 122 | .setLocalUri("tcp4://164.0.31.106:20396") |
| 123 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 124 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT) |
| 125 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 126 | .setBaseCongestionMarkingInterval(555_ms) |
| 127 | .setDefaultCongestionThreshold(10000) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 128 | .setMtu(2000) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 129 | .setNInInterests(2325) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 130 | .setNInData(1110) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 131 | .setNInNacks(79) |
| 132 | .setNOutInterests(2278) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 133 | .setNOutData(485) |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 134 | .setNOutNacks(841) |
| 135 | .setNInBytes(4716834) |
| 136 | .setNOutBytes(308108); |
| 137 | this->sendDataset(interest.getName(), payload); |
| 138 | }; |
| 139 | |
| 140 | this->execute("face list tcp://53.239.9.114 scheme tcp4 local tcp://164.0.31.106:20396"); |
| 141 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 142 | BOOST_CHECK(out.is_equal(QUERY_OUTPUT)); |
| 143 | BOOST_CHECK(err.is_empty()); |
| 144 | } |
| 145 | |
| 146 | BOOST_AUTO_TEST_CASE(NotFound) |
| 147 | { |
| 148 | this->processInterest = [this] (const Interest& interest) { |
| 149 | this->sendEmptyDataset(interest.getName()); |
| 150 | }; |
| 151 | |
| 152 | this->execute("face list scheme udp6"); |
| 153 | BOOST_CHECK_EQUAL(exitCode, 3); |
| 154 | BOOST_CHECK(out.is_empty()); |
| 155 | BOOST_CHECK(err.is_equal("Face not found\n")); |
| 156 | } |
| 157 | |
| 158 | BOOST_AUTO_TEST_CASE(Error) |
| 159 | { |
| 160 | this->processInterest = nullptr; // no response |
| 161 | |
| 162 | this->execute("face list local udp4://31.67.17.2:6363"); |
| 163 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 164 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | 359135c | 2018-06-26 21:02:12 -0700 | [diff] [blame] | 165 | BOOST_CHECK(err.is_equal("Error 10060 when querying face: Timeout exceeded\n")); |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | BOOST_AUTO_TEST_SUITE_END() // ListCommand |
| 169 | |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 170 | BOOST_FIXTURE_TEST_SUITE(ShowCommand, ExecuteCommandFixture) |
| 171 | |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 172 | const std::string NORMAL_ALL_CONGESTION_OUTPUT = std::string(R"TEXT( |
| 173 | faceid=256 |
| 174 | remote=udp4://84.67.35.111:6363 |
| 175 | local=udp4://79.91.49.215:6363 |
| 176 | congestion={base-marking-interval=123ms default-threshold=10000B} |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 177 | mtu=4000 |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 178 | counters={in={28975i 28232d 212n 13307258B} out={19525i 30993d 1038n 6231946B}} |
| 179 | flags={non-local on-demand point-to-point} |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 180 | )TEXT").substr(1); |
| 181 | |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 182 | BOOST_AUTO_TEST_CASE(NormalAllCongestionParams) |
| 183 | { |
| 184 | this->processInterest = [this] (const Interest& interest) { |
| 185 | BOOST_CHECK(Name("/localhost/nfd/faces/query").isPrefixOf(interest.getName())); |
| 186 | BOOST_CHECK_EQUAL(interest.getName().size(), 5); |
| 187 | FaceQueryFilter filter(interest.getName().at(4).blockFromValue()); |
| 188 | BOOST_CHECK_EQUAL(filter, FaceQueryFilter().setFaceId(256)); |
| 189 | |
| 190 | FaceStatus payload; |
| 191 | payload.setFaceId(256) |
| 192 | .setRemoteUri("udp4://84.67.35.111:6363") |
| 193 | .setLocalUri("udp4://79.91.49.215:6363") |
| 194 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 195 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 196 | .setMtu(4000) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 197 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
| 198 | .setBaseCongestionMarkingInterval(123_ms) |
| 199 | .setDefaultCongestionThreshold(10000) |
| 200 | .setNInInterests(28975) |
| 201 | .setNInData(28232) |
| 202 | .setNInNacks(212) |
| 203 | .setNOutInterests(19525) |
| 204 | .setNOutData(30993) |
| 205 | .setNOutNacks(1038) |
| 206 | .setNInBytes(13307258) |
| 207 | .setNOutBytes(6231946); |
| 208 | |
| 209 | this->sendDataset(interest.getName(), payload); |
| 210 | }; |
| 211 | |
| 212 | this->execute("face show 256"); |
| 213 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 214 | BOOST_CHECK(out.is_equal(NORMAL_ALL_CONGESTION_OUTPUT)); |
| 215 | BOOST_CHECK(err.is_empty()); |
| 216 | } |
| 217 | |
| 218 | const std::string NORMAL_INTERVAL_CONGESTION_OUTPUT = std::string(R"TEXT( |
| 219 | faceid=256 |
| 220 | remote=udp4://84.67.35.111:6363 |
| 221 | local=udp4://79.91.49.215:6363 |
| 222 | congestion={base-marking-interval=123ms} |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 223 | mtu=3000 |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 224 | counters={in={28975i 28232d 212n 13307258B} out={19525i 30993d 1038n 6231946B}} |
| 225 | flags={non-local on-demand point-to-point} |
| 226 | )TEXT").substr(1); |
| 227 | |
| 228 | BOOST_AUTO_TEST_CASE(NormalIntervalCongestionParams) |
| 229 | { |
| 230 | this->processInterest = [this] (const Interest& interest) { |
| 231 | BOOST_CHECK(Name("/localhost/nfd/faces/query").isPrefixOf(interest.getName())); |
| 232 | BOOST_CHECK_EQUAL(interest.getName().size(), 5); |
| 233 | FaceQueryFilter filter(interest.getName().at(4).blockFromValue()); |
| 234 | BOOST_CHECK_EQUAL(filter, FaceQueryFilter().setFaceId(256)); |
| 235 | |
| 236 | FaceStatus payload; |
| 237 | payload.setFaceId(256) |
| 238 | .setRemoteUri("udp4://84.67.35.111:6363") |
| 239 | .setLocalUri("udp4://79.91.49.215:6363") |
| 240 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 241 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
| 242 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
| 243 | .setBaseCongestionMarkingInterval(123_ms) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 244 | .setMtu(3000) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 245 | .setNInInterests(28975) |
| 246 | .setNInData(28232) |
| 247 | .setNInNacks(212) |
| 248 | .setNOutInterests(19525) |
| 249 | .setNOutData(30993) |
| 250 | .setNOutNacks(1038) |
| 251 | .setNInBytes(13307258) |
| 252 | .setNOutBytes(6231946); |
| 253 | |
| 254 | this->sendDataset(interest.getName(), payload); |
| 255 | }; |
| 256 | |
| 257 | this->execute("face show 256"); |
| 258 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 259 | BOOST_CHECK(out.is_equal(NORMAL_INTERVAL_CONGESTION_OUTPUT)); |
| 260 | BOOST_CHECK(err.is_empty()); |
| 261 | } |
| 262 | |
| 263 | const std::string NORMAL_THRESHOLD_CONGESTION_OUTPUT = std::string(R"TEXT( |
| 264 | faceid=256 |
| 265 | remote=udp4://84.67.35.111:6363 |
| 266 | local=udp4://79.91.49.215:6363 |
| 267 | congestion={default-threshold=10000B} |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 268 | mtu=5000 |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 269 | counters={in={28975i 28232d 212n 13307258B} out={19525i 30993d 1038n 6231946B}} |
| 270 | flags={non-local on-demand point-to-point} |
| 271 | )TEXT").substr(1); |
| 272 | |
| 273 | BOOST_AUTO_TEST_CASE(NormalThresholdCongestionParams) |
| 274 | { |
| 275 | this->processInterest = [this] (const Interest& interest) { |
| 276 | BOOST_CHECK(Name("/localhost/nfd/faces/query").isPrefixOf(interest.getName())); |
| 277 | BOOST_CHECK_EQUAL(interest.getName().size(), 5); |
| 278 | FaceQueryFilter filter(interest.getName().at(4).blockFromValue()); |
| 279 | BOOST_CHECK_EQUAL(filter, FaceQueryFilter().setFaceId(256)); |
| 280 | |
| 281 | FaceStatus payload; |
| 282 | payload.setFaceId(256) |
| 283 | .setRemoteUri("udp4://84.67.35.111:6363") |
| 284 | .setLocalUri("udp4://79.91.49.215:6363") |
| 285 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 286 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 287 | .setMtu(5000) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 288 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
| 289 | .setDefaultCongestionThreshold(10000) |
| 290 | .setNInInterests(28975) |
| 291 | .setNInData(28232) |
| 292 | .setNInNacks(212) |
| 293 | .setNOutInterests(19525) |
| 294 | .setNOutData(30993) |
| 295 | .setNOutNacks(1038) |
| 296 | .setNInBytes(13307258) |
| 297 | .setNOutBytes(6231946); |
| 298 | |
| 299 | this->sendDataset(interest.getName(), payload); |
| 300 | }; |
| 301 | |
| 302 | this->execute("face show 256"); |
| 303 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 304 | BOOST_CHECK(out.is_equal(NORMAL_THRESHOLD_CONGESTION_OUTPUT)); |
| 305 | BOOST_CHECK(err.is_empty()); |
| 306 | } |
| 307 | |
| 308 | const std::string NORMAL_NO_CONGESTION_OUTPUT = std::string(R"TEXT( |
| 309 | faceid=256 |
| 310 | remote=udp4://84.67.35.111:6363 |
| 311 | local=udp4://79.91.49.215:6363 |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 312 | mtu=6000 |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 313 | counters={in={28975i 28232d 212n 13307258B} out={19525i 30993d 1038n 6231946B}} |
| 314 | flags={non-local on-demand point-to-point} |
| 315 | )TEXT").substr(1); |
| 316 | |
| 317 | BOOST_AUTO_TEST_CASE(NormalNoCongestionParams) |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 318 | { |
| 319 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 36e5429 | 2017-02-17 18:43:16 +0000 | [diff] [blame] | 320 | BOOST_CHECK(Name("/localhost/nfd/faces/query").isPrefixOf(interest.getName())); |
Junxiao Shi | 8f803f2 | 2017-02-10 03:04:28 +0000 | [diff] [blame] | 321 | BOOST_CHECK_EQUAL(interest.getName().size(), 5); |
| 322 | FaceQueryFilter filter(interest.getName().at(4).blockFromValue()); |
| 323 | BOOST_CHECK_EQUAL(filter, FaceQueryFilter().setFaceId(256)); |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 324 | |
| 325 | FaceStatus payload; |
| 326 | payload.setFaceId(256) |
| 327 | .setRemoteUri("udp4://84.67.35.111:6363") |
| 328 | .setLocalUri("udp4://79.91.49.215:6363") |
| 329 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 330 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 331 | .setMtu(6000) |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 332 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
| 333 | .setNInInterests(28975) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 334 | .setNInData(28232) |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 335 | .setNInNacks(212) |
| 336 | .setNOutInterests(19525) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 337 | .setNOutData(30993) |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 338 | .setNOutNacks(1038) |
| 339 | .setNInBytes(13307258) |
| 340 | .setNOutBytes(6231946); |
| 341 | |
Junxiao Shi | 8f803f2 | 2017-02-10 03:04:28 +0000 | [diff] [blame] | 342 | this->sendDataset(interest.getName(), payload); |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 343 | }; |
| 344 | |
| 345 | this->execute("face show 256"); |
| 346 | BOOST_CHECK_EQUAL(exitCode, 0); |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 347 | BOOST_CHECK(out.is_equal(NORMAL_NO_CONGESTION_OUTPUT)); |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 348 | BOOST_CHECK(err.is_empty()); |
| 349 | } |
| 350 | |
| 351 | BOOST_AUTO_TEST_CASE(NotFound) |
| 352 | { |
| 353 | this->processInterest = [this] (const Interest& interest) { |
| 354 | this->sendEmptyDataset(interest.getName()); |
| 355 | }; |
| 356 | |
| 357 | this->execute("face show 256"); |
| 358 | BOOST_CHECK_EQUAL(exitCode, 3); |
| 359 | BOOST_CHECK(out.is_empty()); |
Junxiao Shi | 8f803f2 | 2017-02-10 03:04:28 +0000 | [diff] [blame] | 360 | BOOST_CHECK(err.is_equal("Face not found\n")); |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 361 | } |
| 362 | |
| 363 | BOOST_AUTO_TEST_CASE(Error) |
| 364 | { |
| 365 | this->processInterest = nullptr; // no response |
| 366 | |
| 367 | this->execute("face show 256"); |
| 368 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 369 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | 359135c | 2018-06-26 21:02:12 -0700 | [diff] [blame] | 370 | BOOST_CHECK(err.is_equal("Error 10060 when querying face: Timeout exceeded\n")); |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 371 | } |
| 372 | |
| 373 | BOOST_AUTO_TEST_SUITE_END() // ShowCommand |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 374 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 375 | class ExecuteFaceCreateCommandFixture : public ExecuteCommandFixture |
| 376 | { |
| 377 | protected: |
| 378 | void |
Davide Pesavento | b7bfcb9 | 2022-05-22 23:55:23 -0400 | [diff] [blame] | 379 | respond409(const Interest& interest, FacePersistency persistency, |
| 380 | std::optional<uint64_t> mtu = std::nullopt, |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 381 | bool enableLpReliability = false, |
| 382 | bool enableCongestionMarking = false) |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 383 | { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 384 | MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/create"); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 385 | ControlParameters body; |
| 386 | body.setFaceId(1172) |
| 387 | .setUri("udp4://100.77.30.65:6363") |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 388 | .setLocalUri("udp4://68.62.26.57:24087") |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 389 | .setFacePersistency(persistency) |
| 390 | .setFlags(0); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 391 | if (mtu) { |
| 392 | body.setMtu(*mtu); |
| 393 | } |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 394 | if (enableLpReliability) { |
| 395 | body.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true, false); |
| 396 | } |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 397 | if (enableCongestionMarking) { |
| 398 | body.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, true, false); |
| 399 | } |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 400 | this->failCommand(interest, 409, "conflict-409", body); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 401 | } |
| 402 | }; |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 403 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 404 | BOOST_FIXTURE_TEST_SUITE(CreateCommand, ExecuteFaceCreateCommandFixture) |
| 405 | |
| 406 | BOOST_AUTO_TEST_CASE(Creating) |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 407 | { |
| 408 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 409 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/create"); |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 410 | BOOST_REQUIRE(req.hasUri()); |
| 411 | BOOST_CHECK_EQUAL(req.getUri(), "udp4://159.242.33.78:6363"); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 412 | BOOST_CHECK(!req.hasLocalUri()); |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 413 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 414 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 415 | |
| 416 | ControlParameters resp; |
| 417 | resp.setFaceId(2130) |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 418 | .setUri("udp4://159.242.33.78:6363") |
| 419 | .setLocalUri("udp4://179.63.153.45:28835") |
Junxiao Shi | 5c1bb36 | 2017-05-11 16:03:38 +0000 | [diff] [blame] | 420 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 421 | .setFlags(0); |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 422 | this->succeedCommand(interest, resp); |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 423 | }; |
| 424 | |
| 425 | this->execute("face create udp://159.242.33.78"); |
| 426 | BOOST_CHECK_EQUAL(exitCode, 0); |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 427 | BOOST_CHECK(out.is_equal("face-created id=2130 local=udp4://179.63.153.45:28835 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 428 | "remote=udp4://159.242.33.78:6363 persistency=persistent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 429 | "reliability=off congestion-marking=off\n")); |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 430 | BOOST_CHECK(err.is_empty()); |
| 431 | } |
| 432 | |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 433 | BOOST_AUTO_TEST_CASE(CreatingWithParams) |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 434 | { |
| 435 | this->processInterest = [this] (const Interest& interest) { |
| 436 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/create"); |
| 437 | BOOST_REQUIRE(req.hasUri()); |
| 438 | BOOST_CHECK_EQUAL(req.getUri(), "udp4://22.91.89.51:19903"); |
| 439 | BOOST_REQUIRE(req.hasLocalUri()); |
| 440 | BOOST_CHECK_EQUAL(req.getLocalUri(), "udp4://98.68.23.71:6363"); |
| 441 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 442 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERMANENT); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 443 | BOOST_REQUIRE(req.hasBaseCongestionMarkingInterval()); |
| 444 | BOOST_CHECK_EQUAL(req.getBaseCongestionMarkingInterval(), 100_ms); |
| 445 | BOOST_REQUIRE(req.hasDefaultCongestionThreshold()); |
| 446 | BOOST_CHECK_EQUAL(req.getDefaultCongestionThreshold(), 65536); |
| 447 | BOOST_REQUIRE(req.hasMtu()); |
| 448 | BOOST_CHECK_EQUAL(req.getMtu(), 10000); |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 449 | BOOST_CHECK(req.hasFlags()); |
| 450 | BOOST_CHECK(req.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 451 | |
| 452 | ControlParameters resp; |
| 453 | resp.setFaceId(301) |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 454 | .setUri("udp4://22.91.89.51:19903") |
| 455 | .setLocalUri("udp4://98.68.23.71:6363") |
Junxiao Shi | 5c1bb36 | 2017-05-11 16:03:38 +0000 | [diff] [blame] | 456 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERMANENT) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 457 | .setBaseCongestionMarkingInterval(100_ms) |
| 458 | .setDefaultCongestionThreshold(65536) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 459 | .setMtu(8800) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 460 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true, false) |
| 461 | .setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, true, false); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 462 | this->succeedCommand(interest, resp); |
| 463 | }; |
| 464 | |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 465 | this->execute("face create udp://22.91.89.51:19903 permanent local udp://98.68.23.71 reliability on " |
| 466 | "congestion-marking on congestion-marking-interval 100 " |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 467 | "default-congestion-threshold 65536 mtu 10000"); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 468 | BOOST_CHECK_EQUAL(exitCode, 0); |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 469 | BOOST_CHECK(out.is_equal("face-created id=301 local=udp4://98.68.23.71:6363 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 470 | "remote=udp4://22.91.89.51:19903 persistency=permanent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 471 | "reliability=on congestion-marking=on " |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 472 | "congestion-marking-interval=100ms default-congestion-threshold=65536B " |
| 473 | "mtu=8800\n")); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 474 | BOOST_CHECK(err.is_empty()); |
| 475 | } |
| 476 | |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 477 | BOOST_AUTO_TEST_CASE(ChangingMtu) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 478 | { |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 479 | bool hasUpdateCommand = false; |
| 480 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 481 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 482 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT, 5000); |
| 483 | return; |
| 484 | } |
| 485 | |
| 486 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 487 | hasUpdateCommand = true; |
| 488 | BOOST_REQUIRE(req.hasFaceId()); |
| 489 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 490 | BOOST_CHECK(!req.hasFacePersistency()); |
| 491 | BOOST_REQUIRE(req.hasMtu()); |
| 492 | BOOST_CHECK_EQUAL(req.getMtu(), 4000); |
| 493 | BOOST_CHECK(!req.hasFlags()); |
| 494 | |
| 495 | ControlParameters resp; |
| 496 | resp.setFaceId(1172) |
| 497 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 498 | .setMtu(4000) |
| 499 | .setFlags(0); |
| 500 | this->succeedCommand(interest, resp); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 501 | }; |
| 502 | |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 503 | this->execute("face create udp://100.77.30.65 mtu 4000"); |
| 504 | BOOST_CHECK(hasUpdateCommand); |
| 505 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 506 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 507 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 508 | "reliability=off congestion-marking=off mtu=4000\n")); |
| 509 | BOOST_CHECK(err.is_empty()); |
| 510 | } |
| 511 | |
| 512 | BOOST_AUTO_TEST_CASE(AutoMtu) |
| 513 | { |
| 514 | bool hasUpdateCommand = false; |
| 515 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 516 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 517 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT, 5000); |
| 518 | return; |
| 519 | } |
| 520 | |
| 521 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 522 | hasUpdateCommand = true; |
| 523 | BOOST_REQUIRE(req.hasFaceId()); |
| 524 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 525 | BOOST_CHECK(!req.hasFacePersistency()); |
| 526 | BOOST_REQUIRE(req.hasMtu()); |
| 527 | BOOST_CHECK_EQUAL(req.getMtu(), std::numeric_limits<uint64_t>::max()); |
| 528 | BOOST_CHECK(!req.hasFlags()); |
| 529 | |
| 530 | ControlParameters resp; |
| 531 | resp.setFaceId(1172) |
| 532 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 533 | .setMtu(ndn::MAX_NDN_PACKET_SIZE) |
| 534 | .setFlags(0); |
| 535 | this->succeedCommand(interest, resp); |
| 536 | }; |
| 537 | |
| 538 | this->execute("face create udp://100.77.30.65 mtu auto"); |
| 539 | BOOST_CHECK(hasUpdateCommand); |
| 540 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 541 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 542 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 543 | "reliability=off congestion-marking=off mtu=8800\n")); |
| 544 | BOOST_CHECK(err.is_empty()); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 545 | } |
| 546 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 547 | BOOST_AUTO_TEST_CASE(UpgradingPersistency) |
| 548 | { |
| 549 | bool hasUpdateCommand = false; |
| 550 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 551 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 552 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 553 | return; |
| 554 | } |
| 555 | |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 556 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 557 | hasUpdateCommand = true; |
| 558 | BOOST_REQUIRE(req.hasFaceId()); |
| 559 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 560 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 561 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 562 | BOOST_CHECK(!req.hasFlags()); |
| 563 | |
| 564 | ControlParameters resp; |
| 565 | resp.setFaceId(1172) |
| 566 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 567 | .setMtu(1024) |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 568 | .setFlags(0); |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 569 | this->succeedCommand(interest, resp); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 570 | }; |
| 571 | |
| 572 | this->execute("face create udp://100.77.30.65"); |
| 573 | BOOST_CHECK(hasUpdateCommand); |
| 574 | BOOST_CHECK_EQUAL(exitCode, 0); |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 575 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 576 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 577 | "reliability=off congestion-marking=off mtu=1024\n")); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 578 | BOOST_CHECK(err.is_empty()); |
| 579 | } |
| 580 | |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 581 | BOOST_AUTO_TEST_CASE(UpgradingPersistencySameMtu) |
| 582 | { |
| 583 | bool hasUpdateCommand = false; |
| 584 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 585 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 586 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND, 8800); |
| 587 | return; |
| 588 | } |
| 589 | |
| 590 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 591 | hasUpdateCommand = true; |
| 592 | BOOST_REQUIRE(req.hasFaceId()); |
| 593 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 594 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 595 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 596 | BOOST_CHECK(!req.hasMtu()); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 597 | BOOST_CHECK(!req.hasFlags()); |
| 598 | |
| 599 | ControlParameters resp; |
| 600 | resp.setFaceId(1172) |
| 601 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 602 | .setMtu(8800) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 603 | .setFlags(0); |
| 604 | this->succeedCommand(interest, resp); |
| 605 | }; |
| 606 | |
| 607 | this->execute("face create udp://100.77.30.65 mtu 8800"); |
| 608 | BOOST_CHECK(hasUpdateCommand); |
| 609 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 610 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 611 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 612 | "reliability=off congestion-marking=off mtu=8800\n")); |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 613 | BOOST_CHECK(err.is_empty()); |
| 614 | } |
| 615 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 616 | BOOST_AUTO_TEST_CASE(NotDowngradingPersistency) |
| 617 | { |
| 618 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 619 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERMANENT); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 620 | // no command other than faces/create is expected |
| 621 | }; |
| 622 | |
| 623 | this->execute("face create udp://100.77.30.65"); |
| 624 | BOOST_CHECK_EQUAL(exitCode, 0); |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 625 | BOOST_CHECK(out.is_equal("face-exists id=1172 local=udp4://68.62.26.57:24087 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 626 | "remote=udp4://100.77.30.65:6363 persistency=permanent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 627 | "reliability=off congestion-marking=off\n")); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 628 | BOOST_CHECK(err.is_empty()); |
| 629 | } |
| 630 | |
| 631 | BOOST_AUTO_TEST_CASE(SamePersistency) |
| 632 | { |
| 633 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 634 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 635 | // no command other than faces/create is expected |
| 636 | }; |
| 637 | |
| 638 | this->execute("face create udp://100.77.30.65"); |
| 639 | BOOST_CHECK_EQUAL(exitCode, 0); |
Junxiao Shi | 1cce2a3 | 2017-05-02 02:39:55 +0000 | [diff] [blame] | 640 | BOOST_CHECK(out.is_equal("face-exists id=1172 local=udp4://68.62.26.57:24087 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 641 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 642 | "reliability=off congestion-marking=off\n")); |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 643 | BOOST_CHECK(err.is_empty()); |
| 644 | } |
| 645 | |
| 646 | BOOST_AUTO_TEST_CASE(EnablingReliability) |
| 647 | { |
| 648 | bool hasUpdateCommand = false; |
| 649 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 650 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 651 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 652 | return; |
| 653 | } |
| 654 | |
| 655 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 656 | hasUpdateCommand = true; |
| 657 | BOOST_REQUIRE(req.hasFaceId()); |
| 658 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 659 | BOOST_CHECK(req.hasFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 660 | BOOST_CHECK(req.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 661 | |
| 662 | ControlParameters resp; |
| 663 | resp.setFaceId(1172) |
| 664 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 665 | .setMtu(4000) |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 666 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true, false); |
| 667 | this->succeedCommand(interest, resp); |
| 668 | }; |
| 669 | |
| 670 | this->execute("face create udp://100.77.30.65 reliability on"); |
| 671 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 672 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 673 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 674 | "reliability=on congestion-marking=off mtu=4000\n")); |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 675 | BOOST_CHECK(err.is_empty()); |
| 676 | } |
| 677 | |
| 678 | BOOST_AUTO_TEST_CASE(DisablingReliability) |
| 679 | { |
| 680 | bool hasUpdateCommand = false; |
| 681 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 682 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 683 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT, {}, true); |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 684 | return; |
| 685 | } |
| 686 | |
| 687 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 688 | hasUpdateCommand = true; |
| 689 | BOOST_REQUIRE(req.hasFaceId()); |
| 690 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 691 | BOOST_CHECK(req.hasFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 692 | BOOST_CHECK(!req.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 693 | |
| 694 | ControlParameters resp; |
| 695 | resp.setFaceId(1172) |
| 696 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 697 | .setMtu(4000) |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 698 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, false, false); |
| 699 | this->succeedCommand(interest, resp); |
| 700 | }; |
| 701 | |
| 702 | this->execute("face create udp://100.77.30.65 reliability off"); |
| 703 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 704 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 705 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 706 | "reliability=off congestion-marking=off mtu=4000\n")); |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 707 | BOOST_CHECK(err.is_empty()); |
| 708 | } |
| 709 | |
| 710 | BOOST_AUTO_TEST_CASE(EnablingCongestionMarking) |
| 711 | { |
| 712 | bool hasUpdateCommand = false; |
| 713 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 714 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 715 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 716 | return; |
| 717 | } |
| 718 | |
| 719 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 720 | hasUpdateCommand = true; |
| 721 | BOOST_REQUIRE(req.hasFaceId()); |
| 722 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 723 | BOOST_CHECK(req.hasFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)); |
| 724 | BOOST_CHECK(req.getFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)); |
| 725 | BOOST_CHECK(!req.hasBaseCongestionMarkingInterval()); |
| 726 | BOOST_CHECK(!req.hasDefaultCongestionThreshold()); |
| 727 | |
| 728 | ControlParameters resp; |
| 729 | resp.setFaceId(1172) |
| 730 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 731 | .setBaseCongestionMarkingInterval(100_ms) |
| 732 | .setDefaultCongestionThreshold(65536) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 733 | .setMtu(4000) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 734 | .setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, true, false); |
| 735 | this->succeedCommand(interest, resp); |
| 736 | }; |
| 737 | |
| 738 | this->execute("face create udp://100.77.30.65 congestion-marking on"); |
| 739 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 740 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 741 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 742 | "reliability=off congestion-marking=on " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 743 | "congestion-marking-interval=100ms default-congestion-threshold=65536B " |
| 744 | "mtu=4000\n")); |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 745 | BOOST_CHECK(err.is_empty()); |
| 746 | } |
| 747 | |
| 748 | BOOST_AUTO_TEST_CASE(DisablingCongestionMarking) |
| 749 | { |
| 750 | bool hasUpdateCommand = false; |
| 751 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 752 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 753 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT, {}, false, true); |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 754 | return; |
| 755 | } |
| 756 | |
| 757 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 758 | hasUpdateCommand = true; |
| 759 | BOOST_REQUIRE(req.hasFaceId()); |
| 760 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 761 | BOOST_CHECK(req.hasFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)); |
| 762 | BOOST_CHECK(!req.getFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)); |
| 763 | BOOST_CHECK(!req.hasBaseCongestionMarkingInterval()); |
| 764 | BOOST_CHECK(!req.hasDefaultCongestionThreshold()); |
| 765 | |
| 766 | ControlParameters resp; |
| 767 | resp.setFaceId(1172) |
| 768 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 769 | .setBaseCongestionMarkingInterval(100_ms) |
| 770 | .setDefaultCongestionThreshold(65536) |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 771 | .setMtu(4000) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 772 | .setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, false, false); |
| 773 | this->succeedCommand(interest, resp); |
| 774 | }; |
| 775 | |
| 776 | this->execute("face create udp://100.77.30.65 congestion-marking off"); |
| 777 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 778 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 779 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 780 | "reliability=off congestion-marking=off " |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 781 | "congestion-marking-interval=100ms default-congestion-threshold=65536B " |
| 782 | "mtu=4000\n")); |
| 783 | BOOST_CHECK(err.is_empty()); |
| 784 | } |
| 785 | |
| 786 | BOOST_AUTO_TEST_CASE(UpgradingPersistencyChangeMtu) |
| 787 | { |
| 788 | bool hasUpdateCommand = false; |
| 789 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 790 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 791 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND, 8800); |
| 792 | return; |
| 793 | } |
| 794 | |
| 795 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 796 | hasUpdateCommand = true; |
| 797 | BOOST_REQUIRE(req.hasFaceId()); |
| 798 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 799 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 800 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 801 | BOOST_REQUIRE(req.hasMtu()); |
| 802 | BOOST_CHECK_EQUAL(req.getMtu(), 4000); |
| 803 | BOOST_CHECK(!req.hasFlags()); |
| 804 | |
| 805 | ControlParameters resp; |
| 806 | resp.setFaceId(1172) |
| 807 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 808 | .setMtu(4000) |
| 809 | .setFlags(0); |
| 810 | this->succeedCommand(interest, resp); |
| 811 | }; |
| 812 | |
| 813 | this->execute("face create udp://100.77.30.65 mtu 4000"); |
| 814 | BOOST_CHECK(hasUpdateCommand); |
| 815 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 816 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 817 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 818 | "reliability=off congestion-marking=off mtu=4000\n")); |
| 819 | BOOST_CHECK(err.is_empty()); |
| 820 | } |
| 821 | |
| 822 | BOOST_AUTO_TEST_CASE(UpgradingPersistencyChangeMtuAndFlags) |
| 823 | { |
| 824 | bool hasUpdateCommand = false; |
| 825 | this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) { |
| 826 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 827 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND, 8800); |
| 828 | return; |
| 829 | } |
| 830 | |
| 831 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
| 832 | hasUpdateCommand = true; |
| 833 | BOOST_REQUIRE(req.hasFaceId()); |
| 834 | BOOST_CHECK_EQUAL(req.getFaceId(), 1172); |
| 835 | BOOST_REQUIRE(req.hasFacePersistency()); |
| 836 | BOOST_CHECK_EQUAL(req.getFacePersistency(), FacePersistency::FACE_PERSISTENCY_PERSISTENT); |
| 837 | BOOST_REQUIRE(req.hasMtu()); |
| 838 | BOOST_CHECK_EQUAL(req.getMtu(), 4000); |
| 839 | BOOST_CHECK(req.hasFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 840 | BOOST_CHECK(req.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)); |
| 841 | |
| 842 | ControlParameters resp; |
| 843 | resp.setFaceId(1172) |
| 844 | .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT) |
| 845 | .setMtu(4000) |
| 846 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true, false); |
| 847 | this->succeedCommand(interest, resp); |
| 848 | }; |
| 849 | |
| 850 | this->execute("face create udp://100.77.30.65 mtu 4000 reliability on"); |
| 851 | BOOST_CHECK(hasUpdateCommand); |
| 852 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 853 | BOOST_CHECK(out.is_equal("face-updated id=1172 local=udp4://68.62.26.57:24087 " |
| 854 | "remote=udp4://100.77.30.65:6363 persistency=persistent " |
| 855 | "reliability=on congestion-marking=off mtu=4000\n")); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 856 | BOOST_CHECK(err.is_empty()); |
| 857 | } |
| 858 | |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 859 | BOOST_AUTO_TEST_CASE(ErrorCanonizeRemote) |
| 860 | { |
| 861 | this->execute("face create invalid://"); |
| 862 | BOOST_CHECK_EQUAL(exitCode, 4); |
| 863 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | d656aff | 2020-04-03 00:30:38 -0700 | [diff] [blame] | 864 | BOOST_CHECK(err.is_equal("Error during canonization of remote FaceUri 'invalid://': " |
| 865 | "scheme not supported\n")); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 866 | } |
| 867 | |
| 868 | BOOST_AUTO_TEST_CASE(ErrorCanonizeLocal) |
| 869 | { |
| 870 | this->execute("face create udp4://24.37.20.47:6363 local invalid://"); |
| 871 | BOOST_CHECK_EQUAL(exitCode, 4); |
| 872 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | d656aff | 2020-04-03 00:30:38 -0700 | [diff] [blame] | 873 | BOOST_CHECK(err.is_equal("Error during canonization of local FaceUri 'invalid://': " |
| 874 | "scheme not supported\n")); |
Junxiao Shi | 0d97692 | 2017-04-01 14:35:21 +0000 | [diff] [blame] | 875 | } |
| 876 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 877 | BOOST_AUTO_TEST_CASE(ErrorCreate) |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 878 | { |
| 879 | this->processInterest = nullptr; // no response |
| 880 | |
| 881 | this->execute("face create udp://159.242.33.78"); |
| 882 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 883 | BOOST_CHECK(out.is_empty()); |
| 884 | BOOST_CHECK(err.is_equal("Error 10060 when creating face: request timed out\n")); |
| 885 | } |
| 886 | |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 887 | BOOST_AUTO_TEST_CASE(ErrorConflict) |
| 888 | { |
| 889 | // Current NFD will not report a 409-conflict with a different remote FaceUri, but this is |
| 890 | // allowed by FaceMgmt protocol and nfdc should not attempt to upgrade persistency in this case. |
| 891 | |
| 892 | this->processInterest = [this] (const Interest& interest) { |
| 893 | // conflict with udp4://100.77.30.65:6363 |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 894 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 895 | }; |
| 896 | |
| 897 | this->execute("face create udp://20.53.73.45"); |
| 898 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 899 | BOOST_CHECK(out.is_empty()); |
| 900 | BOOST_CHECK(err.is_equal("Error 409 when creating face: conflict-409\n")); |
| 901 | } |
| 902 | |
| 903 | BOOST_AUTO_TEST_CASE(ErrorUpdate) |
| 904 | { |
| 905 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 906 | if (parseCommand(interest, "/localhost/nfd/faces/create")) { |
| 907 | this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 908 | return; |
| 909 | } |
| 910 | |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 911 | MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update"); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 912 | // no response to faces/update |
| 913 | }; |
| 914 | |
| 915 | this->execute("face create udp://100.77.30.65"); |
| 916 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 917 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | 13ff259 | 2020-03-06 17:32:29 -0800 | [diff] [blame] | 918 | BOOST_CHECK(err.is_equal("Error 10060 when updating face: request timed out\n")); |
Yanbiao Li | 58ba3f9 | 2017-02-15 14:27:18 +0000 | [diff] [blame] | 919 | } |
| 920 | |
Junxiao Shi | 1d7fef5 | 2017-02-02 05:33:14 +0000 | [diff] [blame] | 921 | BOOST_AUTO_TEST_SUITE_END() // CreateCommand |
| 922 | |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 923 | BOOST_FIXTURE_TEST_SUITE(DestroyCommand, ExecuteCommandFixture) |
| 924 | |
| 925 | BOOST_AUTO_TEST_CASE(NormalByFaceId) |
| 926 | { |
| 927 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 928 | if (this->respondFaceQuery(interest)) { |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 929 | return; |
| 930 | } |
| 931 | |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 932 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy"); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 933 | BOOST_REQUIRE(req.hasFaceId()); |
| 934 | BOOST_CHECK_EQUAL(req.getFaceId(), 10156); |
| 935 | |
| 936 | ControlParameters resp; |
| 937 | resp.setFaceId(10156); |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 938 | this->succeedCommand(interest, resp); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 939 | }; |
| 940 | |
| 941 | this->execute("face destroy 10156"); |
| 942 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 943 | BOOST_CHECK(out.is_equal("face-destroyed id=10156 local=tcp4://151.26.163.27:22967 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 944 | "remote=tcp4://198.57.27.40:6363 persistency=persistent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 945 | "reliability=off congestion-marking=off\n")); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 946 | BOOST_CHECK(err.is_empty()); |
| 947 | } |
| 948 | |
| 949 | BOOST_AUTO_TEST_CASE(NormalByFaceUri) |
| 950 | { |
| 951 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 952 | if (this->respondFaceQuery(interest)) { |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 953 | return; |
| 954 | } |
| 955 | |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 956 | ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy"); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 957 | BOOST_REQUIRE(req.hasFaceId()); |
| 958 | BOOST_CHECK_EQUAL(req.getFaceId(), 2249); |
| 959 | |
| 960 | ControlParameters resp; |
| 961 | resp.setFaceId(2249); |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 962 | this->succeedCommand(interest, resp); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 963 | }; |
| 964 | |
| 965 | this->execute("face destroy tcp://32.121.182.82"); |
| 966 | BOOST_CHECK_EQUAL(exitCode, 0); |
| 967 | BOOST_CHECK(out.is_equal("face-destroyed id=2249 local=tcp4://30.99.87.98:31414 " |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 968 | "remote=tcp4://32.121.182.82:6363 persistency=persistent " |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 969 | "reliability=off congestion-marking=off\n")); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 970 | BOOST_CHECK(err.is_empty()); |
| 971 | } |
| 972 | |
| 973 | BOOST_AUTO_TEST_CASE(FaceNotExist) |
| 974 | { |
| 975 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 976 | BOOST_CHECK(this->respondFaceQuery(interest)); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 977 | }; |
| 978 | |
| 979 | this->execute("face destroy 23728"); |
| 980 | BOOST_CHECK_EQUAL(exitCode, 3); |
| 981 | BOOST_CHECK(out.is_empty()); |
| 982 | BOOST_CHECK(err.is_equal("Face not found\n")); |
| 983 | } |
| 984 | |
| 985 | BOOST_AUTO_TEST_CASE(Ambiguous) |
| 986 | { |
| 987 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 988 | BOOST_CHECK(this->respondFaceQuery(interest)); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 989 | }; |
| 990 | |
| 991 | this->execute("face destroy udp4://225.131.75.231:56363"); |
| 992 | BOOST_CHECK_EQUAL(exitCode, 5); |
| 993 | BOOST_CHECK(out.is_empty()); |
| 994 | BOOST_CHECK(err.is_equal("Multiple faces match specified remote FaceUri. " |
| 995 | "Re-run the command with a FaceId: " |
| 996 | "6720 (local=udp4://202.83.168.28:56363), " |
| 997 | "31066 (local=udp4://25.90.26.32:56363)\n")); |
| 998 | } |
| 999 | |
| 1000 | BOOST_AUTO_TEST_CASE(ErrorCanonization) |
| 1001 | { |
| 1002 | this->execute("face destroy udp6://32.38.164.64:10445"); |
| 1003 | BOOST_CHECK_EQUAL(exitCode, 4); |
| 1004 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | d656aff | 2020-04-03 00:30:38 -0700 | [diff] [blame] | 1005 | BOOST_CHECK(err.is_equal("Error during canonization of 'udp6://32.38.164.64:10445': " |
Eric Newberry | 7d8695d | 2017-05-29 15:49:10 -0700 | [diff] [blame] | 1006 | "IPv4/v6 mismatch\n")); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 1007 | } |
| 1008 | |
| 1009 | BOOST_AUTO_TEST_CASE(ErrorDataset) |
| 1010 | { |
| 1011 | this->processInterest = nullptr; // no response to dataset or command |
| 1012 | |
| 1013 | this->execute("face destroy udp://159.242.33.78"); |
| 1014 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 1015 | BOOST_CHECK(out.is_empty()); |
Eric Newberry | 359135c | 2018-06-26 21:02:12 -0700 | [diff] [blame] | 1016 | BOOST_CHECK(err.is_equal("Error 10060 when querying face: Timeout exceeded\n")); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 1017 | } |
| 1018 | |
| 1019 | BOOST_AUTO_TEST_CASE(ErrorCommand) |
| 1020 | { |
| 1021 | this->processInterest = [this] (const Interest& interest) { |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 1022 | if (this->respondFaceQuery(interest)) { |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 1023 | return; |
| 1024 | } |
| 1025 | |
Junxiao Shi | 1a25a6e | 2017-03-06 03:09:47 +0000 | [diff] [blame] | 1026 | MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy"); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 1027 | // no response to command |
| 1028 | }; |
| 1029 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 1030 | this->execute("face destroy 10156"); |
Junxiao Shi | 05dd444 | 2017-02-06 22:50:07 +0000 | [diff] [blame] | 1031 | BOOST_CHECK_EQUAL(exitCode, 1); |
| 1032 | BOOST_CHECK(out.is_empty()); |
| 1033 | BOOST_CHECK(err.is_equal("Error 10060 when destroying face: request timed out\n")); |
| 1034 | } |
| 1035 | |
| 1036 | BOOST_AUTO_TEST_SUITE_END() // DestroyCommand |
| 1037 | |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1038 | const std::string STATUS_XML = stripXmlSpaces(R"XML( |
| 1039 | <faces> |
| 1040 | <face> |
| 1041 | <faceId>134</faceId> |
| 1042 | <remoteUri>udp4://233.252.0.4:6363</remoteUri> |
| 1043 | <localUri>udp4://192.0.2.1:6363</localUri> |
| 1044 | <faceScope>non-local</faceScope> |
| 1045 | <facePersistency>permanent</facePersistency> |
| 1046 | <linkType>multi-access</linkType> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1047 | <congestion/> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 1048 | <flags/> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1049 | <packetCounters> |
| 1050 | <incomingPackets> |
| 1051 | <nInterests>22562</nInterests> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1052 | <nData>22031</nData> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1053 | <nNacks>63</nNacks> |
| 1054 | </incomingPackets> |
| 1055 | <outgoingPackets> |
| 1056 | <nInterests>30121</nInterests> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1057 | <nData>20940</nData> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1058 | <nNacks>1218</nNacks> |
| 1059 | </outgoingPackets> |
| 1060 | </packetCounters> |
| 1061 | <byteCounters> |
| 1062 | <incomingBytes>2522915</incomingBytes> |
| 1063 | <outgoingBytes>1353592</outgoingBytes> |
| 1064 | </byteCounters> |
| 1065 | </face> |
| 1066 | <face> |
| 1067 | <faceId>745</faceId> |
| 1068 | <remoteUri>fd://75</remoteUri> |
| 1069 | <localUri>unix:///var/run/nfd.sock</localUri> |
| 1070 | <faceScope>local</faceScope> |
| 1071 | <facePersistency>on-demand</facePersistency> |
| 1072 | <linkType>point-to-point</linkType> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1073 | <congestion> |
| 1074 | <baseMarkingInterval>PT0.100S</baseMarkingInterval> |
| 1075 | <defaultThreshold>65536</defaultThreshold> |
| 1076 | </congestion> |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 1077 | <mtu>8800</mtu> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 1078 | <flags> |
| 1079 | <localFieldsEnabled/> |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 1080 | <lpReliabilityEnabled/> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1081 | <congestionMarkingEnabled/> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 1082 | </flags> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1083 | <packetCounters> |
| 1084 | <incomingPackets> |
| 1085 | <nInterests>18998</nInterests> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1086 | <nData>26701</nData> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1087 | <nNacks>147</nNacks> |
| 1088 | </incomingPackets> |
| 1089 | <outgoingPackets> |
| 1090 | <nInterests>34779</nInterests> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1091 | <nData>17028</nData> |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1092 | <nNacks>1176</nNacks> |
| 1093 | </outgoingPackets> |
| 1094 | </packetCounters> |
| 1095 | <byteCounters> |
| 1096 | <incomingBytes>4672308</incomingBytes> |
| 1097 | <outgoingBytes>8957187</outgoingBytes> |
| 1098 | </byteCounters> |
| 1099 | </face> |
| 1100 | </faces> |
| 1101 | )XML"); |
| 1102 | |
| 1103 | const std::string STATUS_TEXT = |
| 1104 | "Faces:\n" |
| 1105 | " faceid=134 remote=udp4://233.252.0.4:6363 local=udp4://192.0.2.1:6363" |
| 1106 | " counters={in={22562i 22031d 63n 2522915B} out={30121i 20940d 1218n 1353592B}}" |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 1107 | " flags={non-local permanent multi-access}\n" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1108 | " faceid=745 remote=fd://75 local=unix:///var/run/nfd.sock" |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 1109 | " congestion={base-marking-interval=100ms default-threshold=65536B} mtu=8800" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1110 | " counters={in={18998i 26701d 147n 4672308B} out={34779i 17028d 1176n 8957187B}}" |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1111 | " flags={local on-demand point-to-point local-fields lp-reliability congestion-marking}\n"; |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1112 | |
Junxiao Shi | 1f481fa | 2017-01-26 15:14:43 +0000 | [diff] [blame] | 1113 | BOOST_FIXTURE_TEST_CASE(Status, StatusFixture<FaceModule>) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1114 | { |
| 1115 | this->fetchStatus(); |
| 1116 | FaceStatus payload1; |
| 1117 | payload1.setFaceId(134) |
| 1118 | .setRemoteUri("udp4://233.252.0.4:6363") |
| 1119 | .setLocalUri("udp4://192.0.2.1:6363") |
| 1120 | .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL) |
| 1121 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_PERMANENT) |
| 1122 | .setLinkType(ndn::nfd::LINK_TYPE_MULTI_ACCESS) |
| 1123 | .setNInInterests(22562) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1124 | .setNInData(22031) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1125 | .setNInNacks(63) |
| 1126 | .setNOutInterests(30121) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1127 | .setNOutData(20940) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1128 | .setNOutNacks(1218) |
| 1129 | .setNInBytes(2522915) |
| 1130 | .setNOutBytes(1353592); |
| 1131 | FaceStatus payload2; |
| 1132 | payload2.setFaceId(745) |
| 1133 | .setRemoteUri("fd://75") |
| 1134 | .setLocalUri("unix:///var/run/nfd.sock") |
| 1135 | .setFaceScope(ndn::nfd::FACE_SCOPE_LOCAL) |
| 1136 | .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) |
| 1137 | .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1138 | .setBaseCongestionMarkingInterval(100_ms) |
| 1139 | .setDefaultCongestionThreshold(65536) |
Eric Newberry | 4f8dd96 | 2018-06-17 21:32:07 -0700 | [diff] [blame] | 1140 | .setMtu(8800) |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 1141 | .setFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED, true) |
Eric Newberry | 84d3adc | 2017-08-09 23:31:40 -0400 | [diff] [blame] | 1142 | .setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, true) |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 1143 | .setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, true) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1144 | .setNInInterests(18998) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1145 | .setNInData(26701) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1146 | .setNInNacks(147) |
| 1147 | .setNOutInterests(34779) |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 1148 | .setNOutData(17028) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1149 | .setNOutNacks(1176) |
| 1150 | .setNInBytes(4672308) |
| 1151 | .setNOutBytes(8957187); |
| 1152 | this->sendDataset("/localhost/nfd/faces/list", payload1, payload2); |
| 1153 | this->prepareStatusOutput(); |
| 1154 | |
| 1155 | BOOST_CHECK(statusXml.is_equal(STATUS_XML)); |
| 1156 | BOOST_CHECK(statusText.is_equal(STATUS_TEXT)); |
| 1157 | } |
| 1158 | |
| 1159 | BOOST_AUTO_TEST_SUITE_END() // TestFaceModule |
Junxiao Shi | 331ade7 | 2016-08-19 14:07:19 +0000 | [diff] [blame] | 1160 | BOOST_AUTO_TEST_SUITE_END() // Nfdc |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1161 | |
Davide Pesavento | e422f9e | 2022-06-03 01:30:23 -0400 | [diff] [blame] | 1162 | } // namespace nfd::tools::nfdc::tests |