Nick Mathewson
921ac5c548
Unit tests for channel identity map code
2016-12-08 16:48:00 -05:00
Nick Mathewson
63c94954b1
Fix BUG message in channel/queue_impossible
2016-11-03 18:34:44 -04:00
Nick Mathewson
53a3b39da1
Add -Wmissing-variable-declarations, with attendant fixes
...
This is a big-ish patch, but it's very straightforward. Under this
clang warning, we're not actually allowed to have a global variable
without a previous extern declaration for it. The cases where we
violated this rule fall into three roughly equal groups:
* Stuff that should have been static.
* Stuff that was global but where the extern was local to some
other C file.
* Stuff that was only global when built for the unit tests, that
needed a conditional extern in the headers.
The first two were IMO genuine problems; the last is a wart of how
we build tests.
2016-06-11 10:11:54 -04:00
Nick Mathewson
c3adbf755b
Resolve some warnings from OSX clang.
2016-06-11 10:11:53 -04:00
Nick Mathewson
8f2d2933f9
Use -Wdouble-promotion in GCC >= 4.6
...
This warning triggers on silently promoting a float to a double. In
our code, it's just a sign that somebody used a float by mistake,
since we always prefer double.
2016-06-11 10:11:52 -04:00
Nick Mathewson
cb3f9bc2d4
Merge branch 'bug18570_027'
2016-03-21 10:20:16 -04:00
Andrea Shepard
1cdc7fddb2
Add new channel/queue_incoming unit tests; modify channel unit tests for new clarified handling of alloc/free responsibility for queued incoming cells
2016-03-21 10:14:47 -04:00
Nick Mathewson
57699de005
Update the copyright year.
2016-02-27 18:48:19 +01:00
Nick Mathewson
8ca3773f68
Fix unit tests on MSVC2013.
...
Patch from "NewEraCracker." Fixes bug16030; bugfix on 0.2.6.2-alpha.
2015-05-26 10:34:07 -04:00
cypherpunks
5246e8f992
Remove lingering mempool code
2015-02-23 11:19:31 -05:00
Nick Mathewson
f54e54b0b4
Bump copyright dates to 2015, in case someday this matters.
2015-01-02 14:27:39 -05:00
Nick Mathewson
eda5cebd6c
Add another cellintptr use; fixes 14031
2014-12-26 19:17:24 -05:00
Nick Mathewson
808e2b856b
Tweak channel unit tests so we don't see coverity complaints
...
channel_write_*_cell() can delete its argument, so coverity doesn't
like us doing pointer comparison against that argument later.
Silly.
2014-12-22 16:06:05 -05:00
Nick Mathewson
03d2df62f6
Fix a bunch of memory leaks in the unit tests. Found with valgrind
2014-12-22 12:27:26 -05:00
Nick Mathewson
13f26f41e4
Fix some coverity issues in the unit tests
2014-12-22 11:13:01 -05:00
Nick Mathewson
58df153163
Fix more 64/32 warnings in test_channel.c
2014-12-04 09:16:49 -05:00
Nick Mathewson
11b652acb3
Fix some 32-bit build issues in the tests
...
When comparing 64-bit types, you need to use tt_[ui]64_op().
Found by Jenkins
2014-11-28 10:06:10 -05:00
Andrea Shepard
2d171c1081
Update test_channel.c for recent test suite changes and --enable-mempools support
2014-09-30 23:15:41 -07:00
Andrea Shepard
462eaed43e
Limited unit test for channel_dump_statistics()
2014-09-30 23:14:24 -07:00
Andrea Shepard
5ee25cc185
Add channel/dumpstats unit test
2014-09-30 23:14:24 -07:00
Andrea Shepard
9740a07b8c
Check queueing case in channel/flushmux unit test too
2014-09-30 23:14:23 -07:00
Andrea Shepard
f12f7159a5
Add channel/flushmux unit test
2014-09-30 23:14:22 -07:00
Andrea Shepard
76fcb8cb55
Add channel/incoming unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
b5d4ef18e1
Add unknown cell queue entry type case to channel/queue_impossible unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
f7951d318a
Small channel unit test improvements
2014-09-30 23:14:01 -07:00
Andrea Shepard
3b78667d65
Unit test for unusual channel lifecycles
2014-09-30 23:14:01 -07:00
Andrea Shepard
b6d0aaec07
Check some can't-happen cases draining channel cell queues
2014-09-30 23:13:58 -07:00
Andrea Shepard
46ff91b6ec
Add scheduler_channel_has_waiting_cells_mock() and some mock counter queries
2014-09-30 23:09:15 -07:00
Andrea Shepard
bef11b7156
Expose a useful mock from test_channel.c
2014-09-30 23:09:14 -07:00
Andrea Shepard
79b8f14c25
Expose fake channel utility functions in test suite in fakechans.h, and fix a test_channel.c bug
2014-09-30 23:09:14 -07:00
Andrea Shepard
ba294ff2dc
Implement channel flush unit test
2014-09-30 23:09:00 -07:00
Andrea Shepard
37baef0687
Add channel lifecycle test
2014-09-30 23:08:16 -07:00
Andrea Shepard
e00fde1797
Implement two-channel queue estimate test
2014-09-30 22:54:09 -07:00
Andrea Shepard
6e427c30af
Implement channel queue size estimate unit test
2014-09-30 22:54:09 -07:00
Andrea Shepard
6d886787e3
Unit tests for channel_get_cell_queue_entry_size() and channel_write_*() functions
2014-09-30 22:54:02 -07:00