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