Arvid Norberg
f16d0b7953
add unit test for 'file_sizes' entry in resume data ( #1248 )
...
add unit test for 'file_sizes' entry in resume data. fix resume data bug in client_test for magnet links and minor resume data cleanup in default_storage
2016-10-23 22:01:09 -04:00
Arvid Norberg
c966435d1c
fix issue where shutting down the session immediately and asynchronously starting the DHT would cause a shutdown hang ( #1203 )
2016-10-10 22:54:19 -04:00
Arvid Norberg
6bb2d7c017
Sanitize 1.1 ( #1197 )
...
enable address sanitizer
2016-10-09 17:00:20 -04:00
Arvid Norberg
5f7e2eb928
run undefined sanitier on travis/linux ( #1134 )
...
run undefined sanitizer on travis/linux. back-port ed25519 unit test from master
2016-10-08 12:29:46 -04:00
Arvid Norberg
7a52a285a1
back-port error_code cleanup from master ( #1173 )
...
back-port error_code cleanup from master
2016-10-03 16:32:40 -07:00
Steven Siloti
2e0140b6f6
fix peer picking algorithm ( #1141 )
...
fix peer picking algorithm. The old code was always picking the first to_pick peers from the set.
2016-09-24 06:08:52 -07:00
Arvid Norberg
acf77a5385
fix tail-padding for last file in create_torrent ( #1106 )
2016-09-18 20:08:27 -04:00
Arvid Norberg
debf3c6e36
update puff.c for gzip inflation ( #1022 )
...
update puff.c for gzip inflation
2016-08-21 14:43:44 -04:00
Arvid Norberg
80e5ce9b32
add a default DHT bootstrap node when it's enabled on session startup ( #1008 )
...
make the dht bootstrap nodes part of settings_pack instead, to make it possible to set them on startup. and add default
2016-08-21 12:15:19 -04:00
Arvid Norberg
daa453ef3b
back-port windows stack trace function to 1.1 ( #1017 )
...
back port exception handling and stack trace printing from master -> RC_1_1
2016-08-21 01:07:02 -04:00
Arvid Norberg
8007b947fd
make pad-file and symlink support conform to BEP47 ( #992 )
...
make pad-file and symlink support conform to BEP47
2016-08-07 22:37:10 -04:00
Arvid Norberg
69f82c5274
add support for entry::preformatted to python binding ( #952 )
2016-07-27 00:15:26 -04:00
terry zhao
48ca20968e
fix value of current_tracker when all tracker failed ( #932 )
...
fix torrent_status::current_tracker when all trackers fail.
2016-07-26 01:13:28 -04:00
Arvid Norberg
6777ec5d05
back-ported dbghlp fix ( #946 )
...
back-ported dbghlp fix
2016-07-26 01:05:32 -04:00
Arvid Norberg
80fba1f748
fix crash in session::get_ip_filter when not having set one ( #914 )
2016-07-17 14:23:54 -07:00
Arvid Norberg
eeb91cb803
Reduce appveyor builds 1.1 ( #883 )
...
reduce the number of times libtorrent is built on appveyor and travis
2016-07-05 11:25:31 -04:00
Arvid Norberg
97ad7510af
minor refactoring to move-storage patch ( #680 )
...
minor refactoring to move-storage patch
2016-06-29 20:05:28 +03:00
Vladimir Golovnev
faef995cdc
Move storage "file-by-file" ( #632 )
...
When moving storage for a torrent, only move files belonging to the torrent, one by one.
2016-06-29 20:05:16 +03:00
Arvid Norberg
6917a11c6b
correct error introduced in add_torrent_impl refactor, with regards t… ( #846 )
...
correct error introduced in add_torrent_impl refactor, with regards to not having flag_duplicate_is_error set (which is not set by default)
2016-06-23 13:19:35 -04:00
Arvid Norberg
4e0a4db9b4
fixed inverted priority of incoming piece suggestions ( #809 )
2016-06-12 20:36:05 -04:00
Arvid Norberg
5ecd00c5c5
fix osx build ( #804 )
...
fix osx build with asserts enabled
2016-06-11 00:48:13 -04:00
Arvid Norberg
5eaf713d1f
revert handshake round-trip optimization ( #797 )
...
revert handshake round-trip optimization. it prevents taking advantage of FAST extensions since the bitfield is sent before receiving the other peer's handshake
2016-06-07 21:45:48 -04:00
Arvid Norberg
3624ce6cfd
fixed crash on invalid input in http_parser ( #782 )
...
fixed crash on invalid input to http_parser
2016-06-04 09:53:23 -04:00
Arvid Norberg
b3bbb2f0f6
upgrade libtommath to 1.0 ( #765 )
...
upgrade libtommath to 1.0
2016-05-28 17:12:26 -04:00
Alden Torres
f8dcf30b2e
Ported support for magnet x.pe parameter from master ( #760 )
2016-05-27 12:12:32 -04:00
Alden Torres
10393697cb
Fix of parse_endpoint with invalid port character separator ( #757 )
2016-05-27 12:00:54 -04:00
Arvid Norberg
d0a870b3dd
produce valid bencoded strings for undefined/uninitialized entry objects ( #756 )
2016-05-26 03:33:05 -04:00
Arvid Norberg
3106f6f8a5
restore debug-iterators to be enabled by default when building the tests ( #751 )
...
restore debug-iterators to be enabled by default when building the tests
2016-05-23 00:36:24 -04:00
Arvid Norberg
62fb7209ef
fix invariant check issue with a paused session ( #750 )
...
fix invariant check issue with a paused session
2016-05-22 22:58:11 -04:00
Arvid Norberg
b5fc367d17
fix incorrect comparison function when deciding which peer to disconnect ( #746 )
...
fix incorrect comparison function when deciding which peer to disconnect
2016-05-22 13:46:37 -04:00
arvidn
3988a443ff
add test of paused session
2016-05-22 02:20:49 -04:00
arvidn
8fac4e7d5c
fix test build configuration
2016-05-18 01:52:39 -04:00
arvidn
c292696dcb
back-port fix adding empty file as torrent
2016-05-14 13:13:20 -04:00
Arvid Norberg
985436636e
added new preformatted type to bencode entry ( #698 )
...
added new preformatted type to bencode entry to support carrying a verbatim copy of an already bencoded subtree. This is to support saving torrents in resume data and create_torrent based on existing torrents, in order to preserve key order
2016-05-05 21:38:57 -04:00
Arvid Norberg
f9bc6dbc54
improvements to socks5 support (for 1.1.1 release) ( #567 )
...
capture listen IP and port from socks5 BIND response. add tests for socks5 and improve support for capturing the local endpoint (i.e. bind port) for BIND command socket connections. post listen_succeeded_alert when successfully bound to listen socket on SOCKS5 proxy. make sure to announce the socks5 listen port
2016-05-05 17:09:11 -04:00
Arvid Norberg
95e348bef7
fix name clash with 'thread' on freebsd ( #664 )
2016-04-29 12:00:39 -04:00
Arvid Norberg
d93bf9096d
attempt to fix race condition in udp_tracker in test framework ( #660 )
2016-04-28 23:13:49 -04:00
Alden Torres
d08bbbc0cc
Added asserts related to total_size in create_torrent ( #642 )
2016-04-26 00:37:47 -04:00
Alden Torres
6171c911a0
Added assert for total_size in create_torrent ( #636 )
2016-04-22 13:51:06 -04:00
Arvid Norberg
2bd8622f4b
fix missing EXPORT annotation of functions in the test utility library ( #631 )
2016-04-20 07:51:25 -04:00
arvidn
2921caf95e
fix msvc test build. make test framework robust to tmpfile() failing. add missing files and tests to makefile
2016-04-10 20:46:51 -04:00
arvidn
5ebb7d203b
Makefile fix
2016-04-10 15:10:29 -04:00
arvidn
08edf43b3f
fix to documentation generation to exclude private functions. fix makefile errors
2016-04-09 00:33:26 -04:00
arvidn
6bc5de5903
fail correctly when move_storage is called to move into its own directory
2016-04-02 10:03:31 -04:00
Arvid Norberg
a5af3b0dc5
Merge pull request #563 from arvidn/no-compact-1.1
...
remove remaining references to storage_mode_compact
2016-03-20 23:20:19 -04:00
Arvid Norberg
ee2d7a039d
Merge pull request #562 from arvidn/coalesce-reads-1.1
...
make coalesce reads and coalesce writes actually work
2016-03-20 20:25:51 -04:00
arvidn
f5c112eefc
remove remaining references to storage_mode_compact (since it's been deprecated for quite a while now, and no longer implemented)
2016-03-20 18:25:24 -04:00
arvidn
2dd28c1708
just use malloc/free in test_storage (instead of page_aligned_allocator). file no longer requires alignment
2016-03-20 17:00:49 -04:00
arvidn
0095aa084f
make coalesce reads and coalesce writes actually work
2016-03-20 16:34:19 -04:00
arvidn
f7c9062019
deprecate more parts of explicit cache as well as fixing typos of TORRENT_NO_DEPRECATE preprocessor tests
2016-03-19 07:54:29 -04:00
Arvid Norberg
50f7c88cee
Merge pull request #554 from arvidn/tracker-next-test-1.1
...
convert tracker try-next test to be a simulation (and deterministic)
2016-03-18 19:49:18 -04:00
arvidn
d3df16cd12
convert tracker try-next test to be a simulation (and deterministic)
2016-03-18 14:38:45 -04:00
arvidn
3c98868f6c
deprecate explicit cache feature
2016-03-18 12:15:03 -04:00
Arvid Norberg
82d177472e
Merge pull request #541 from arvidn/fix-test-transfer-1.1
...
improve message from listen_failed_alert
2016-03-14 21:43:34 -04:00
arvidn
921cbeebed
add option to delete just the partfile when removing a torrent
2016-03-14 08:26:39 -04:00
arvidn
fb85e5e60f
improve message from listen_failed_alert. Post listen_failed_alert for every failure, including the ones that are re-tried
2016-03-13 16:18:44 -04:00
arvidn
f5d5ac4f3a
fix bug where disk cache was wiped out after completion file-checking. factor out sim test utilities and reuse them in the regression test
2016-03-06 21:44:38 -05:00
arvidn
442979c318
support filtering which parts of session state are loaded by load_state()
2016-03-06 16:35:49 -05:00
arvidn
26f88bb12d
add receive_buffer unit test and some more cleanup and asserts
2016-03-05 00:14:00 -05:00
arvidn
84eafac1e2
add more slack to test_recheck, as it has been failing on and off on travis
2016-03-02 21:38:20 -05:00
arvidn
8ffa76842c
fix test_upnp build
2016-02-28 01:18:27 -05:00
arvidn
e5ccb63375
fix build with openssl and deprecated functions disabled
2016-02-24 02:07:27 -05:00
arvidn
dcd6af6473
more fixing of test_transfer proxy tests
2016-02-24 00:03:56 -05:00
arvidn
d748a59029
attempt to fix test_transfer
2016-02-23 19:13:14 -05:00
arvidn
ceb0ac6148
fix issue in socket binding and back-port ssl test reliability fix
2016-02-10 02:09:12 -05:00
arvidn
d91054b8f1
forward port fix to ip_voter from RC_1_0
2016-02-09 19:09:53 -05:00
arvidn
dd48faa8d4
minor debug logging issue in test facility wait-for-alert and fix minor shutdown issue with udp_socket packet subscription
2016-02-08 02:05:00 -05:00
Steven Siloti
ad9d50c6b8
add make_torrent to Makefile.am
2016-02-06 19:46:19 -08:00
arvidn
88b7e3768f
add sim test for optimistic unchoke round-robin distribution
2016-02-01 20:28:30 -05:00
arvidn
efe32c6a0e
rewrite most of web_peer_connection::on_receive to make it a lot simpler and fix edge cases with pad-files
2016-01-28 01:58:33 -05:00
arvidn
0cb35d714c
fix test in test_storage
2016-01-20 19:38:18 -05:00
arvidn
4cbbb0620e
only strip trailing dots and spaces from filenames on windows
2016-01-18 13:07:04 -05:00
arvidn
13f03ce38a
print the actual stats in session_stats_alert::message() and make parse_session_stats.py parse the alert output. add stats_metric objects for all performance counters
2016-01-12 23:34:37 -05:00
Steven Siloti
ab7ef98b01
ensure all immutable items are stored at least once
...
If num_peers is set to 1 then the item will never be stored. Bump the
minimum value to 2 so that announce_immutable_items stores all items
at least once.
2016-01-12 19:32:02 -08:00
arvidn
651b473908
add unit test for routing_table::update_node_id
2016-01-11 23:47:27 -05:00
Alden Torres
0f442f59f3
Avoid pass IPv6 address to current implementation of DHT while adding a node
2016-01-09 18:46:19 -05:00
Luca Bruno
15ef71303a
autotools: fix `make check` running
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:28:05 +01:00
Luca Bruno
6feab20733
test: fix enum_if compilation
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:27:39 +01:00
Luca Bruno
73c950b99b
test: fix test_lsd compilation
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:25:49 +01:00
arvidn
66c14e968b
disable disk-full test, because it's flaky
2016-01-03 13:30:32 -05:00
arvidn
07ddb010c5
split buckets when exceeding the next bucket's size, to make sure we split before risking discarding nodes because the next bucket is smaller
2016-01-02 00:45:44 -05:00
arvidn
01e6b93854
simplify and improve unit test for distance_exp. make some immutable variables const in the DHT implementation. instead of waking up periodically just to check if it's time to refresh the DHT secret key, set the timer to only wake up to refresh the key. If we don't have a DHT observer (to ask for our external IP) or if we don't know our external IP, don't generate a node ID based on 0.0.0.0, just generate a random ID instead. Simplified and improved node replacement logic in the routing table a little bit
2016-01-01 16:42:37 -05:00
Arvid Norberg
ffb78f0378
Merge pull request #312 from ssiloti/export-verify-message
...
export verify_message and incoming_error
2015-12-30 22:51:38 -05:00
Steven Siloti
ac01ccc43a
add templated wrapper around verify_message
...
It was too easy to forget to update the ret and size parameters
when the size of desec changed. With this change we now automatically
get the size of desc and enforce that ret has the same size.
It would be nice if we could use bdecode_node ret[static Size] from C99
but that is not widely supported.
2015-12-29 20:35:36 -08:00
arvidn
197ca4e06d
transition http proxy test for http_connection to the sim
2015-12-22 00:45:16 -05:00
Arvid Norberg
03e90d45d8
Merge pull request #339 from arvidn/dht-storage-test
...
extend the unit test of dht_storage
2015-12-20 02:02:56 -05:00
arvidn
3460f203f3
extend testing of sanitize_append_path_element
2015-12-19 20:11:22 -05:00
arvidn
d7b435ec25
speed up test
2015-12-19 14:59:37 -05:00
arvidn
15ec839d33
extend the unit test of dht_storage
2015-12-19 02:09:06 -05:00
arvidn
121b686a39
add set_web_seeds to torrent_info
2015-12-12 18:36:15 -05:00
Arvid Norberg
550b0bb047
Merge pull request #313 from arvidn/setup-swarm-cleanup
...
clean up setup-swarm simulation utility to be more flexible
2015-12-12 14:07:26 -05:00
arvidn
d505f93d7a
port sim tests to use the new setup_swarm API
2015-12-12 00:41:47 -05:00
arvidn
54bf83739d
fix assert in bdecode assert for strings with prefixes of 6 or more digits
2015-12-12 00:19:13 -05:00
arvidn
8732863a9a
another fix to receiving malformed DHT error message
2015-12-03 01:08:27 -05:00
arvidn
550d75dab9
fix warning
2015-11-30 22:59:34 -05:00
arvidn
eb8add0e57
fix missing include
2015-11-30 22:26:10 -05:00
arvidn
12dde0f415
actually add a test to the unit test
2015-11-30 19:07:35 -05:00
arvidn
7540a6e5cc
correctly check incoming DHT error messages
2015-11-30 18:02:00 -05:00
arvidn
fd3b53604c
add new piece picker logging alert category
2015-11-29 08:25:55 -05:00
arvidn
a8e31fd8ca
add first coverage of test_transfer as a proper sim
2015-11-28 00:59:39 -05:00
arvidn
06b648203f
clean up use of error categories
2015-11-24 00:50:51 -05:00
arvidn
eed17f0bc1
remove the cases from non-sim test that are covered by the new http_connection sim test
2015-11-24 00:39:02 -05:00
arvidn
e3dad98fbe
fix an old use of posix_category. make http_connection translate IPs into proper endpoints when connecting over socks (instead of passing the IP on as a hostname string). add test coverage
2015-11-24 00:39:02 -05:00
arvidn
174e0aeb46
fix semantics of socks5_stream and http_connection to make them not close themselves. Add socks5 and socks4 proxy coverage in test_http_connection
2015-11-24 00:39:01 -05:00
Thomas Yuan
c005c937fd
Merge almost same functions.
2015-11-22 22:02:37 -05:00
Steven Siloti
1f13343a70
const correctness
2015-11-22 10:02:26 -08:00
Thomas Yuan
ab70ad3e05
fix comments and unit test
2015-11-20 00:06:08 -05:00
Thomas Yuan
194ad410dc
Make dht_put_alert more accurate.
2015-11-20 00:06:08 -05:00
arvidn
07574117ad
add test for readwritev and experiment with SEH handler in test
2015-11-19 17:58:56 -05:00
arvidn
964031c070
factor out readwritev to a free function, to allow unit testing of it
2015-11-19 17:58:55 -05:00
Steven Siloti
08632aa5f7
add unit test to check for multiple calls to done()
2015-11-09 20:47:33 -08:00
arvidn
0c435b42b2
add some more slack to one of the unit tests
2015-11-08 16:26:58 -05:00
arvidn
a138b2daa9
handle receiving an invalid request
2015-11-07 14:58:08 -05:00
arvidn
00090b8284
fix typo in test_checking, introduced by recent error_code in torrent_status patch
2015-11-07 01:01:07 -05:00
arvidn
ebb9fdaf54
add error_code to torrent_status instead of error string
2015-11-05 20:43:23 -05:00
arvidn
ee714306be
forward port IPv6 IP address resolution in URLs fix
2015-11-01 17:26:45 -05:00
arvidn
475fd61b4b
update ssl certificate for tests
2015-10-25 10:29:42 -04:00
arvidn
ee395bd772
attempt to update SSL certificate for unit test
2015-10-18 01:21:03 -04:00
arvidn
08e2bf7835
mark up some more functions with override and silence a few more warnings in boost headers
2015-10-17 10:02:37 -04:00
arvidn
2b9cd9bfde
fix build
2015-10-03 12:27:01 -04:00
arvidn
c798e388a9
forward port fix to proxy_peer_connections to master
2015-10-03 11:20:10 -04:00
Arvid Norberg
b785e789b6
Merge pull request #199 from arvidn/parse-magnet-fix
...
fix bug in parse_magnet_uri and improve unit test
2015-10-03 02:09:34 -04:00
arvidn
c1955ecb18
fix bug in parse_magnet_uri and improve unit test
2015-10-02 23:24:17 -04:00
Alden Torres
62b24d8b67
Add set_dht_storage to session API.
2015-10-02 09:00:07 -04:00
arvidn
a00e5aa6c7
forward port patch to have resume data web seeds override .torrent file web seeds, and a flag to merge them
2015-09-30 00:41:41 -04:00
arvidn
5da511f140
now that force-started torrents aren't affected by the auto-manager, they need to be explicitly kicked when entering checking state (it would be nice if all this could be done through set_state())
2015-09-29 20:49:38 -04:00
Steven Siloti
aa94f26b26
test_dht: use named parameter pattern for passing message arguments
...
The number of optional parameters for send_dht_request was already beyond
ridiculous and the addition of the 'want' argument pushed me over the top.
2015-09-27 19:16:24 -07:00
Alden Torres
197a443465
Fix of dht_storage_counters::peers counter.
2015-09-24 10:50:04 -04:00
Alden Torres
25ed70b977
Create dht_storage_counters to avoid internal counter in future public API.
2015-09-21 07:46:23 -04:00
arvidn
b628692223
separate out announce_entry and torrent_status into their own headers
2015-09-18 08:08:08 -04:00
Alden Torres
e2d682275a
Implementing and using new dht storage interface
2015-09-16 08:30:27 -04:00
arvidn
bdb2801c10
fix typos in appveyor.yml. attempt to cut down build times
2015-09-11 23:13:27 -04:00
Arvid Norberg
4b36900e8b
Merge pull request #148 from thomas-yuan/invalid_node_id_test
...
Add unit test for invalid node-id. (shouldn't be added to routing table)
2015-09-10 00:12:13 -04:00
arvidn
9f4cfb6ac3
split up test_tracker unit tests
2015-09-09 23:54:43 -04:00
Thomas Yuan
cfee70b350
unit test: a node with invalid node-id shouldn't be added to routing table.
2015-09-09 15:36:07 -04:00
Thomas Yuan
94a2c3131f
Add unit test for DHT read_only nodes.
2015-09-08 11:03:27 -04:00
arvidn
7437171f9a
disable test_ssl on travis osx
2015-09-06 22:55:41 -04:00
arvidn
68abd7a44d
move out test_alert_manager from the main test (as it actually sleeps). also add some debug logging to it
2015-09-06 22:55:41 -04:00
arvidn
17c5759829
disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings
2015-09-06 22:55:41 -04:00
arvidn
cb65694578
fix const correctness in xml_parse(). update unit tests rss and upnp to use new signature for parser callback
2015-09-06 00:38:33 -04:00
arvidn
43ee75ce02
only post listen_succeeded_alert once all sockets have succeeded, since we may re-open previously successful ones if a later one fails
2015-09-05 22:14:04 -04:00
Arvid Norberg
281c215998
Merge pull request #119 from arvidn/hard_links
...
add simple unit test for creating hard links
2015-08-31 07:31:23 -04:00
arvidn
c1f9d6edc3
fix typo
2015-08-31 00:19:58 -04:00
arvidn
b4381aa646
add unit test for linked_list
2015-08-30 23:34:49 -04:00
arvidn
b0a395aa61
remove unused includes from test
2015-08-30 21:51:32 -04:00
arvidn
0e3e3ea793
add simple unit test for creating hard links
2015-08-30 20:14:55 -04:00
arvidn
e3591c3a1c
attempt to log more and potentially fix wait_for_downloading in unit tests
2015-08-30 08:52:58 -04:00
arvidn
8830d61cca
exclude test_utp to be run on appveyor
2015-08-30 08:52:58 -04:00
arvidn
434be2bd83
add more logging around the test failure
2015-08-30 08:52:58 -04:00
arvidn
1142903d90
add unit test for new tracker proxy option
2015-08-30 01:50:33 -04:00