Commit Graph

237 Commits

Author SHA1 Message Date
irungentoo
098df5ae31 Added local file sending test to tox_test and updated TODO. 2014-02-19 17:16:47 -05:00
irungentoo
62ef4ed95d Astyled and added tests. 2014-02-18 13:49:17 -05:00
irungentoo
4b4507b44f Fixed test issue. 2014-02-17 19:28:31 -05:00
Maxim Biro
ecbceac341 Fixed memory leaks and removed repeated code 2014-02-09 02:01:04 -05:00
irungentoo
696a6ba02e Onion_test should be now a bit less failure prone. 2014-02-07 20:39:30 -05:00
irungentoo
7ccff33069 Made onion test taste more like onion. 2014-02-05 19:51:22 -05:00
irungentoo
a13e30e8bb Test passes now, uncommented it. 2014-01-30 14:59:31 -05:00
irungentoo
f1e0e16b67 A bit of tests added. 2014-01-29 20:59:50 -05:00
irungentoo
00100ea335 random_nodes_path should return slightly better paths.
Fixed test in network_test failing on some machines because of localhost
ipv6 issues.
2014-01-21 11:14:16 -05:00
irungentoo
aff6b112c0 Merge branch 'onion' 2014-01-20 12:48:26 -05:00
Ben Iofel
174cec7f15 proper windows preprocessor detection 2014-01-19 19:30:14 -05:00
irungentoo
81dd4a8083 Fixed onion_test. 2014-01-19 14:41:29 -05:00
irungentoo
99ae23813b Some optimizations and fixes. 2014-01-18 18:35:28 -05:00
irungentoo
cd2474a2f6 Incorporated onion into Tox.
Fixed a couple of issues related to that.
2014-01-17 13:35:40 -05:00
irungentoo
a49a09f94b Onion data packets can now be handled in onion_client.
oniondata_registerhandler(...) can be used to register different packet
types to handle them and send_onion_data(...) can be used to send these
packets.
2014-01-14 14:20:42 -05:00
irungentoo
ea7d1a726d Putting the sendback outside the encrypted part of the response.
It's more useful this way.
2014-01-09 19:54:42 -05:00
irungentoo
0fd8e49c38 Fixed problem in onion_announce.c
Added a way to know if a announce response is valid.
2014-01-08 20:15:35 -05:00
irungentoo
566c9f63bc onion_announce seems to be working perfectly.
Stuff added and fixed.
2014-01-06 17:59:44 -05:00
irungentoo
6cd1e7fb70 Tests added and some fixes for the onion part. 2014-01-05 19:22:38 -05:00
irungentoo
7e2d21271a Some work on the onion part done. 2014-01-04 19:40:43 -05:00
irungentoo
d46891c3b7 A bit of work done on the onion part. 2014-01-03 22:13:20 -05:00
irungentoo
97b9a9cf04 Added onion.c to build system and added a test. 2013-12-31 23:18:37 -05:00
irungentoo
a55437a220 Added some tests. 2013-12-22 22:30:14 -05:00
irungentoo
c51b8a9eba Added function to save an encrypted version of the messenger.
Also added some tests.
2013-12-21 22:35:27 -05:00
irungentoo
a576e451ab Added new tox autotest. 2013-12-18 20:34:11 -05:00
irungentoo
7092303823 Added simple test for tox. 2013-12-17 18:55:28 -05:00
irungentoo
15d17b0a3c Astyled the code. 2013-12-16 20:49:24 -05:00
irungentoo
1c45e59938 Added/updated some basic docs and cleaned up some things. 2013-12-07 19:06:41 -05:00
irungentoo
7cd43ecc76 Merge branch 'master' into harden 2013-12-06 22:51:17 -05:00
irungentoo
245a1511e6 Added a assoc test.
Changed default assoc so that it behaves correctly.
2013-12-05 19:25:56 -05:00
Coren[m]
b132c92b3a
Assoc's array is now allocated dynamically and per default much smaller (320 entries).
id_hash() was not at all working as expected for very small bucket size (when (size / 4) was zero). Simplified to be trivially correct.
Also added a used flag on adding an entry, which is set by callers if they have that association in active use. Those get priority over unused entries on collision.
Fleshed out test to be at least elementary useful.
Each group chat now uses an own, small assoc (80 entries).
2013-11-17 01:05:00 +01:00
Coren[m]
0d8329b3a9
Significantly trimmed down version of an ID<=>IP cache.
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.
2013-11-14 19:05:53 +01:00
irungentoo
0a3f1f3aee Fixed test. 2013-11-10 19:45:24 -05:00
irungentoo
57763f2737 Merge branch 'master' into harden
Conflicts:
	toxcore/DHT.c
2013-11-10 14:32:46 -05:00
Coren[m]
fdefb18fc1
Reduce duplicate data. Add a mostly empty skeleton test. 2013-11-06 20:32:19 +01:00
irungentoo
8e0ab68d30 Removed define that could become confusing. 2013-10-24 13:34:04 -04:00
irungentoo
55dececf90 Code cleanups.
Fixed some tests.
2013-10-23 14:49:59 -04:00
Coren[m]
1331a32223 Broken *_wait() into *_wait_prepare() and *_wait_execute()
To allow the actual waiting to run without any locking, split it into preparing the data it uses and the execution of the wait.
The caller must provide with the buffer to store whatever data it requires to wait.
Completely eliminates any reliance on the existence of anything but that data in the actual wait routine.

