Commit Graph

2163 Commits

Author SHA1 Message Date
Arvid Norberg 8abd878ed4 fix creating directory in test_utp 2019-11-19 01:46:39 +01:00
Arvid Norberg fbb7c1e2e3 fix test_receive_buffer. print errors in test_utp.cpp 2019-11-19 01:46:39 +01:00
Arvid Norberg 54edd434f4 wait until python gets running to open its socket 2019-11-19 01:46:39 +01:00
Arvid Norberg 76f53297a9 update appveyor image and boost version. explicitly use python2 for test scripts (as the SSL behavior has changed in python 3 in non-trivial ways) 2019-11-19 01:46:39 +01:00
arvidn 818cc1c495 set terminate handler in test framework to print stacktrace if called by test. Install signal handler on windows 2019-11-03 05:56:44 -08:00
arvidn 271bc55694 update SSL test certificates 2019-11-03 05:56:22 -08:00
arvidn c8f3063f25 fix SSL test 2019-10-15 10:22:19 +02:00
arvidn 9c970550e3 fix clang warning on empty statements by fixing the test macros 2019-09-24 01:28:43 +02:00
Arvid Norberg 08b6a112c0 fix the asserts=on and invariant-checks=on default build. Right now you can't change them in debug builds. Just make those defaults when building tests and examples. Also enable debug-iterators by default in tests and examples 2019-09-16 00:21:53 -06:00
Arvid Norberg 2f5fd13a59 put default build configuration for tests in a variable, to avoid repetition. Make all tests built as individual executables again 2019-09-15 15:48:31 -06:00
arvidn beea1eb731 fix over-eager TORRENT_ABI_VERSION check in test_bencoding 2019-09-15 05:53:49 +02:00
arvidn d08fa164d2 fix issue where pieces would be hashed despite disable_hash_checks was set 2019-09-13 22:38:18 +02:00
arvidn 9b1607a63c fix updating of is_finished torrent status, when changing piece priorities 2019-09-07 10:45:25 +02:00
arvidn a3440e54bb make aux::session_settings thread-safe. this allows all threads to share the same settings object, which has low contention and is rarely updated 2019-09-01 03:41:36 +02:00
arvidn b2c3b4dbf8 add spaces around user defined literal suffix operators 2019-08-21 14:23:46 +02:00
arvidn 07ab3b9739 add feature to create an affinity to pick adjecent pieces aligned to 4MiB extents. It's an attempt to improve disk I/O, by writing larger contiguous ranges of bytes. It's off by default. 2019-08-17 12:32:47 +02:00
arvidn ffd4b39b09 improve hack in file_storage::symlink 2019-08-13 21:30:23 +02:00
Arvid Norberg ff113a262c make it a bit more likely to split the last bucket in the DHT routing table 2019-08-12 15:08:49 -07:00
Arvid Norberg f40ecac4dd improve testing on appveyor. revert appveyor image 2019-08-06 21:55:47 -07:00
Arvid Norberg f23f96ea1f fix win32 test stdout redirection 2019-08-06 21:55:47 -07:00
Arvid Norberg bd0d011536 make test_dht deterministic 2019-07-31 19:04:29 -07:00
Arvid Norberg e539846266 fix integer overflow in chunked http parser 2019-07-30 11:16:05 -07:00
arvidn b1b03a0d77 factor out and unit test parts of the DHT routing table logic that handles the affinity of nodes to insert. Specifically, make sure the even distribution within routing table buckets works correctly 2019-07-30 07:56:18 -07:00
arvidn 8e23f9cc92 improve file_storage::sanitize_symlinks 2019-07-29 06:10:04 -07:00
arvidn 3995ffeafd similar to how low RTT DHT nodes are preferred over high RTT nodes, also have an affinity for nodes with node IDs derived from their IP 2019-07-28 16:13:16 -07:00
arvidn 7a20850632 feature to disable DHT, PEX and LSD per torrent 2019-07-20 10:20:41 -07:00
Arvid Norberg d113816ae6 fix issue where trackers from magnet links were not included in create_torrent() 2019-07-04 12:53:36 +02:00
Steven Siloti aec5c50282 Track the mapped port for each NAT mapping transport (#3793)
* Track the mapped port for each NAT mapping transport
Each transport needs to be tracked separately so that a failed mapping request
doesn't cause the listen port for a socket to be cleared to zero.
* add template specialization to allow enums as indexes
* use aux::array for port mappings
2019-04-22 01:50:44 +02:00
Arvid Norberg 76c2794923
fix build with boost-1.70 (#3788)
fix build with boost 1.70.0 Fix #3683
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-19 20:56:19 +02:00
arvidn a845afe6d9 fix warnings 2019-04-10 08:05:36 +02:00
arvidn 4441655bab optimize resolve_duplicate_filenames_slow() 2019-04-09 01:59:34 +02:00
arvidn 8508506f16 don't run the SHA-1 and SHA-512 test vector tests by default, as they are slow 2019-04-02 20:03:34 +02:00
arvidn 1b79ce86e1 don't count connections and disconnections to ourself as sign of failure in tests 2019-03-30 10:08:38 +01:00
arvidn 51f77cc0a1 fix printing priorities in test_priority.cpp 2019-03-29 13:14:46 +01:00
arvidn 95937b28a7 add missing test torrent to tarball 2019-03-28 20:25:11 +01:00
arvidn 5260128933 minor improvement to test_tracker. fix test output redirection on windows. tweak starting of web server in tests 2019-03-28 00:22:05 +01:00
arvidn 64600f444b improve sanitizer rule in Jamfile. Some fixes for new clang sanitizr 'implicit-conversion' 2019-03-26 10:14:06 +01:00
arvidn 2990532d10 reduce the amount of hacky path/string handling code 2019-03-22 07:48:07 +01:00
Arvid Norberg 57cd2882d4 update symlinks to conform to BEP 47 2019-03-19 10:05:06 +01:00
arvidn 5f85e40193 remove old, hacky and unused split_string() function 2019-03-19 09:27:06 +01:00
Alden Torres 620eb39f2c missing changes 2019-03-11 14:38:26 +01:00
arvidn 381d5a3c5d add support for creating symlinks, for torrents with symlinks in them 2019-03-05 22:53:56 +01:00
Arvid Norberg e106602f49 allow padfiles of equal size to share the same filename 2019-03-01 16:09:53 +01:00
Arvid Norberg ed867e0062 improve test_torrent_info to make it easier to add more test cases for duplicate files 2019-03-01 16:09:53 +01:00
Arvid Norberg 57017e3ace noreturn attribute is standard in C++11 2019-02-27 17:11:15 +01:00
arvidn 4473a8d0ce fix seed_mode flag 2019-02-24 10:20:20 +01:00
arvidn 3891f77253 fix naming in test_dht. don't include deprecated header (lazy_entry) unless required 2019-02-21 23:05:42 +01:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
arvidn 1b7884b220 support numeric suffixes to magnet link parameter names 2019-02-15 23:15:38 +01:00
arvidn 8fc69f5d2e don't copy a vector into the async_write operation for iovec. Since the chained_buffer will own the vector anyway, just make it return a span and copy that 2019-02-09 17:45:47 +01:00
Alden Torres 88d018bb67 simple test for file_progress::update 2019-01-13 02:40:15 +01:00
arvidn f4f1425115 use UNC paths pervasively on windows 2019-01-12 21:00:40 +01:00
arvidn 8b067310b1 merged RC_1_1 into master 2019-01-12 00:53:45 +01:00
arvidn a112c8e67b add assignment operator to span 2018-12-12 19:55:07 +01:00
arvidn 6debd872de tweak heuristic of how to interpret url seeds in multi-file torrents 2018-12-11 12:47:43 +01:00
arvidn 7e13b34158 fix build i2p=on,off configurations 2018-12-07 13:36:53 +01:00
arvidn eb5f29a79c make stack_allocator::format_string() grow the buffer for large strings 2018-12-02 04:03:03 +01:00
arvidn 50ae1838e6 wrap inclusion of windows.h with appropriate defines 2018-11-21 10:09:23 +01:00
arvidn 1f9178f882 clean up test_fast_extension to use span 2018-11-21 10:08:01 +01:00
arvidn 9ae4aedeb0 deprecate slow bdecode() function 2018-11-19 09:09:55 +01:00
arvidn 8841c58435 improve interoperability between bdecode_node and entry (for encoding). Make it possible to construct an entry from a bdecode_node. move comparison operators out of entry to support implicit conversions from bdecode_node 2018-11-18 22:54:36 +01:00
arvidn eab1055938 more warnings on appveyor 2018-11-18 11:49:45 +01:00
arvidn 7538d68086 clean up integer_to_str() function 2018-11-17 17:21:06 +01:00
arvidn 8c18baf10e check for self-assignment in bitfield operator= 2018-11-16 14:23:46 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn eda8227d80 simplify test Jamfile by making each test its own target. Make test_lsd explicit and don't run it on travis OSX, since it can't get the socket there 2018-11-15 11:46:44 +01:00
arvidn 9d26f4f96c fix asio-debugging build of dht test 2018-11-09 16:39:39 +01:00
arvidn 7bb828af6e back-port the new test SSL cert from master 2018-11-09 11:55:42 +01:00
arvidn e2f8bce539 add tests for low level I/O functions, read_* and write_*. also turn some raw for loops into range-for loops in the I/O functions 2018-11-07 14:35:30 +01:00
arvidn 1f9e74f40d merged RC_1_1 into master 2018-11-06 23:57:04 +01:00
Arvid Norberg cec300234c fix move_storage with save_path with a trailing slash 2018-11-06 23:46:18 +01:00
arvidn 6be8b395da some cleanup turning memcmp() and memcpy() into span comparisons and std::copy(). some more use of random_bytes() instead of loops. 2018-11-05 18:52:45 +01:00
arvidn a0fa0b14bb merged RC_1_1 into master 2018-11-04 19:12:22 +01:00
arvidn 014533da12 regenerate test SSL certificate 2018-11-03 01:49:10 +01:00
Arvid Norberg 939b380fda fix build against boost-1.69 2018-11-02 11:10:26 +01:00
Eugene Shalygin ba294e6594 cmake: backport changes from the master branch
This fixes generated pkg-config file and adds options to build python
bindings.
2018-10-31 00:17:36 +01:00
arvidn 3fb05d77d8 fix warnings 2018-10-20 20:56:26 +02:00
arvidn c57b3be4cc more lgtm fixes 2018-10-20 16:30:06 +02:00
arvidn fbf9f73d43 add missing test files to tarball 2018-10-12 16:01:53 +02:00
Arvid Norberg 9758d2f08f general cleanups of build files. Specifically to fix the propagation properties of _WIN32_WINNT, include missing CMake files in the tarball, and fix some risky ABI altering properties in CMake files 2018-10-12 10:06:59 +02:00
arvidn 8586023022 remove accidental files from repo 2018-10-11 11:18:54 +02:00
arvidn 0b8c550b9c remove accidental file from repo 2018-10-11 07:30:02 +02:00
arvidn 7ff692690b fix warnings in tests and examples 2018-10-10 20:49:07 +02:00
arvidn 2d99e994c3 make throwing versions of read_resume_data 2018-10-07 12:41:53 +02:00
Arvid Norberg 1a27ff7107 parse_magnet_uri simplification 2018-10-05 11:01:45 +02:00
Arvid Norberg a4267d61e7 fix overflow in sliding_average in the case of very high download rates 2018-10-03 00:53:05 +02:00
arvidn c437a24d78 renamed debug_notification to connect_notification 2018-09-28 17:28:34 -07:00
arvidn 109db58641 merge RC_1_1 into master 2018-09-25 21:33:29 -07:00
arvidn 6c4d1b9143 back-port the patch to split up the progress_notification alert_mask into three new categories, file-, piece- and block progress 2018-09-24 08:52:30 -07:00
arvidn 16249b8135 fix overflow in calc_bytes(), add more tests, fix bug in piece picker accounting of filtered pad blocks. 2018-09-09 20:17:32 -07:00
Arvid Norberg fc7b61a6f3 improve type-safety of the severity parameter to peer_connection::disconnect() 2018-09-06 16:42:04 -07:00
arvidn 78a344bd8b merged RC_1_1 into master 2018-09-05 08:25:14 -07:00
Arvid Norberg 51003d11ca add assert to storage 2018-09-04 13:44:24 +02:00
arvidn 7c837be651 make the print function for entry actually be json-like. when logging bencode entries, print it all on a single line. add test for entry print function 2018-08-27 13:56:04 +02:00
arvidn 058419a77c simplify total_have/have_want/total_want. make piece_picker track pad blocks and compute byte-progress at block granularity 2018-08-19 22:21:24 +02:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
Arvid Norberg fef1b947f3 fix issue in self-connection detection introduced with the change to generate unique peer-ids for each connection. Now, the torrent keeps track of all of our peer-ids generated for outgoing (bittorrent) connections, and we check them against incoming peers' peer-ids 2018-08-19 22:19:53 +02:00
arvidn b3dbce5790 merge RC_1_1 into master 2018-08-13 09:32:17 +02:00
arvidn 28bd7102be fix some conversion warnings by using std::abs() instead of fabs() 2018-08-09 16:11:25 +02:00
arvidn f1d2105afb remove dead code from piece picker 2018-08-08 23:41:46 +02:00