summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-08-16Reduce the number of times `unix_time_update` is called.iphydf
Reduced by, e.g.: * `file_transfer_test`: 33% of the `clock_gettime` calls. * `tox_many_test`: 53% of the `clock_gettime` calls. Other tests will see similar improvements. Real world applications will be closer to 40-50% improvement, since tox_many_test has 100 nodes, while file_transfer_test has 2 nodes.
2018-08-15Fix possible resource leaks in testcrypto-universe
2018-08-13Fix some printf format specifiers.iphydf
2018-08-12Add simple deterministic random number generator for testszugz (tox)
2018-08-12Assert that we don't divide by 0 in random_testing.cc.iphydf
This is always true due to the condition function, but if we introduce a bug that makes the condition not be applied, this causes undefined behaviour.
2018-08-12Fix a few warnings from clang.iphydf
Also remove the use of a VLA in a context where there can be unbounded memory allocations.
2018-07-22Run Clang global static analysis on Travis.iphydf
This uses a single .cc file containing almost all the code in the repository to perform whole program analysis.
2018-07-21Avoid implementations in .h files or #including .c files.iphydf
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
2018-07-09Factor out time keeping code into its own module: mono_time.c.iphydf
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-05Make tox.c unambiguously parseable.iphydf
Rules: 1. Constants are uppercase names: THE_CONSTANT. 2. SUE[1] types start with an uppercase letter and have at least one lowercase letter in it: The_Type, THE_Type. 3. Function types end in "_cb": tox_friend_connection_cb. 4. Variable and function names are all lowercase: the_function. This makes it easier for humans reading the code to determine what an identifier means. I'm not convinced by the enum type name change, but I don't know a better rule. Currently, a lot of enum types are spelled like constants, which is confusing. [1] struct/union/enum
2018-07-04Add `#include <cstdio>` for `std::printf`.iphydf
2018-06-29Remove broken conference tests.iphydf
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-24Use clang-format for C++ code.iphydf
`clang-format -style='{BasedOnStyle: Google, ColumnLimit: 100}'`
2018-06-24Add new Circle CI configuration.iphydf
This one has ASAN enabled, unlike Travis.
2018-06-23Add random testing program.iphydf
This can be used as a random stress test for toxcore. Adjust the weights to make certain actions more or less likely.
2018-04-17Improve network error reporting on WindowsMaxim Biro
Windows doesn't report network errors though errno, it has its own facilities.
2018-03-16Move struct DHT_Friend into DHT.c.iphydf
2018-03-16Remove the use of the 'hh' format specifier.iphydf
It's not supported in mingw. See https://github.com/TokTok/c-toxcore/issues/786.
2018-02-24Fix a bunch of compiler warnings and remove suppressions.iphydf
2018-02-11Improve video key frame sending.zoff99
This change does not include the addition of VP9. We do that in a separate pull request. Changes: * fix the video bug (video frames larger than 65KBytes) by sending full frame length in alternate header field * improve video frame reconstruction logic with slots * configure video encoder and decoder to be multihtreaded * set error resilience flags on video codec * change encoder and decoder softdeadline
2018-02-08Remove csrc from the RTPHeader struct.iphydf
This is not used by anything in the code, so we shouldn't have it in the header.
2018-02-06Move tox_shell program to the toxins repository.iphydf
https://github.com/TokTok/toxins/tree/master/tox_shell
2018-02-06Move irc_syncbot to the toxins repository.iphydf
2018-02-05Move the tox_sync tool to the toxins repository.iphydf
2018-01-30Use nullptr as NULL pointer constant instead of NULL or 0.iphydf
This changes only code, no string literals or comments.
2018-01-28Avoid clashes with "build" directories on case-insensitive file systems.iphydf
2018-01-28Make audio/video bit rates "properties"xhe
follow TokTok#731. This commit completely removed all things in namespace bit_rate, and deprecated functions are to be added back in another commit. set_xxx() is treadted as a property of namespace audio&video, same as bit_rate change event. toxav_basic_test is fixed, either.
2018-01-26Fix out of bounds read in error case in messenger_test.iphydf
Also got rid of two VLAs. They are overused a bit in toxcore. In irc_syncbot, the array was uninitialised and then filled by a recv system call. This can cause uninitialised reads if recv doesn't fill the entire array. It could not cause out of bounds read directly, because a NUL-terminator was in place, but both cases are undefined behaviour.
2018-01-22Publish a single public BUILD target for c-toxcore.iphydf
2018-01-22Use self-built portaudio instead of system-provided.iphydf
2018-01-21Make BUILD files more finely-grained.iphydf
This allows us to precisely see which libraries depend on which and lets us split them up more, if necessary.
2018-01-21Add BUILD files for all the little tools in the repo.iphydf
Also, fix av_test.c, since I broke it last time.
2018-01-21Don't allocate or dereference Tox_Options in tests.iphydf
This struct will soon become opaque.
2018-01-20Add testing/*.c (except av_test) to bazel build.iphydf
2018-01-20Remove nTox from the repo.iphydf
It's a maintenance burden nobody uses. Let's make toxic the official console client, instead.
2018-01-18Add bazel build scripts for c-toxcore.iphydf
This allows us and users to reproducibly build verified versions of the library with checksums. It will power the toktok-stack continuous build with checked-in checksums at specific git revisions.
2018-01-16Make DHT a module-private type.iphydf
2018-01-15Remove hstox test for now.iphydf
This isn't adding value. We're going to redo the whole rpc test framework in the future, after a lot of refactoring that the hstox test currently just stands in the way of.
2018-01-14Fix some memory or file descriptor leaks in test code.iphydf
Also some missing return value checks for `fopen`.
2018-01-10Fix formatting in some C files.iphydf
Also replace &(x) with &x for consistency.
2018-01-10Fix file descriptor leak in hstox test.iphydf
We return E_WRITE because closing only fails when an I/O error occurs, which is likely an error from the write() call above. See close(2) for details. http://man7.org/linux/man-pages/man2/close.2.html
2018-01-10Zero-initialise stack-allocated objects in hstox driver.iphydf
These potentially cause uninitialised reads on some platforms or msgpack library versions.
2017-12-29Remove deprecated ToxDNSiphydf
Based on #331. Fixes #42.
2017-12-28Generate only one large library "libtoxcore".iphydf
This library contains all the code for the old libtoxcore, libtoxav, libtoxdns, and libtoxencryptsave. The build for toxav is still optional, and disabling it causes libtoxcore to simply not contain those symbols and the pkg-config file to not include opus and vpx as dependencies.
2017-12-28Fix include for endian.h and add includes for sys/stat.h andendoffile78
netinet/in.h
2017-08-24AF_INET -> TOX_AF_INETDiadlo
2017-06-05Build tests on appveyor, the MSVC build.iphydf
Tests are not actually ran on appveyor for now, since they all fault for some reason. For now, we just build them. Also, some tests are disabled on msvc entirely, because they don't even compile. We'll need to look into those, later. They are disabled using `MSVC_DONT_BUILD`.
2017-06-04Fix formatting and spelling in version-sync script.iphydf
Also some minor reformatting and fixes to the hstox sut driver.
2017-06-03Use new encoding of `Maybe` in msgpack results.iphydf
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.