Also fixed a few argument type warnings inside LOGGING.
2013-10-05 12:53:54 +02:00
Coren[m]
6fe25e4f6f Permit -Wshadow as useful warning. 2013-09-27 11:24:33 +02:00
irungentoo
5a83c1296c astyled everything. 2013-09-17 16:28:39 -04:00
irungentoo
0b7479e758 Merge pull request #583 from FullName/TestCryptoSlow
Make test "endtoend" pass on 'slow' systems
2013-09-16 17:09:59 -07:00
Coren[m]
1c57a3a3de Tests of state loading/saving lead to two fixes for DHT.c and util.c
util.c:
- fix in empty section at the end of the state, showed as bug when having an empty name

DHT.c:
- fix in saving less data than originally announced, showed as bug when not having reached any clients ever (no clients or only with timestamp of zero)
2013-09-17 01:08:57 +02:00
Coren[m]
0de40d01cb Make test "endtoend" pass on 'slow' systems
auto_test/crypto_test.c:
- test "endtoend": increased timeout from default ~5s to 15s, making it pass on slower systems
- signed/unsiged warning fixed by cast
2013-09-16 23:02:38 +02:00
Coren[m]
ee1cc34d55 Fix in ip_equal, plus testing code which led to that fix...
network.c:
- use the correct macro for IPv4-in-IPv6 test

network_test.c:
- bunch of tests for addr_resolve() and ip_equal()
2013-09-15 23:39:09 +02:00
Coren[m]
513e37815d tox.h, DHT.h:
- tox_bootstrap_ex(), DHT_bootstrap_ex() renamed to tox_bootstrap_from_address(), DHT_bootstrap_from_address()
- (handle_)sendnodes_ex() renamed to (handle_)sendnodes_ipv6()
- only sending sendnodes_ipv6() if we're actually IPv6 enabled
- changed comments to conform better

nTox.c, Messenger_text.c, DHT_test.c, DHT_bootstrap.c:
- fallout from *_ex() to *_from_address()

DHT_bootstrap.c:
- corrected a potentially wrong info message

util.c:
- fixed logfile name: now (funcptr) => now() (number)

network.c:
- addead comment about the necessity of bind() to succeed

auto_test/messenger_test.c:
- defaulting ipv6enabled to TOX_ENABLE_IPV6_DEFAULT

LAN_discovery.c:
- slight cleanup and comments for clarity
2013-09-11 20:50:15 +02:00
Coren[m]
0139f2838f Merge remote-tracking branch 'upstream/master' into Integration 2013-09-11 00:16:15 +02:00
irungentoo
55499933be Fixed building with NaCl. 2013-09-10 17:15:26 -04:00
Coren[m]
05d7b157c6 tox.*, Messenger.*:
- initialisation: argument added to enable/disable ipv6 as socket

Messenger_test.c:
- initialisation: ipv4 hardcoded for now
- delegating IP resolution to DHT_bootstrap_ex()
2013-09-09 21:03:31 +02:00
Maxim Biro
f7e14e5c6f Modified test 2013-09-07 16:05:48 -04:00
Jin^eLD
e092eee869 Allow to build vs nacl instead of libsodium
By default libsodium is used. Only if --enable-nacl is specified, then
nacl will be used instead of libsodium.

Pass locations of nacl headers and libraries by using the following
options:

--with-nacl-headers=/home/me/somewhere/nacl-20110221/build/469/include/amd64/
--with-nacl-libs=/home/me/somewhere/nacl-20110221/build/469/lib/amd64/
2013-09-06 22:54:45 +03:00
irungentoo
64570a1b12 Fixed autotest, increased MAX_STATUSMESSAGE_LENGTH. 2013-09-06 09:56:56 -04:00
jin-eld
7d29bd23b9 Forward compatibility with automake 1.14
This update makes sure that the build still works with automake prior to
1.12 and at the same time does not give any warnings or errors with
automake 1.14
2013-09-01 20:39:02 +03:00
irungentoo
871a64197b Properly fixed test. 2013-08-31 12:49:22 -04:00
irungentoo
0181fd95ae Fixed test. 2013-08-31 12:28:15 -04:00
JamoBox
7fa17f9ab4 consistency check
fixed grammar to maintain consistency of output
2013-08-24 23:21:48 +01:00
jin-eld
1ec70337cf Remove cmake build system 2013-08-24 03:36:43 +03:00
jin-eld
50c8a820e5 Implemented autotools based build scripts
supported options:

--with-dependency-search=DIR    will tell configure to look for various
dependencies in DIR/include and DIR/lib

Alternatively you can also specify libsodium header and libs location
with --with-libsodium-headers and --with-libsodium-libs if it is
installed elsewhere.

Ncurses and libconfig are handled via the default pkg-config way, see
./configure --help=short for detailed information.

