Commit Graph
4754 Commits
Author SHA1 Message Date
iphydf 2db6599be5 test: Add some simple tests for list.c.
These are pretty useless, but I'm adding the list_test.cc file for future
better tests to be written in.
2021-12-07 10:32:45 +00:00
Robin Linden 713ce6108c Improve Tox creation logging in save_load test 2021-12-06 23:28:53 +01:00
Robin Linden 4348b96a5b Release 0.2.13 v0.2.13 2021-12-06 23:28:52 +01:00
jfreegman ce268c2f82 Add some missing null checks 2021-12-06 16:57:07 -05:00
iphydf d930ecca4c chore: Run infer static analyser on circle ci builds.
Also running some other analysis that we used to have on Travis.
2021-12-06 20:25:50 +00:00
iphydf af1848ed13 chore: Use toktok-stack docker image with built third_party.
This should cut down the build time a bit by downloading the binaries
built for `//third_party/...`.
2021-12-05 19:21:57 +00:00
sudden6 0320e2eb8e fix missing braces in computed macro value
Using this value in any computation might not work as expected.
2021-12-05 14:20:04 +01:00
sudden6 1b02bad368 fix possible stack overflow
CRYPTO_SIZE is used in a subtraction as second argument and instead of
subtracting then intended value only '1' is subtracted due to operator
precedence rules and missing braces.
2021-12-05 14:20:00 +01:00
zugz (tox) f12347dfec Fix buffer over-read when a peer leaves a conference
Fixes 1598 -- thanks to peirick for reporting the bug.
2021-12-01 20:31:50 +00:00
iphydf 57b0651ffd test: Add some unit tests for important internal DHT functions.
We definitely need more of this kind of test so refactorings don't
accidentally break things in ways that happen to still work in auto
tests.
2021-12-01 14:08:37 +00:00
sudden6 fd73f3eeb6 add logging when connection limits file transfer speed 2021-11-30 15:55:00 +01:00
sudden6 286cc44f54 rewrite filetransfer logic in Messenger.c
Makes the logic easier to follow and removes suspicious case.
2021-11-30 15:54:58 +01:00
sudden6 10ddf8097c rewrite loop for better understanding 2021-11-30 15:53:31 +01:00
sudden6 825d457073 simplify do_all_filetransfers
This should not change any behaviour of this function.
2021-11-30 15:52:27 +01:00
zugz (tox) 01c3869bd0 Add instructions for building unit tests to INSTALL.md 2021-11-30 14:10:16 +00:00
sudden6 0c320462d7 perf: reduce calling into Mono_Time in DHT
Mono_Time needs to acquire a lock each time one of its functions are
used. This becomes very costly in the DHT code where timeouts for all
connected nodes are recalculated. Improve this by caching the timestamp
at the begin of a do_dht() iteration.
2021-11-29 19:02:17 +01:00
jfreegman 8b725c1ecc Fix some friend connection issues
- Properly handle crypto_connection_status() failure
- Remove CONNECTION_UNKNOWN and restructure surrounding logic so that
  the API no longer reports erroneous friend connection statuses
2021-11-27 19:27:55 -05:00
jfreegman c0a0a8204c Fix bug causing API to report wrong self connection status 2021-11-27 18:43:35 -05:00
iphydf 99d873b985 chore: Enable cimple tests on cirrus build.
This ensures that we don't break Cimple compatibility despite Travis
being gone (which used to test this).
2021-11-27 02:56:17 +00:00
jfreegman b66165977e fix issue with save_load autotest
The test explicitly wanted a UDP connection when a TCP connection would suffice. This
was a remnant of back when the test was part of a multi-purpose autotest that
didn't attempt to connect to TCP relays and needed a UDP connection specifically.
2021-11-25 15:32:29 -05:00
iphydf 1700334c3b chore: Upgrade to toktok-stack:0.0.11. 2021-11-25 18:32:50 +00:00
cryptogospod 13cca6716d Update IRC info 2021-09-18 00:02:57 +02:00
Robin Linden 485fe88253 Get Appveyor and Cirrus CI to pass again
* Fix Appveyor CI build

The problem was that when running commands in powershell, any stderr
output is treated as an "exception", stopping the build even if the exit
code of the command was good.

* Add workarounds to get Cirrus CI to pass

Removing the cache isn't great, but the build is still only 5-7 minues,
so it's not terrible either.

