Commit Graph

218 Commits

Author SHA1 Message Date
Robin Lindén
31ea1aa06e
Release 0.2.6 2018-08-16 22:45:33 +02:00
iphydf
1de8b020cb
Remove all uses of the PAIR macro in toxav. 2018-08-12 11:38:23 +00:00
Robin Lindén
ffd71e895b
Release 0.2.5 2018-08-08 19:38:31 +02:00
hugbubby
051eb1d5a7
auto_test fixture and filenames
Renamed a poorly named test, fixed up a few printf statements,
substituted some unsigned integers with fixed size counterparts,
and implemmented the auto_run_test.h fixture for the lossy and
lossless packet tests.
2018-07-28 16:14:06 +00:00
hugbubby
c4d58403f9
More fixed_width ints and incorporating file_saving_test.c
The file_saving_test.c was not included in the cmake list
and thus was ignored by travis and "make check". I found this
out while introducing ck_assert_msg into the integration test.

Furthermore, removed some variable width integers from encryptsave_test.c,
and the SRunner utilization. Implemmented ck_assert_msg, reorganized some
loops, and removed some longs in file_transfer_test.c.
2018-07-23 15:10:22 +00:00
iphydf
f627a26a7b
Run Clang global static analysis on Travis.
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
2018-07-22 02:34:30 +00:00
iphydf
7245ac11ef
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
2018-07-21 20:44:26 +00:00
Robin Lindén
a672b3c56e
Release v0.2.4 2018-07-20 22:52:14 +02:00
iphydf
bf79fdbb43
Link -lsocket and -lnsl for socket functions on Solaris.
Also, added some #defines to make symbols visible that are in BSD but not
in UNIX. Solaris needs these, since it's fairly strict with its symbol
visibility in system headers.
2018-07-19 15:05:26 +00:00
iphydf
9eacfafff7
Set C++11/C99 flag manually in older cmake on not-msvc.
These flags are needed so the code actually compiles, so can't only be
set on Travis.
2018-07-15 23:01:32 +00:00
iphydf
beeb9b4335
Style fixes in TCP code; remove MIN and PAIR from util.h.
* Moved PAIR to toxav, where it's used (but really this should die).
* Replace most MIN calls with typed `min_*` calls. Didn't replace the
  ones where the desired semantics are unclear. Moved the MIN macro to
  the one place where it's still used.
* Avoid assignments in `while` loops. Instead, factored out the loop body
  into a separate `bool`-returning function.
* Use named types for callbacks (`_cb` types).
* Avoid assignments in `if` conditions.
* Removed `MAKE_REALLOC` and expanded its two calls. We can't have
  templates in C, and this fake templating is ugly and hard to analyse
  and debug (it expands on a single line).
* Moved epoll system include to the .c file, out of the .h file.
* Avoid assignments in expressions (`a = b = c;`).
* Avoid multiple declarators per struct member declaration.
* Fix naming inconsistencies.
* Replace `net_to_host` macro with function.
2018-07-12 20:21:42 +00:00
iphydf
abc17b0f89
Factor out time keeping code into its own module: mono_time.c.
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.

2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
  could go backward in time but I think I might have started using it like
  if it could not after I changed it so that it would never go back in time
