summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/BUILD.bazel2
-rw-r--r--auto_tests/Makefile.inc6
-rw-r--r--auto_tests/check_compat.h74
-rw-r--r--auto_tests/dht_test.c2
-rw-r--r--auto_tests/helpers.h9
-rw-r--r--auto_tests/messenger_test.c26
-rw-r--r--auto_tests/network_test.c8
-rw-r--r--auto_tests/onion_test.c2
-rw-r--r--auto_tests/tox_many_tcp_test.c10
-rw-r--r--auto_tests/tox_many_test.c8
-rw-r--r--auto_tests/tox_strncasecmp_test.c2
-rw-r--r--auto_tests/tox_test.c24
-rw-r--r--auto_tests/toxav_many_test.c5
13 files changed, 103 insertions, 75 deletions
diff --git a/auto_tests/BUILD.bazel b/auto_tests/BUILD.bazel
index ea3682b8..88951f97 100644
--- a/auto_tests/BUILD.bazel
+++ b/auto_tests/BUILD.bazel
@@ -22,7 +22,6 @@ cc_library(
22 "//c-toxcore/toxav", 22 "//c-toxcore/toxav",
23 "//c-toxcore/toxcore", 23 "//c-toxcore/toxcore",
24 "//c-toxcore/toxencryptsave", 24 "//c-toxcore/toxencryptsave",
25 "@check",
26 ], 25 ],
27) for src in glob(["*_test.c"])] 26) for src in glob(["*_test.c"])]
28 27
@@ -47,6 +46,5 @@ cc_test(
47 ":monolith", 46 ":monolith",
48 "//c-toxcore/other:monolith", 47 "//c-toxcore/other:monolith",
49 "//c-toxcore/testing:misc_tools", 48 "//c-toxcore/testing:misc_tools",
50 "@check",
51 ], 49 ],
52) 50)
diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc
index 536b08c5..6957262a 100644
--- a/auto_tests/Makefile.inc
+++ b/auto_tests/Makefile.inc
@@ -5,8 +5,7 @@ check_PROGRAMS = encryptsave_test messenger_autotest crypto_test network_test on
5 5
6AUTOTEST_CFLAGS = \ 6AUTOTEST_CFLAGS = \
7 $(LIBSODIUM_CFLAGS) \ 7 $(LIBSODIUM_CFLAGS) \
8 $(NACL_CFLAGS) \ 8 $(NACL_CFLAGS)
9 $(CHECK_CFLAGS)
10 9
11AUTOTEST_LDADD = \ 10AUTOTEST_LDADD = \
12 $(LIBSODIUM_LDFLAGS) \ 11 $(LIBSODIUM_LDFLAGS) \
@@ -15,8 +14,7 @@ AUTOTEST_LDADD = \
15 libtoxencryptsave.la \ 14 libtoxencryptsave.la \
16 $(LIBSODIUM_LIBS) \ 15 $(LIBSODIUM_LIBS) \
17 $(NACL_OBJECTS) \ 16 $(NACL_OBJECTS) \
18 $(NACL_LIBS) \ 17 $(NACL_LIBS)
19 $(CHECK_LIBS)
20 18
21 19
22 20
diff --git a/auto_tests/check_compat.h b/auto_tests/check_compat.h
index e4fde89f..755dea81 100644
--- a/auto_tests/check_compat.h
+++ b/auto_tests/check_compat.h
@@ -1,8 +1,66 @@
1#ifdef _MSC_VER 1#ifndef CHECK_COMPAT_H
2#define pid_t int 2#define CHECK_COMPAT_H
3// #include <libcompat.h> 3
4#endif 4#include "../toxcore/ccompat.h"
5#include <check.h> 5
6#ifdef _MSC_VER 6#include <stdbool.h>
7#undef pid_t 7#include <stdio.h>
8#endif 8
9#define START_TEST(name) static void name(void)
10#define END_TEST
11
12#define DEFTESTCASE(NAME) test_##NAME()
13#define DEFTESTCASE_SLOW(NAME, TIMEOUT) test_##NAME()
14
15typedef struct Suite Suite;
16typedef struct SRunner SRunner;
17enum SRunMode { CK_NORMAL };
18
19Suite *suite_create(const char *title)
20{
21 printf("Running test suite: %s\n", title);
22 return nullptr;
23}
24
25SRunner *srunner_create(Suite *s)
26{
27 return nullptr;
28}
29
30void srunner_free(SRunner *s)
31{
32}
33
34void srunner_run_all(SRunner *r, int mode)
35{
36}
37
38int srunner_ntests_failed(SRunner *r)
39{
40 return 0;
41}
42
43#define ck_assert(ok) do { \
44 if (!(ok)) { \
45 fprintf(stderr, "%s:%d: failed `%s'\n", __FILE__, __LINE__, #ok); \
46 exit(EXIT_FAILURE); \
47 } \
48} while (0)
49
50#define ck_assert_msg(ok, ...) do { \
51 if (!(ok)) { \
52 fprintf(stderr, "%s:%d: failed `%s': ", __FILE__, __LINE__, #ok); \
53 fprintf(stderr, __VA_ARGS__); \
54 fprintf(stderr, "\n"); \
55 exit(EXIT_FAILURE); \
56 } \
57} while (0)
58
59#define ck_abort_msg(...) do { \
60 fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \
61 fprintf(stderr, __VA_ARGS__); \
62 fprintf(stderr, "\n"); \
63 exit(EXIT_FAILURE); \
64} while (0)
65
66#endif // CHECK_COMPAT_H
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c
index 227b43f7..8e735dbd 100644
--- a/auto_tests/dht_test.c
+++ b/auto_tests/dht_test.c
@@ -684,7 +684,7 @@ START_TEST(test_dht_create_packet)
684 ck_assert_msg(pkt[0] == NET_PACKET_GET_NODES, "Malformed packet."); 684 ck_assert_msg(pkt[0] == NET_PACKET_GET_NODES, "Malformed packet.");
685 ck_assert_msg(memcmp(pkt + 1, key, CRYPTO_SYMMETRIC_KEY_SIZE) == 0, "Malformed packet."); 685 ck_assert_msg(memcmp(pkt + 1, key, CRYPTO_SYMMETRIC_KEY_SIZE) == 0, "Malformed packet.");
686 ck_assert_msg(length == 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + sizeof(plain) + CRYPTO_MAC_SIZE, 686 ck_assert_msg(length == 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + sizeof(plain) + CRYPTO_MAC_SIZE,
687 "Invalid size. Should be %d got %d", sizeof(pkt), length); 687 "Invalid size. Should be %u got %d", (unsigned)sizeof(pkt), length);
688 688
689 printf("Create Packet Successful!\n"); 689 printf("Create Packet Successful!\n");
690} 690}
diff --git a/auto_tests/helpers.h b/auto_tests/helpers.h
index 7b6146a4..ac58684d 100644
--- a/auto_tests/helpers.h
+++ b/auto_tests/helpers.h
@@ -17,15 +17,6 @@
17#define c_sleep(x) usleep(1000 * (x)) 17#define c_sleep(x) usleep(1000 * (x))
18#endif 18#endif
19 19
20#define DEFTESTCASE(NAME) \
21 TCase *tc_##NAME = tcase_create(#NAME); \
22 tcase_add_test(tc_##NAME, test_##NAME); \
23 suite_add_tcase(s, tc_##NAME)
24
25#define DEFTESTCASE_SLOW(NAME, TIMEOUT) \
26 DEFTESTCASE(NAME); \
27 tcase_set_timeout(tc_##NAME, TIMEOUT)
28
29static const char *tox_log_level_name(TOX_LOG_LEVEL level) 20static const char *tox_log_level_name(TOX_LOG_LEVEL level)
30{ 21{
31 switch (level) { 22 switch (level) {
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c
index 34de6543..de5aa7dd 100644
--- a/auto_tests/messenger_test.c
+++ b/auto_tests/messenger_test.c
@@ -249,8 +249,8 @@ START_TEST(test_dht_state_saveloadsave)
249 DHT_save(m->dht, buffer + extra); 249 DHT_save(m->dht, buffer + extra);
250 250
251 for (i = 0; i < extra; i++) { 251 for (i = 0; i < extra; i++) {
252 ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", i); 252 ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", (unsigned)i);
253 ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", i); 253 ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", (unsigned)i);
254 } 254 }
255 255
256 int res = DHT_load(m->dht, buffer + extra, size); 256 int res = DHT_load(m->dht, buffer + extra, size);
@@ -263,11 +263,12 @@ START_TEST(test_dht_state_saveloadsave)
263 uint8_t *ptr = buffer + extra + offset; 263 uint8_t *ptr = buffer + extra + offset;
264 sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", 264 sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d",
265 ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); 265 ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F);
266 ck_assert_msg(res == 0, msg); 266 ck_assert_msg(res == 0, "%s", msg);
267 } 267 }
268 268
269 size_t size2 = DHT_size(m->dht); 269 size_t size2 = DHT_size(m->dht);
270 ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); 270 ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", (unsigned)size,
271 (unsigned)size2);
271 272
272 VLA(uint8_t, buffer2, size2); 273 VLA(uint8_t, buffer2, size2);
273 DHT_save(m->dht, buffer2); 274 DHT_save(m->dht, buffer2);
@@ -291,8 +292,8 @@ START_TEST(test_messenger_state_saveloadsave)
291 messenger_save(m, buffer + extra); 292 messenger_save(m, buffer + extra);
292 293
293 for (i = 0; i < extra; i++) { 294 for (i = 0; i < extra; i++) {
294 ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", i); 295 ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", (unsigned)i);
295 ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", i); 296 ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", (unsigned)i);
296 } 297 }
297 298
298 int res = messenger_load(m, buffer + extra, size); 299 int res = messenger_load(m, buffer + extra, size);
@@ -305,11 +306,12 @@ START_TEST(test_messenger_state_saveloadsave)
305 uint8_t *ptr = buffer + extra + offset; 306 uint8_t *ptr = buffer + extra + offset;
306 sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", 307 sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d",
307 ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); 308 ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F);
308 ck_assert_msg(res == 0, msg); 309 ck_assert_msg(res == 0, "%s", msg);
309 } 310 }
310 311
311 size_t size2 = messenger_size(m); 312 size_t size2 = messenger_size(m);
312 ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); 313 ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u",
314 (unsigned)size, (unsigned)size2);
313 315
314 VLA(uint8_t, buffer2, size2); 316 VLA(uint8_t, buffer2, size2);
315 messenger_save(m, buffer2); 317 messenger_save(m, buffer2);
@@ -346,10 +348,6 @@ static Suite *messenger_suite(void)
346 348
347int main(int argc, char *argv[]) 349int main(int argc, char *argv[])
348{ 350{
349 Suite *messenger = messenger_suite();
350 SRunner *test_runner = srunner_create(messenger);
351 int number_failed = 0;
352
353 friend_id = hex_string_to_bin(friend_id_str); 351 friend_id = hex_string_to_bin(friend_id_str);
354 good_id_a = hex_string_to_bin(good_id_a_str); 352 good_id_a = hex_string_to_bin(good_id_a_str);
355 good_id_b = hex_string_to_bin(good_id_b_str); 353 good_id_b = hex_string_to_bin(good_id_b_str);
@@ -374,6 +372,10 @@ int main(int argc, char *argv[])
374 "the tests will continue now...\n\n", stderr); 372 "the tests will continue now...\n\n", stderr);
375 } 373 }
376 374
375 Suite *messenger = messenger_suite();
376 SRunner *test_runner = srunner_create(messenger);
377 int number_failed = 0;
378
377 srunner_run_all(test_runner, CK_NORMAL); 379 srunner_run_all(test_runner, CK_NORMAL);
378 number_failed = srunner_ntests_failed(test_runner); 380 number_failed = srunner_ntests_failed(test_runner);
379 381
diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c
index 9e3e0e15..1885c81f 100644
--- a/auto_tests/network_test.c
+++ b/auto_tests/network_test.c
@@ -38,7 +38,7 @@ START_TEST(test_addr_resolv_localhost)
38 38
39 int res = addr_resolve(localhost, &ip, nullptr); 39 int res = addr_resolve(localhost, &ip, nullptr);
40 40
41 ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); 41 ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno));
42 42
43 char ip_str[IP_NTOA_LEN]; 43 char ip_str[IP_NTOA_LEN];
44 ck_assert_msg(ip.family == TOX_AF_INET, "Expected family TOX_AF_INET, got %u.", ip.family); 44 ck_assert_msg(ip.family == TOX_AF_INET, "Expected family TOX_AF_INET, got %u.", ip.family);
@@ -54,7 +54,7 @@ START_TEST(test_addr_resolv_localhost)
54 localhost_split = 1; 54 localhost_split = 1;
55 } 55 }
56 56
57 ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); 57 ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno));
58 58
59 ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); 59 ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family);
60 IP6 ip6_loopback = get_ip6_loopback(); 60 IP6 ip6_loopback = get_ip6_loopback();
@@ -71,7 +71,7 @@ START_TEST(test_addr_resolv_localhost)
71 IP extra; 71 IP extra;
72 ip_reset(&extra); 72 ip_reset(&extra);
73 res = addr_resolve(localhost, &ip, &extra); 73 res = addr_resolve(localhost, &ip, &extra);
74 ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); 74 ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno));
75 75
76#if USE_IPV6 76#if USE_IPV6
77 ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); 77 ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family);
@@ -149,7 +149,7 @@ START_TEST(test_ip_equal)
149 149
150 ip2.ip6.uint8[15]++; 150 ip2.ip6.uint8[15]++;
151 res = ip_equal(&ip1, &ip2); 151 res = ip_equal(&ip1, &ip2);
152 ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %res.", res); 152 ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %u.", res);
153} 153}
154END_TEST 154END_TEST
155 155
diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c
index bf764f67..5989df17 100644
--- a/auto_tests/onion_test.c
+++ b/auto_tests/onion_test.c
@@ -449,7 +449,7 @@ START_TEST(test_announce)
449 449
450 for (i = 0; i < NUM_ONIONS; ++i) { 450 for (i = 0; i < NUM_ONIONS; ++i) {
451 onions[i] = new_onions(i + 34655); 451 onions[i] = new_onions(i + 34655);
452 ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u"); 452 ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u", i);
453 } 453 }
454 454
455 IP ip = get_loopback(); 455 IP ip = get_loopback();
diff --git a/auto_tests/tox_many_tcp_test.c b/auto_tests/tox_many_tcp_test.c
index 81e6244a..e4309db7 100644
--- a/auto_tests/tox_many_tcp_test.c
+++ b/auto_tests/tox_many_tcp_test.c
@@ -259,21 +259,15 @@ loop_top:
259END_TEST 259END_TEST
260 260
261 261
262#ifdef TRAVIS_ENV
263static const uint8_t timeout_mux = 20;
264#else
265static const uint8_t timeout_mux = 10;
266#endif
267
268static Suite *tox_suite(void) 262static Suite *tox_suite(void)
269{ 263{
270 Suite *s = suite_create("Tox many tcp"); 264 Suite *s = suite_create("Tox many tcp");
271 265
272 /* Each tox connects to a single tox TCP */ 266 /* Each tox connects to a single tox TCP */
273 DEFTESTCASE_SLOW(many_clients_tcp, 4 * timeout_mux); 267 DEFTESTCASE(many_clients_tcp);
274 268
275 /* Try to make a connection to each "older sibling" tox instance via TCP */ 269 /* Try to make a connection to each "older sibling" tox instance via TCP */
276 DEFTESTCASE_SLOW(many_clients_tcp_b, 8 * timeout_mux); 270 DEFTESTCASE(many_clients_tcp_b);
277 271
278 return s; 272 return s;
279} 273}
diff --git a/auto_tests/tox_many_test.c b/auto_tests/tox_many_test.c
index 3d3aad6d..bacaaff8 100644
--- a/auto_tests/tox_many_test.c
+++ b/auto_tests/tox_many_test.c
@@ -139,17 +139,11 @@ loop_top:
139} 139}
140END_TEST 140END_TEST
141 141
142#ifdef TRAVIS_ENV
143static const uint8_t timeout_mux = 20;
144#else
145static const uint8_t timeout_mux = 10;
146#endif
147
148static Suite *tox_suite(void) 142static Suite *tox_suite(void)
149{ 143{
150 Suite *s = suite_create("Tox"); 144 Suite *s = suite_create("Tox");
151 145
152 DEFTESTCASE_SLOW(many_clients, 8 * timeout_mux); 146 DEFTESTCASE(many_clients);
153 147
154 return s; 148 return s;
155} 149}
diff --git a/auto_tests/tox_strncasecmp_test.c b/auto_tests/tox_strncasecmp_test.c
index 3a544c00..fc0d2fc8 100644
--- a/auto_tests/tox_strncasecmp_test.c
+++ b/auto_tests/tox_strncasecmp_test.c
@@ -29,7 +29,7 @@ void verify(const char *s1, const char *s2, size_t n, Comparison expected)
29 29
30 ck_assert_msg(actual == expected, 30 ck_assert_msg(actual == expected,
31 "tox_strncasecmp(\"%s\", \"%s\", %u) == %s, but expected %s.", 31 "tox_strncasecmp(\"%s\", \"%s\", %u) == %s, but expected %s.",
32 s1, s2, n, Comparison_Str[actual], Comparison_Str[expected]); 32 s1, s2, (unsigned)n, Comparison_Str[actual], Comparison_Str[expected]);
33} 33}
34 34
35START_TEST(test_general) 35START_TEST(test_general)
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c
index be6da1d4..82c18b37 100644
--- a/auto_tests/tox_test.c
+++ b/auto_tests/tox_test.c
@@ -234,7 +234,7 @@ static void tox_file_chunk_request(Tox *tox, uint32_t friend_number, uint32_t fi
234 } 234 }
235 235
236 if (sending_pos != position) { 236 if (sending_pos != position) {
237 ck_abort_msg("Bad position %llu", position); 237 ck_abort_msg("Bad position %llu", (unsigned long long)position);
238 } 238 }
239 239
240 if (length == 0) { 240 if (length == 0) {
@@ -614,8 +614,9 @@ START_TEST(test_few_clients)
614 } 614 }
615 615
616 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, 616 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv,
617 totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, 617 totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1,
618 sending_pos); 618 (unsigned long long)totalf_size, (unsigned long long)size_recv,
619 (unsigned long long)sending_pos);
619 } 620 }
620 621
621 uint32_t tox1_interval = tox_iteration_interval(tox1); 622 uint32_t tox1_interval = tox_iteration_interval(tox1);
@@ -664,8 +665,8 @@ START_TEST(test_few_clients)
664 665
665 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %u %llu %llu %llu %llu", sendf_ok, file_recv, 666 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %u %llu %llu %llu %llu", sendf_ok, file_recv,
666 m_send_reached, totalf_size == file_size, size_recv == max_sending, sending_pos == size_recv, file_accepted == 1, 667 m_send_reached, totalf_size == file_size, size_recv == max_sending, sending_pos == size_recv, file_accepted == 1,
667 totalf_size, file_size, 668 (unsigned long long)totalf_size, (unsigned long long)file_size,
668 size_recv, sending_pos); 669 (unsigned long long)size_recv, (unsigned long long)sending_pos);
669 } 670 }
670 671
671 uint32_t tox1_interval = tox_iteration_interval(tox1); 672 uint32_t tox1_interval = tox_iteration_interval(tox1);
@@ -708,8 +709,9 @@ START_TEST(test_few_clients)
708 } 709 }
709 710
710 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, 711 ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv,
711 totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, 712 totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1,
712 sending_pos); 713 (unsigned long long)totalf_size, (unsigned long long)size_recv,
714 (unsigned long long)sending_pos);
713 } 715 }
714 716
715 uint32_t tox1_interval = tox_iteration_interval(tox1); 717 uint32_t tox1_interval = tox_iteration_interval(tox1);
@@ -728,17 +730,11 @@ START_TEST(test_few_clients)
728} 730}
729END_TEST 731END_TEST
730 732
731#ifdef TRAVIS_ENV
732static const uint8_t timeout_mux = 20;
733#else
734static const uint8_t timeout_mux = 10;
735#endif
736
737static Suite *tox_suite(void) 733static Suite *tox_suite(void)
738{ 734{
739 Suite *s = suite_create("Tox few clients"); 735 Suite *s = suite_create("Tox few clients");
740 736
741 DEFTESTCASE_SLOW(few_clients, 8 * timeout_mux); 737 DEFTESTCASE(few_clients);
742 738
743 return s; 739 return s;
744} 740}
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c
index 9a639eb8..02215098 100644
--- a/auto_tests/toxav_many_test.c
+++ b/auto_tests/toxav_many_test.c
@@ -341,10 +341,7 @@ static Suite *tox_suite(void)
341{ 341{
342 Suite *s = suite_create("ToxAV"); 342 Suite *s = suite_create("ToxAV");
343 343
344 TCase *tc_av_three_calls = tcase_create("AV_three_calls"); 344 DEFTESTCASE(AV_three_calls);
345 tcase_add_test(tc_av_three_calls, test_AV_three_calls);
346 tcase_set_timeout(tc_av_three_calls, 150);
347 suite_add_tcase(s, tc_av_three_calls);
348 345
349 return s; 346 return s;
350} 347}