Squashed 'external/toxcore/c-toxcore/' changes from 1828c5356..c9cdae001
c9cdae001 fix(toxav): remove extra copy of video frame on encode 4f6d4546b test: Improve the fake network library. a2581e700 refactor(toxcore): generate `Friend_Request` and `Dht_Nodes_Response` 2aaa11770 refactor(toxcore): use Tox_Memory in generated events 5c367452b test(toxcore): fix incorrect mutex in tox_scenario_get_time 8f92e710f perf: Add a timed limit of number of cookie requests. 695b6417a test: Add some more simulated network support. 815ae9ce9 test(toxcore): fix thread-safety in scenario framework 6d85c754e test(toxcore): add unit tests for net_crypto 9c22e79cc test(support): add SimulatedEnvironment for deterministic testing f34fcb195 chore: Update windows Dockerfile to debian stable (trixie). ece0e8980 fix(group_moderation): allow validating unsorted sanction list signatures a4fa754d7 refactor: rename struct Packet to struct Net_Packet d6f330f85 cleanup: Fix some warnings from coverity. e206bffa2 fix(group_chats): fix sync packets reverting topics 0e4715598 test: Add new scenario testing framework. 668291f44 refactor(toxcore): decouple Network_Funcs from sockaddr via IP_Port fc4396cef fix: potential division by zero in toxav and unsafe hex parsing 8e8b352ab refactor: Add nullable annotations to struct members. 7740bb421 refactor: decouple net_crypto from DHT 1936d4296 test: add benchmark for toxav audio and video 46bfdc2df fix: correct printf format specifiers for unsigned integers REVERT: 1828c5356 fix(toxav): remove extra copy of video frame on encode git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: c9cdae001341e701fca980c9bb9febfeb95d2902
This commit is contained in:
@@ -26,8 +26,8 @@ cc_test(
|
||||
srcs = ["test_util_test.cc"],
|
||||
deps = [
|
||||
":crypto_core",
|
||||
":crypto_core_test_util",
|
||||
":test_util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -118,19 +118,6 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "mem_test_util",
|
||||
testonly = True,
|
||||
srcs = ["mem_test_util.cc"],
|
||||
hdrs = ["mem_test_util.hh"],
|
||||
deps = [
|
||||
":mem",
|
||||
":os_memory",
|
||||
":test_util",
|
||||
":tox_memory",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "mem_test",
|
||||
size = "small",
|
||||
@@ -326,8 +313,8 @@ cc_test(
|
||||
deps = [
|
||||
":crypto_core",
|
||||
":crypto_core_test_util",
|
||||
":mem_test_util",
|
||||
":util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -373,7 +360,7 @@ cc_library(
|
||||
srcs = ["mono_time.c"],
|
||||
hdrs = ["mono_time.h"],
|
||||
visibility = [
|
||||
"//c-toxcore/auto_tests:__pkg__",
|
||||
"//c-toxcore/auto_tests:__subpackages__",
|
||||
"//c-toxcore/other:__pkg__",
|
||||
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
||||
"//c-toxcore/testing:__pkg__",
|
||||
@@ -388,13 +375,25 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "mono_time_test_util",
|
||||
testonly = True,
|
||||
srcs = ["mono_time_test_util.cc"],
|
||||
hdrs = ["mono_time_test_util.hh"],
|
||||
deps = [
|
||||
":mono_time",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "mono_time_test",
|
||||
size = "small",
|
||||
srcs = ["mono_time_test.cc"],
|
||||
deps = [
|
||||
":mem_test_util",
|
||||
":mono_time",
|
||||
":mono_time_test_util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -448,10 +447,11 @@ cc_library(
|
||||
"network.h",
|
||||
],
|
||||
visibility = [
|
||||
"//c-toxcore/auto_tests:__pkg__",
|
||||
"//c-toxcore/auto_tests:__subpackages__",
|
||||
"//c-toxcore/other:__pkg__",
|
||||
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
||||
"//c-toxcore/testing/fuzzing:__pkg__",
|
||||
"//c-toxcore/testing/support:__pkg__",
|
||||
"//c-toxcore/toxav:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
@@ -490,6 +490,7 @@ cc_test(
|
||||
deps = [
|
||||
":network",
|
||||
":network_test_util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -527,9 +528,9 @@ cc_test(
|
||||
srcs = ["ping_array_test.cc"],
|
||||
deps = [
|
||||
":crypto_core_test_util",
|
||||
":mem_test_util",
|
||||
":mono_time",
|
||||
":ping_array",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -597,9 +598,13 @@ cc_library(
|
||||
":DHT",
|
||||
":crypto_core",
|
||||
":crypto_core_test_util",
|
||||
":logger",
|
||||
":mono_time",
|
||||
":net_crypto",
|
||||
":network",
|
||||
":network_test_util",
|
||||
":test_util",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -613,11 +618,11 @@ cc_test(
|
||||
":crypto_core",
|
||||
":crypto_core_test_util",
|
||||
":logger",
|
||||
":mem_test_util",
|
||||
":mono_time",
|
||||
":network",
|
||||
":network_test_util",
|
||||
":test_util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -631,9 +636,8 @@ cc_fuzz_test(
|
||||
corpus = ["//tools/toktok-fuzzer/corpus:DHT_fuzz_test"],
|
||||
deps = [
|
||||
":DHT",
|
||||
":mem_test_util",
|
||||
":net_profile",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -689,8 +693,7 @@ cc_fuzz_test(
|
||||
corpus = ["//tools/toktok-fuzzer/corpus:forwarding_fuzz_test"],
|
||||
deps = [
|
||||
":forwarding",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_tox",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -821,6 +824,25 @@ cc_test(
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "TCP_client_test",
|
||||
size = "small",
|
||||
srcs = ["TCP_client_test.cc"],
|
||||
deps = [
|
||||
":TCP_client",
|
||||
":TCP_common",
|
||||
":crypto_core",
|
||||
":logger",
|
||||
":mono_time",
|
||||
":net_profile",
|
||||
":network",
|
||||
":util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "net_crypto",
|
||||
srcs = ["net_crypto.c"],
|
||||
@@ -848,6 +870,44 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "net_crypto_test",
|
||||
size = "small",
|
||||
srcs = ["net_crypto_test.cc"],
|
||||
deps = [
|
||||
":DHT_test_util",
|
||||
":crypto_core",
|
||||
":logger",
|
||||
":mono_time",
|
||||
":net_crypto",
|
||||
":net_profile",
|
||||
":network",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "friend_connection_test",
|
||||
size = "small",
|
||||
srcs = ["friend_connection_test.cc"],
|
||||
deps = [
|
||||
":DHT_test_util",
|
||||
":crypto_core",
|
||||
":friend_connection",
|
||||
":logger",
|
||||
":mono_time",
|
||||
":net_crypto",
|
||||
":net_profile",
|
||||
":network",
|
||||
":onion_client",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_fuzz_test(
|
||||
name = "net_crypto_fuzz_test",
|
||||
size = "small",
|
||||
@@ -857,12 +917,10 @@ cc_fuzz_test(
|
||||
deps = [
|
||||
":DHT",
|
||||
":TCP_client",
|
||||
":mem_test_util",
|
||||
":net_crypto",
|
||||
":net_profile",
|
||||
":network",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_tox",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -925,9 +983,10 @@ cc_test(
|
||||
":crypto_core",
|
||||
":group_announce",
|
||||
":logger",
|
||||
":mem_test_util",
|
||||
":mono_time",
|
||||
":mono_time_test_util",
|
||||
":network",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -941,8 +1000,7 @@ cc_fuzz_test(
|
||||
corpus = ["//tools/toktok-fuzzer/corpus:group_announce_fuzz_test"],
|
||||
deps = [
|
||||
":group_announce",
|
||||
":mem_test_util",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -984,6 +1042,7 @@ cc_library(
|
||||
":crypto_core",
|
||||
":group_announce",
|
||||
":group_onion_announce",
|
||||
":list",
|
||||
":logger",
|
||||
":mem",
|
||||
":mono_time",
|
||||
@@ -998,6 +1057,42 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "onion_client_test",
|
||||
size = "small",
|
||||
srcs = ["onion_client_test.cc"],
|
||||
deps = [
|
||||
":DHT_test_util",
|
||||
":crypto_core",
|
||||
":logger",
|
||||
":mono_time",
|
||||
":net_crypto",
|
||||
":net_profile",
|
||||
":network",
|
||||
":onion",
|
||||
":onion_announce",
|
||||
":onion_client",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_fuzz_test(
|
||||
name = "onion_client_fuzz_test",
|
||||
size = "small",
|
||||
testonly = True,
|
||||
srcs = ["onion_client_fuzz_test.cc"],
|
||||
# corpus = ["//tools/toktok-fuzzer/corpus:onion_client_fuzz_test"],
|
||||
deps = [
|
||||
":DHT",
|
||||
":net_crypto",
|
||||
":net_profile",
|
||||
":onion_client",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "friend_connection",
|
||||
srcs = ["friend_connection.c"],
|
||||
@@ -1073,8 +1168,8 @@ cc_test(
|
||||
":crypto_core_test_util",
|
||||
":group_moderation",
|
||||
":logger",
|
||||
":mem_test_util",
|
||||
":util",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -1088,8 +1183,7 @@ cc_fuzz_test(
|
||||
corpus = ["//tools/toktok-fuzzer/corpus:group_moderation_fuzz_test"],
|
||||
deps = [
|
||||
":group_moderation",
|
||||
":mem_test_util",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1242,6 +1336,7 @@ cc_test(
|
||||
":tox",
|
||||
":tox_log_level",
|
||||
":tox_options",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -1309,6 +1404,7 @@ cc_test(
|
||||
":crypto_core",
|
||||
":tox",
|
||||
":tox_events",
|
||||
"//c-toxcore/testing/support",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -1322,7 +1418,7 @@ cc_fuzz_test(
|
||||
deps = [
|
||||
":tox_dispatch",
|
||||
":tox_events",
|
||||
"//c-toxcore/testing/fuzzing:fuzz_support",
|
||||
"//c-toxcore/testing/support",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user