Commit Graph

325 Commits

Author SHA1 Message Date
arvidn c76911e4c6 fix merge 2016-06-10 14:15:22 -04:00
arvidn 1946e6c58b merged RC_1_1 into master 2016-06-10 01:38:32 -04:00
Arvid Norberg 327af3a69e optimize allow-fast logic (#800)
optimize allow-fast logic
2016-06-10 01:24:37 -04:00
Alden Torres 0882d02c53 early resume data reset when fatal_disk_error (#798) 2016-06-10 01:09:49 -04:00
arvidn f4a95131c5 improve asserts in dht_storage 2016-06-10 00:55:17 -04:00
Arvid Norberg 830a79dbcf optimize allow-fast logic (#800)
optimize allow-fast logic
2016-06-09 08:02:41 -04:00
Alden Torres 9d3cf5e68b changed min_distance_exp for correctness and clarity (#789)
changed min_distance_exp for correctness and clarity
2016-06-06 18:22:33 -04:00
Arvid Norberg cbeb7adbde fix .travis script to run simulations (#791)
fix .travis script to run simulations
2016-06-05 22:13:01 -04:00
Arvid Norberg 223f24ca27 some cleanup and transition to std::unique_ptr (#786)
some cleanup and transition to std::unique_ptr
2016-06-05 14:07:24 -04:00
Arvid Norberg fa8232cd13 remove some old cruft and defines (#785)
remove some old cruft and defines
2016-06-04 10:03:13 -04:00
Arvid Norberg 8c8f5bb03b deprecated public to_hex() and from_hex() functions (#784) 2016-06-04 10:01:43 -04:00
Alden Torres 7c4d92a627 Share the DHT storage for both IPv4 and IPv6 (#762) 2016-06-03 19:44:16 -04:00
Arvid Norberg be67553897 simplify session pause mechanism by keeping two separate states in torrents and having the session explicitly tell torrents when it's pausing (#779) 2016-06-03 07:32:48 -04:00
Alden Torres 42a9022065 Refactor of listen alerts for separated fields address and port (#778)
Refactor of listen alerts for separated fields address and port
2016-06-02 22:38:56 -04:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00
Arvid Norberg 748af6eec1 general cleanup. remove valgrind markup, log_hash_failures and C headers (#752)
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
arvidn aa0d29b67d merged RC_1_1 into master 2016-05-19 01:28:22 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Arvid Norberg 53bd03558c Dht stats 1.1 (#720)
fix missing dht stats counter updates
2016-05-12 21:27:11 -04:00
arvidn 7c108e6c19 merged RC_1_1 into master 2016-05-09 00:30:30 -04:00
Arvid Norberg 5bedf3e7b3 post add_torrent_alert before any other torrent alert (#717)
post add_torrent_alert before any other torrent alert
2016-05-08 23:48:27 -04:00
arvidn 5cd022cadb fix submodule 2016-05-07 21:43:06 -04:00
arvidn 254906eddc back-port torrent peer-class fix from master 2016-05-07 14:56:22 -04:00
arvidn 6d49d9d061 update libsimulator submodule 2016-05-06 17:41:52 -04:00
arvidn 6cf5ac9dd1 merged RC_1_1 into master 2016-05-06 01:08:05 -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
Steven Siloti ff0675e64e use standard array container (#676) 2016-04-30 23:10:47 -04:00
Arvid Norberg 4e97bf556c use override and final keywords (unconditionally) (#668)
use override and final keywords instead of macros.
2016-04-30 11:05:54 -04:00
Arvid Norberg 46b33f920b remove explicit cache feature (#661)
remove explicit cache feature
2016-04-29 02:32:00 -04:00
Steven Siloti 2d9a6b76f1 use asio::protcol instead of an enum/bool 2016-04-24 15:18:47 -07:00
Steven Siloti 43be11177b Add dual stack DHT node simulation tests 2016-04-24 14:26:57 -07:00
Steven Siloti 2abd9867ce IPv6 DHT support
Fixes #110
2016-04-24 14:26:57 -07:00
Arvid Norberg 7251575d98 This patch does: (#633)
1. simplifies and regularizies creation of listen sockets based on the listen
   interfaces setting.
2. simplifies and improves the behavior of UDP sockets, which are now explicitly
   opened per listen interface
3. transitions udp tracker, DHT and uTP socket manager over to using the new
   udp sockets
4. greatly simplified udp_socket to only wrap a single underlying socket (as
   opposed to one IPv4 and IPv6 socket)
5. improved behavior of bind-to-device
6. introduce an array_view type to make udp packet passing code simpler
7. simplify and make setting of DF flag more robust
8. simplify and regularize port mapping of listen sockets
2016-04-24 15:26:28 -04:00
arvidn 04a3c04075 merged RC_1_1 into master 2016-04-20 08:08:05 -04:00
arvidn bd6efe1179 fix simulator submodule 2016-04-18 08:37:58 -04:00
arvidn 93408a02ff fix classification of UDP packets as peer traffic 2016-04-18 01:29:46 -04:00
arvidn 8dd1da9d32 fix warnings 2016-04-17 01:56:05 -04:00
arvidn 680eddf3d4 remove -msse4.2 commandline option from configure script 2016-04-15 23:50:45 -04:00
arvidn d84a38fdf2 improve converters for add_torrent_params 2016-04-15 00:48:47 -04:00
arvidn d17ae19391 Merge branch 'RC_1_1' 2016-04-11 02:08:06 -04:00
arvidn ccc038a7df update libsimulator submodule 2016-04-09 14:22:05 -04:00
arvidn 5d499e83b6 fix uTP/SSL 2016-04-09 10:50:45 -04:00
arvidn 044ee0f054 update simulator submodule 2016-04-08 22:42:48 -04:00
arvidn db4d46b492 fix test_tracker sim 2016-04-08 08:41:19 -04:00
arvidn 867b83ccda merged RC_1_1 into master 2016-04-08 02:20:24 -04:00
arvidn 876cef0d4c restore the ipv6 http tracker argument, but restricted to only private torrents 2016-04-07 00:06:04 -04:00
arvidn f299d1578c restore libsimulator submodule 2016-04-06 22:59:29 -04:00
arvidn 387498e54f clean up in piece picker 2016-04-06 00:45:21 -04:00
Steven Siloti 4949721389 apply {get,set}_option to the appropriate socket based on the option's level
This avoids spurious errors being returned when trying to apply IPv4 options to
the IPv6 socket and vice-versa.
2016-04-04 13:45:06 -07:00
arvidn 9c712421c6 add missing include file to makefile 2016-03-30 01:46:33 -04:00
arvidn fd4a46342f merge RC_1_1 into master 2016-03-30 00:33:29 -04:00
arvidn 7649610807 fix test_optimistic_unchoking sim 2016-03-27 18:40:53 -04:00
arvidn 2b00eb1b38 refactor and clean up some sim tests 2016-03-27 18:40:49 -04:00
arvidn 96e2693d13 merge RC_1_1 into master 2016-03-19 16:02:46 -04:00
arvidn d3df16cd12 convert tracker try-next test to be a simulation (and deterministic) 2016-03-18 14:38:45 -04:00
arvidn f79a9c7adf merged RC_1_1 into master 2016-03-16 19:59:53 -04:00
arvidn 921cbeebed add option to delete just the partfile when removing a torrent 2016-03-14 08:26:39 -04:00
arvidn 0b4339064f extend timeouts 2016-03-13 23:13:12 -04:00
arvidn 58e73c1469 fix typo 2016-03-13 20:47:50 -04:00
arvidn 0d0048d415 try to evict a volatile piece before allocating a new one for a hash check. It may be faster to check files without growing the cache, or reusing the same buffers. 2016-03-13 12:52:44 -04:00
arvidn 6d85c7c5f0 merge RC_1_1 into master 2016-03-08 01:10:48 -05: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 a02c1d2164 record cache settings in the job instead of checking it twice for more robust behavior 2016-03-06 16:15:13 -05:00
arvidn 8ca76f9d59 fix support for auto disk cache size and disk buffer pool allocator behavior 2016-03-06 16:14:55 -05:00
arvidn 2fd8047308 merged RC_1_1 2016-02-24 21:22:39 -05:00
arvidn 57aa813135 fix auto-managed issue with torrents transitioning to 'slow' as they get paused, returning to life again later because of it 2016-02-23 01:28:58 -05:00
arvidn c9d7e54d7b make tests pass 2016-02-20 12:50:52 -05:00
arvidn 3a4f957b63 Merge branch 'RC_1_1' 2016-02-02 02:02:24 -05:00
arvidn 88b7e3768f add sim test for optimistic unchoke round-robin distribution 2016-02-01 20:28:30 -05:00
arvidn 9f1b27cf5f Merge branch 'RC_1_1' 2016-01-30 01:47:19 -05:00
arvidn f31d17c9c5 allow specifying which tracker to scrape in torrent_hadnle::scrape_tracker 2016-01-26 18:14:32 -05:00
arvidn d5203c67d9 add DHT rate limit test (simulation). introduce a new counter for dropped incoming dht messages. 2016-01-18 14:34:42 -05:00
arvidn 06b52f1421 some cleanup of the dht_socket_interface and fix tests and simulations to build with the dht disabled 2016-01-18 14:34:42 -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
arvidn f4d643bd2d instead of restarting the whole DHT when changing external IP, just rebuild the routing table and change the node IDs 2016-01-11 21:17:25 -05:00
Steven Siloti 7b5bdc3be9 DHT nodes can NOT share a receive buffer
While the simulation is single threaded, because async_receive_from_impl uses
post() to invoke the receive handler it is possible for multiple receive
handlers to be queued up in the io_service at the same time. If this happens
with a shared receive buffer the last packet received will overwrite all the
other packets before they are handled.

The use of post() is necessary to avoid unbounded recursion in the read handler
so each node must get its own buffer.
2016-01-10 18:30:16 -08:00
arvidn e06daa68a4 overhaul the dht simulator (setup_dht) to be more flexible and cheaper to run thousands of nodes 2016-01-09 01:08:52 -05:00
arvidn fb8d40a50c update libsimulator to fix msvc build 2015-12-31 21:31:15 -05:00
arvidn 448951af9c update libsimulator submodule 2015-12-28 19:48:58 -05:00
arvidn 1698dc75dc remove redundant boost::bind 2015-12-25 15:59:50 -05:00
arvidn fb9d788bf9 update libsimulator submodule 2015-12-23 23:04:09 -05:00
arvidn 9fd8b1d7c3 update libsimulator submodule 2015-12-23 21:52:11 -05:00
arvidn 63c3ff61e2 update submodule 2015-12-22 01:26:49 -05:00
arvidn 197ca4e06d transition http proxy test for http_connection to the sim 2015-12-22 00:45:16 -05:00
arvidn 99091a67d4 fix submodule 2015-12-19 00:11:04 -05:00
arvidn 1f3f06a836 forward port fix for deleting files of magnet link to master 2015-12-18 18:33:31 -05:00
arvidn 49b5a0d7d9 add support for codecov.io 2015-12-17 00:51:35 -05:00
arvidn 1712a8e4b4 polish the stop-when-ready flag and improve documentation 2015-12-13 20:31:28 -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 1f453bf159 clean up setup-swarm simulation utility to be more flexible to make it easier to add new tests. remove swarm_suite layer as it's not necessary anymore 2015-12-12 00:41:40 -05:00
arvidn d80a129871 fix gcc warnings 2015-12-12 07:15:24 +02:00
arvidn 99eb440945 comment in test_swarm 2015-12-04 23:39:37 -05:00
arvidn 332799bff2 make alert types declared final and disable the log alert declarations when logging is disabled 2015-11-29 10:16:02 -05:00
arvidn 2c3d7ee0ef fix a bug where the torrent's invariant was not always maintained as well as a shutdown issue (now covered by test as well) 2015-11-28 14:14:49 -05:00
arvidn 7b84c8122e extend test_transfer to include IPv6-only networks 2015-11-28 01:00:06 -05:00
arvidn a8e31fd8ca add first coverage of test_transfer as a proper sim 2015-11-28 00:59:39 -05:00
arvidn 847cd340ee extend tracker sim test and fix some bugs in tracker error reporting 2015-11-24 23:38:49 -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 47cd496617 extend http_connection sim test to proxy hostnames 2015-11-24 00:39:02 -05:00
arvidn 710e510c4b fix format string to be msvc compatible and work-around issue with boost.asio beeing header-only and instantiating multiple error_category objects when linking shared 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 92236a9923 clean up error_code use, and use error_condition to test for errors in test_http_connection 2015-11-24 00:39:01 -05:00
arvidn fa3215f8c7 don't capture buffer by value in lambda expression 2015-11-24 00:39:01 -05:00
arvidn 8db3fef969 update libsimulator 2015-11-24 00:39:01 -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
arvidn 91868f2086 add test for gzipped http responses 2015-11-24 00:39:01 -05:00
arvidn 9e971895dc test chunked encoding in new http_connection test 2015-11-24 00:39:01 -05:00
arvidn c6e46ae305 improve http_connection simulation test and extend it 2015-11-24 00:39:01 -05:00
arvidn f4a2b4d949 start of an http_connection test under the simulator 2015-11-24 00:39:01 -05:00
arvidn ed3dbaa78e also make sure trackers are subject to the IP filter 2015-11-21 09:30:02 -05:00
arvidn 73381d223b add integration test for IP filter 2015-11-21 02:31:53 -05:00
arvidn 4a30653084 improve coverage of stop-start-test 2015-11-20 22:27:33 -05:00
arvidn c0d6b20634 extend swarm simulation test to include stopping and starting and graceful pause 2015-11-20 22:27:12 -05:00
arvidn 74d12bd35b update libsimulator 2015-11-07 22:50:51 -05:00
arvidn 2592acfd8c fix c++98 build 2015-11-07 21:14:52 -05:00
arvidn 06f702b21a fix test_tracker build 2015-11-07 14:57:25 -05:00
arvidn 1fa184ba8a fix msvc-10.0 build 2015-11-07 10:01:01 -05:00
arvidn ee7774ea37 fix appveyor build 2015-11-07 00:22:13 -05:00
arvidn 1046f0c121 update libsimulator submodule 2015-11-02 01:16:40 -05:00
arvidn b756465157 update libsimulator 2015-10-31 10:58:20 -04:00
arvidn 3462c061a7 merged error handling fix from RC_1_0 2015-10-31 10:06:15 -04:00
arvidn 729a8e9152 update libsimulator. add simulation/test for announcing twice to trackers over IPv4 and IPv6. fix bugs preventing libtorrent from doing that correctly 2015-10-27 00:21:07 -04:00
arvidn b2796af5b3 update libsimulator submodule and fix a warning 2015-10-25 16:59:28 -04:00
arvidn 6009547613 update libsimulator submodule 2015-10-25 14:44:05 -04:00
arvidn 3cc464805f update libsimulator submodule 2015-10-25 10:55:20 -04:00
arvidn a75dfe2eb6 silence warnings in boost headers in dht_storage 2015-10-25 09:30:56 -04:00
arvidn 234ac8adeb update libsimulator submodule with IPv6 support 2015-10-24 15:57:22 -04:00
arvidn 51c6079c42 add stop-when-ready feature, to support checking torrents without starting the download afterwards 2015-10-04 13:08:23 -04:00
arvidn cae4e3dfe2 fix documentation 2015-09-29 21:05:18 -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
Alden Torres 197a443465 Fix of dht_storage_counters::peers counter. 2015-09-24 10:50:04 -04:00
arvidn e7a2bd8614 update libsimulator 2015-09-21 16:31:05 -07:00
arvidn fb2f659a31 fix bug in time keeping of active_time, seeding_time, finished_time etc. 2015-09-21 00:38:56 -07:00
arvidn 67a33dd792 update libsimulator 2015-09-20 19:55:29 -07:00
arvidn 73d2b8dc89 more msvc-12 support, and build sim config first on appveyor 2015-09-20 19:31:04 -07:00
arvidn 7000576588 attempt msvc-12 support 2015-09-20 18:52:34 -07:00
arvidn b628692223 separate out announce_entry and torrent_status into their own headers 2015-09-18 08:08:08 -04:00
arvidn c9a0212ee0 add simulation of tracker announces 2015-09-16 20:49:10 -04:00
arvidn 28ffc6969a revert appveyor build image 2015-09-15 08:08:00 -04:00
arvidn 5e3d0dcbb9 update libsimulator submodule 2015-09-12 13:45:35 -04:00
arvidn edc26cf90d update libsimulator 2015-09-10 00:08:39 -04:00
arvidn c0a4f7ba26 fix super seeding assert (forward port from RC_1_0) 2015-09-08 18:17:13 -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
arvidn b0a395aa61 remove unused includes from test 2015-08-30 21:51:32 -04:00
arvidn cc29a99c90 (merge commit from Andrew Starr-Bochicchio <asb@debian.org>) Running setup.py without LDFLAGS or explicitly passing includes will attempt to use bjam. This causes "python setup.py clean -a" to fail when building the package. 2015-08-27 06:52:13 -04:00
arvidn 7f24fb41ef fix test_metadata_extension 2015-08-22 08:09:09 +02:00
arvidn 91a08606cf attempt tp get submodules to work on travis again 2015-08-19 21:38:41 +02:00
arvidn a3608a39fe fix some warnings 2015-08-19 02:00:46 +02:00
arvidn d14e8a3487 update libsimulator 2015-08-17 09:08:41 -04:00
arvidn eecdd3121d fix some build warnings 2015-08-17 09:01:43 -04:00
arvidn 2e5a85056b fix uninitialized variable in test_dht (would cause stall) 2015-08-16 20:45:54 -04:00
arvidn 506d515151 disable dht simulation for now 2015-08-14 08:15:52 -04:00
arvidn 54e483647c scale down the DHT simulation even more 2015-08-13 23:07:32 -04:00
arvidn 225b82d9a0 move test_trackers_extensions over to a simulation and some minor metadata extension and tracker re-announce fixes 2015-08-13 23:07:04 -04:00
arvidn d2819cd1b9 fix uninitialized variable in test_pe_crypto simulation 2015-08-12 20:18:47 -04:00
arvidn 874bfcc89e transitioned test_super_seeding to a simulation (and remove the live test for test_swarm, which already has been transitioned to a simulation) 2015-08-10 10:18:36 -04:00
arvidn f2455c8689 made test_metadata_extension a bit more reliable 2015-08-10 10:02:01 -04:00
arvidn a75699eff1 move test_metadata_extension to a simulation instead of a live test 2015-08-10 09:17:41 -04:00
arvidn a3dbbd6a37 transition the test_pe_crypto system tests to be simulation 2015-08-10 06:57:51 -04:00
arvidn e557e63d05 scale down the dht simulation, to try to make it pass travis and appveyor time limits 2015-08-09 22:07:27 -04:00
arvidn d977f2e68f attempt to make appveyor happy 2015-08-09 17:54:10 -04:00
arvidn 4fa0aa62da simulate IP routes, interfaces and page size when building in simulation mode 2015-08-09 15:01:01 -04:00
arvidn 6068418def fix and re-enable simulations 2015-08-09 00:56:37 -04:00
arvidn 912243833e fix shared linking of simulations 2015-08-08 23:04:49 -04:00
arvidn 8ea2c0fa48 update libsimulator 2015-08-08 20:41:34 -04:00
arvidn 6cb8b0eeaa update libsimulator 2015-08-08 20:08:45 -04:00
arvidn 3f0a9c6f4d update libsimulator version 2015-08-08 19:31:20 -04:00
arvidn 3963d47385 fix shared linking against libtorrent_test 2015-08-08 18:13:43 -04:00
arvidn 72286eb0dc minor asio.ssl abstraction cleanup. update libsimulator with build fix. only run simulator on one of the build variants on travis, since the simulator does not support ssl 2015-08-08 16:19:44 -04:00
arvidn 3594da7839 on travis, use libc++ together with clang. Update libsimulator to fix gcc build 2015-08-08 13:08:41 -04:00
arvidn 2b0920f407 update libsimulator 2015-08-08 02:53:20 -04:00
arvidn 290ba39d8d update libsmulator 2015-08-07 23:52:11 -04:00
arvidn 46803b75f8 support building libtorrent in simulation mode (using libsimulator, which is a git submodule) 2015-08-07 21:31:59 -04:00