Disabling the tcp_relay test also sucks. It passes locally, so we're
likely getting caught in a firewall or something like it somewhere.
2021-09-17 23:43:09 +02:00
sudden6 25a56c3549 simplify do_tcp(...) 2021-04-12 19:01:10 +02:00
Alexandre Petitjean c9ad4a2e39 Enable c-toxcore conan packaging 2021-04-11 15:56:02 +02:00
Maxim Biro 6f3cdb1780 Remove references to Tox's package repository
Since it's shut down
2021-03-02 04:25:53 -05:00
Maxim Biro d8c676bb01 Remove references to Jenkins
Since we are shutting it down
2021-03-02 04:25:32 -05:00
Maxim Biro 0d5f85485b Update deps used in Windows build scripts 2021-02-25 13:59:18 +03:00
redmanmale 98c148179f Add Cygwin build script 2021-02-25 13:57:42 +03:00
Robin Linden a71ddc7eac Fix tests involving reading/writing files failing on Windows
The issue was that r and w without the b flag on Windows does LF and CR
translations when reading and writing. Not good for binary files.
2020-11-21 13:02:31 +01:00
jfreegman 00f2f41dbb Use heap memory instead of stack for large variables
The default stack size for musl-libc is 128kb. Therefore we should try to keep stack
allocations well below this limit in order to avoid stack overflows.
2020-11-20 19:15:58 -05:00
Robin Linden 5d2b1e3861 Update tox-bootstrapd checksum due to newer packages in Alpine
* g++       9.2.0-r4  -> 9.3.0-r0
* gcc       9.2.0-r4  -> 9.3.0-r0
* libatomic 9.2.0-r4  -> 9.3.0-r0
* libcurl   7.67.0-r0 -> 7.67.0-r1
* libgcc    9.2.0-r4  -> 9.3.0-r0
* libgomp   9.2.0-r4  -> 9.3.0-r0
* libstdc++ 9.2.0-r4  -> 9.3.0-r0
* python3   3.8.2-r0  -> 3.8.2-r1
2020-11-16 16:22:55 +01:00
Robin Linden 470fa79f92 Fix AppVeyor failing due to conan remote being added twice 2020-06-12 11:25:55 +02:00
Robin Linden 56992b099e Add support for the conan C/C++ package manager
* Don't overwrite the CMAKE_MODULE_PATH
* Allow linking libsodium statically with MSVC
* Allow finding libsodium the normal way on MSVC
* Allow using pthreads4w for pthreads on MSVC
* Fall back to find_package if pkg_find_module fails
* Don't pass incompatible compile flags to MSVC
* Also try to find Opus and libvpx using their canonical names
* Support building using conan
* Allow pkg_use_module to take a list of libraries to look for
* Build for Windows on Appveyor using conan
2020-05-29 15:36:26 +02:00
iphydf 03a511482f Format comments according to tokstyle's requirements. 2020-05-17 18:16:42 +01:00
iphydf fe8e0fb8fa Fix tcp_relay_test by adding a second bootstrap node.
This is a non-hermetic network test. initramfs node is down, so let's
have a second one for redundancy.
2020-05-17 12:41:00 +01:00
iphydf 3d601fe320 style: Run restyled on Travis and Circle CI scripts. 2020-05-08 01:31:24 +01:00
iphydf 8f4400b9b4 cleanup: Make pylint and mypy happy with bootstrap_node_info.py. 2020-05-06 10:59:47 +01:00
iphydf 3851cfb652 Add autotools build to localbuild docker images. 2020-05-05 23:41:16 +01:00
iphydf 8c0fd40356 refactor: Remove multi-declarators entirely.
We no longer allow `int a, b;`. In the few cases where we used it, we
instead better

* limit the scope of the identifier (e.g. in a for-init-decl)
* split the line and have 2 separate declarators, because the
  identifiers designate different types of things (e.g. friend numbers
  and group numbers).
2020-05-05 23:22:29 +01:00
iphydf fd2bb77923 chore: Don't build pushes to branches, only to tags. 2020-05-05 23:10:12 +01:00
iphydf 48bd200acb refactor: Disallow multiple initialised declarators per decl.
We no longer allow:

```c
int a = 0, b = 0;
int a[3], b[3];
int a, *b;
```

But we do still allow (for now):

```c
int a, b;
```
2020-05-05 22:56:35 +01:00
iphydf c1a2ea3309 Use bash arrays instead of strings for static analysis scripts.
These are more robust wrt. spaces in names.
2020-05-05 01:53:01 +01:00
iphydf f8ab7218f0 Exclude imported libsodium sources from restyled.
Also limit clang-format to .cc files. Don't apply it to .c files.
2020-05-05 01:36:16 +01:00
iphydf 9edb2e5088 chore: Delete release-drafter config in favour of global one. 2020-05-05 01:07:59 +01:00
iphydf d52bf0a947 refactor: Minor cleanup: limit scope of loop iterators. 2020-05-05 00:58:33 +01:00
iphydf 669ea8797b Fix typo: NAC_LIBS -> NACL_LIBS.
This is working, so probably `NACL_LIBS` is entirely useless, but I
can't be bothered to figure out what this was supposed to be, so here we
are.
2020-05-04 19:54:58 +01:00
iphydf cc99ecd43a Stop hard-coding packet IDs in tests. 2020-05-04 02:14:56 +01:00
iphydf 02a5bdc60c Add logging to TCP and onion client. 2020-05-04 01:27:36 +01:00
iphydf 4efe541814 Add a script to run Travis CI locally.
This isn't quite Travis, but close enough for local testing.
2020-05-03 16:59:26 +01:00