```
2018-07-09 21:04:50 +00:00
iphydf
c8697ccc20
Move load_state and its helper functions to their own module. 2018-07-09 20:36:39 +00:00
iphydf
3c1025d2dc
Factor out the actual test code from conference_test.
Also, renamed simple_conference_test to conference_simple_test so it's
sorted together with the other conference tests.

Next step is to use run_auto_test.h for the conference test.
2018-07-07 10:35:35 +00:00
iphydf
9d5c55b4b3
Add a test that reproduces the NULL peer nick bug. 2018-07-06 11:14:44 +00:00
iphydf
3ef1f839fc
Add some tests for our ring_buffer implementation.
These can serve as documentation until we write actual api docs, probably
using apidsl.
2018-07-04 10:37:46 +00:00
iphydf
1a54be06cd
Simplify Travis CI builds.
Have one script per build. This means more duplication between the
scripts, but it's much easier to understand and to run locally.
2018-07-01 08:35:44 +00:00
iphydf
706fad1ce8
Add a test to try and overflow the send queue in net_crypto. 2018-06-29 23:24:20 +00:00
iphydf
b9a75d98b2
Remove broken conference tests.
These display some idea, but the tests are not implemented correctly. We
will need to implement the idea correctly later, but for now we can't use
these.
2018-06-29 18:25:44 +00:00
Robin Lindén
ae7899cab8
Release v0.2.3 2018-06-25 23:49:52 +02:00
iphydf
d22332dd50
Remove the format test.
It's annoying to have a test touch every source file. It causes a
recompile of everything after every test run.
2018-06-25 19:48:11 +00:00
iphydf
29b2dd6315
Use clang-format for C++ code.
`clang-format -style='{BasedOnStyle: Google, ColumnLimit: 100}'`
2018-06-24 20:17:53 +00:00
iphydf
5c2600d87b
Add new Circle CI configuration.
This one has ASAN enabled, unlike Travis.
2018-06-24 19:51:34 +00:00
iphydf
5a8790eab0
Add a test for double conference invite.
In Persistent Group Chats (PGC), this will cause a use-after-free. This
test ensures that we fix this bug before merging PGC.
2018-06-24 01:09:46 +00:00
iphydf
cfff361679
Add random testing program.
This can be used as a random stress test for toxcore.
Adjust the weights to make certain actions more or less likely.
2018-06-23 12:43:09 +00:00
iphydf
a48e0c4d18
Add tests for what happens when passing an invalid proxy host.
Related: https://github.com/qTox/qTox/issues/5174
2018-06-23 12:34:33 +00:00
iphydf
2296d07e09
Add test for creating multiple conferences in one tox.
This triggers a code path in Persistent Group Chats that causes a memory
leak. I'm adding this test now, so that we don't merge PGC without fixing
the memory leak first.
2018-06-19 21:00:26 +00:00
iphydf
3a85d88fb1
Remove resource_leak_test.
This test has never caught a bug. It's better to catch these with asan or
the likes.
2018-06-18 19:25:30 +00:00
iphydf
90e1d969ac
Fix linking with address sanitizer.
`-fsanitize=address` also needs to be passed to the linker.
2018-06-18 19:19:31 +00:00
iphydf
cf9caa069a
In DEBUG mode, make toxcore crash on signed integer overflow.
Signed overflow is undefined behaviour, so in debug mode, we want to make
it fail in a noisy way.
2018-06-08 23:48:40 +00:00
endoffile78
91f65354a2
Make toxcore compile on BSD 2018-05-10 17:56:15 +02:00
Robin Lindén
2824daf74a
Release v0.2.2 2018-04-18 00:13:16 +02:00
Braiden Vasco
09478f9957
CMake warn if libconfig not found 2018-04-06 15:51:20 +00:00
hqwrong
eb6b602095
fix build error on macos 2018-03-22 17:35:44 +08:00
iphydf
9706d9a0f0
Disallow stderr logger by default. 2018-03-17 15:04:03 +00:00
iphydf
ea7ecd6d32
Add COVERAGE cmake flag for clang.
This only works with clang/llvm. Coveralls support needs to be added later.
2018-03-17 14:32:57 +00:00
iphydf
23e9f01f1c
Update version to 0.2.1. 2018-03-09 20:40:28 +00:00
iphydf
d3b286cb43
Fix a bunch of compiler warnings and remove suppressions. 2018-02-24 22:20:22 +00:00
iphydf
b2a2a0bbc7
Link all tests to the android cpufeatures library if available.
This is needed for libvpx to work on android.

This also means that we can upload our test binaries to an android device
and actually run them, now that libcheck is no longer a blocker.
2018-02-23 01:05:00 +00:00
iphydf
c8359c843b
Fix toxcore.pc generation.
It's missing vpx and opus at the moment.
2018-02-22 17:34:39 +00:00
iphydf
d7471482d1
Add an option that allows us to specify that we require toxav. 2018-02-22 13:56:55 +00:00
iphydf
ee53d96447
Fix the windows build: pthread needs to be linked after vpx. 2018-02-21 01:13:39 +00:00
iphydf
c4a734e304
Remove apidsl from the build.
apidsl is in feature freeze. We can rely on the web service, instead.
2018-02-19 21:00:19 +00:00
iphydf
3dc8cf6df8
Disable lan discovery in most tests. 2018-02-18 21:32:28 +00:00
Robin Lindén
c3515c49e0
Split up tox_test into multiple smaller tests 2018-02-18 14:50:18 +00:00
iphydf
13706de14b
Don't build all the small sub-libraries.
This caused us to build everything 2-4 times, now we only build it 1-2
times (depending on selection of static/shared builds). The disadvantage
is that now it's more up to the reviewer to ensure modularity (we still
catch it in the bazel build, though).
2018-02-18 14:11:03 +00:00
zoff99
82662d4e16
Make outgoing Filetransfers round-robin.
Instead of 1 FT blocking all others.
2018-02-17 16:32:25 +00:00
iphydf
c09917c6a7
Optionally use newer cmake features.
So we can keep supporting cmake 2.8.12, which is the version on ubuntu
trusty.
2018-02-12 10:56:10 +00:00
iphydf
2e74db5447
Improve gtest finding, support local checkout.
Also fix library dependency order for monolith test.
2018-02-11 12:20:36 +00:00
iphydf
6cd4fcdec4
Remove libcheck from the dependencies.
We're not gaining much from this library, and it's a burden, especially
for windows development.
2018-02-09 20:51:39 +00:00