aboutsummaryrefslogtreecommitdiff
path: root/src/ats/test_ats_reservation_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/ats/test_ats_reservation_api.c
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'src/ats/test_ats_reservation_api.c')
-rw-r--r--src/ats/test_ats_reservation_api.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ats/test_ats_reservation_api.c b/src/ats/test_ats_reservation_api.c
index ff924b3b4..46658007b 100644
--- a/src/ats/test_ats_reservation_api.c
+++ b/src/ats/test_ats_reservation_api.c
@@ -46,7 +46,11 @@ static struct Command test_commands[] = {
46 /* use network with 65k quota! */ 46 /* use network with 65k quota! */
47 .scope = GNUNET_NT_WAN 47 .scope = GNUNET_NT_WAN
48 } 48 }
49
50
49 } 51 }
52
53
50 }, 54 },
51 /* 1: some solver still require explicit start */ 55 /* 1: some solver still require explicit start */
52 { 56 {
@@ -55,6 +59,8 @@ static struct Command test_commands[] = {
55 .details.request_connection_start = { 59 .details.request_connection_start = {
56 .pid = 0 60 .pid = 0
57 } 61 }
62
63
58 }, 64 },
59 /* 2: check we got an address */ 65 /* 2: check we got an address */
60 { 66 {
@@ -62,6 +68,8 @@ static struct Command test_commands[] = {
62 .details.await_address_suggestion = { 68 .details.await_address_suggestion = {
63 .add_label = "add-address-0-0" 69 .add_label = "add-address-0-0"
64 } 70 }
71
72
65 }, 73 },
66 /* 3: sleep 7s, should give us 5s * 64k/s = 320k buffer; 74 /* 3: sleep 7s, should give us 5s * 64k/s = 320k buffer;
67 Note that this depends on MAX_BANDWIDTH_CARRY_S. We 75 Note that this depends on MAX_BANDWIDTH_CARRY_S. We
@@ -79,6 +87,8 @@ static struct Command test_commands[] = {
79 .amount = 128 * 1024, 87 .amount = 128 * 1024,
80 .expected_result = GNUNET_YES 88 .expected_result = GNUNET_YES
81 } 89 }
90
91
82 }, 92 },
83 /* 5: reserve another 192k -- should just work (now exactly pushing the limit) */ 93 /* 5: reserve another 192k -- should just work (now exactly pushing the limit) */
84 { 94 {
@@ -89,6 +99,8 @@ static struct Command test_commands[] = {
89 .amount = 192 * 1024, 99 .amount = 192 * 1024,
90 .expected_result = GNUNET_YES 100 .expected_result = GNUNET_YES
91 } 101 }
102
103
92 }, 104 },
93 /* 6: reserve another 32k -- should now fail (if MAX_BANDWIDTH_CARRY_S 105 /* 6: reserve another 32k -- should now fail (if MAX_BANDWIDTH_CARRY_S
94 is precisely observed) */ 106 is precisely observed) */
@@ -100,6 +112,8 @@ static struct Command test_commands[] = {
100 .amount = 32 * 1024, 112 .amount = 32 * 1024,
101 .expected_result = GNUNET_SYSERR 113 .expected_result = GNUNET_SYSERR
102 } 114 }
115
116
103 }, 117 },
104 /* 7: sleep 3s, should give us 3s * 64k/s - 32k = 160k buffer */ 118 /* 7: sleep 3s, should give us 3s * 64k/s - 32k = 160k buffer */
105 { 119 {
@@ -116,6 +130,8 @@ static struct Command test_commands[] = {
116 .amount = 160 * 1024, 130 .amount = 160 * 1024,
117 .expected_result = GNUNET_YES 131 .expected_result = GNUNET_YES
118 } 132 }
133
134
119 }, 135 },
120 /* 9: remove address */ 136 /* 9: remove address */
121 { 137 {
@@ -123,6 +139,8 @@ static struct Command test_commands[] = {
123 .details.del_address = { 139 .details.del_address = {
124 .add_label = "add-address-0-0" 140 .add_label = "add-address-0-0"
125 } 141 }
142
143
126 }, 144 },
127 /* 10: check we got disconnected */ 145 /* 10: check we got disconnected */
128 { 146 {
@@ -130,6 +148,8 @@ static struct Command test_commands[] = {
130 .details.await_disconnect_suggestion = { 148 .details.await_disconnect_suggestion = {
131 .pid = 0 149 .pid = 0
132 } 150 }
151
152
133 }, 153 },
134 /* 11: just for symmetry, also stop asking for the connection */ 154 /* 11: just for symmetry, also stop asking for the connection */
135 { 155 {
@@ -137,6 +157,8 @@ static struct Command test_commands[] = {
137 .details.request_connection_stop = { 157 .details.request_connection_stop = {
138 .connect_label = "request-0", 158 .connect_label = "request-0",
139 } 159 }
160
161
140 }, 162 },
141 /* Test ends successfully */ 163 /* Test ends successfully */
142 { 164 {