The tox library is compiled as libtoxcore in shared and static variants,
public headers are installed to ${prefix}/include/tox

A pkg-config libtoxcore.pc configuration file is provided.

Use ./configure --help for a full list of configure options or
./configure --help=short for the options that I added.

To generate the configure script after pulling from git use:
autoreconf -i

To generate a release tarball use:
make dist

Unit tests are handled by the libcheck library integration that is provided
by autotools, use:
make check

to compile and run the tests.

Unit tests are currently optional, i.e. - if the check library is not
found on the system, then tests will be disabled. Same goes for nTox and
DHT bootstrap daemon - they will be enabled or disabled depending on the
availability of ncurses (for nTox) or libconfig (for DHT bootstrap
daemon).

The above can be also tuned by:
--enable-tests / --disable-tests
--enable-ntox / --disable-ntox
--enable-dht-bootstrap-daemon / --disable-dht-bootstrap-daemon
2013-08-24 03:25:07 +03:00
jin-eld
e658892793 Rename core directory because of autoconf name clash
While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.

There's no workaround but to rename the core directory.
2013-08-24 03:25:07 +03:00
Simon Levermann
7c3447466f Fix friends test 2013-08-20 23:10:51 +02:00
irungentoo
3707833f0b Merge pull request #502 from stqism/issue-470-fix
Fixed issue #470, crypto_test still forcing libsodium when NaCL is chosen
2013-08-20 04:39:12 -07:00
Sean Qureshi
3cd582aeb3 Fixed issue 470, crypto_test still forcing libsodium when NaCL is chosen 2013-08-20 02:29:17 -07:00
Sean Qureshi
1986e6b7f4 Ran it through astyle 2013-08-18 01:48:36 -07:00
Florian Hahn
2e90691f4c Add test for getname 2013-08-17 23:23:54 +02:00
Florian Hahn
5c0c182ee1 Remove unused script for running tests
"make test" should be used to run the tests
2013-08-17 23:03:26 +02:00
Florian Hahn
a385c79cfe Use ck_assert_msg 2013-08-17 23:02:36 +02:00
irungentoo
88ff81d9de Passed everything through astyle. 2013-08-16 13:11:09 -04:00
slvr
a854a730ec Reduced redundant code, added new crypto test 2013-08-14 14:46:29 +01:00
irungentoo
a8d1f86f8b ... 2013-08-13 20:37:09 -04:00
irungentoo
c8a46e1c09 ... 2013-08-13 20:32:45 -04:00
irungentoo
7d588ef8bd Fuck. 2013-08-13 20:31:41 -04:00
irungentoo
3c35db104a Commented out old tests that are broken with current master. 2013-08-13 20:22:44 -04:00
irungentoo
e7d002fbc0 Hackish fix for the tests. 2013-08-13 20:02:07 -04:00
irungentoo
63efa44dfa Attempt to quickly fix a test. 2013-08-13 19:36:02 -04:00
Andreas Schneider
6b06431e9b core: Fix a possible buffer overflow using getself_name().
If the passed buffer is smaller than MAX_NAME_LENGTH then, you
will probably overflow it.
2013-08-13 09:50:51 +02:00
alek900
8d3e68b74d Added support for userdata in callbacks 2013-08-12 14:23:46 +02:00
Chris Hall
4293c4b1e6 Messenger refactor - redid work from pull request 79
Moves static state out of Messenger.c and into a Messenger struct
Purely stylistic, no functional changes were made.

This commit also changed all the callers of Messenger as they now have
to pass an instance of the Messenger struct to messenger functions.

Also removed some uses of the 'static' keyword at the beginning of
function definitions when the function was already declared static, as
these caused gcc to whine.
2013-08-12 21:37:38 +12:00
slvr
021852d494 Implemented encrypt_data_fast, decrypt_data_fast and crypto tests 2013-08-10 17:41:32 +01:00
slvr
91d8344cca Macports support (OS X only). MAP_ANON -> MAP_ANONYMOUS (OS X only). 2013-08-09 16:51:54 +01:00
Christian Brueffer
0b8fa72914 Fix a recurring typo in code and comments. 2013-08-09 14:01:35 +02:00
Florian Hahn
c171aad7c9 Disable failing test assertion 2013-08-08 13:04:15 +02:00
Florian Hahn
dff2493f2d Use ctest to run unit tests 2013-08-08 13:03:20 +02:00
Maxim Biro
338da1fde7 Fixed auto tests 2013-08-07 20:37:34 -04:00
charmlesscoin
8649f86b10 removed script changes so _this_ build will pass 2013-08-07 18:30:16 -04:00
charmlesscoin
e47790ce31 Fixed the -lCheck issue 2013-08-07 17:16:02 -04:00
charmlesscoin
d70b56c10b Travis failed on wget, dummy commit... 2013-08-07 16:41:17 -04:00
charmlesscoin
64b05c0960 Cleanup test and work on .travis file 2013-08-07 04:04:16 -04:00
charmlesscoin
4b34ecf913 added files for unit tests 2013-08-07 00:18:27 -04:00