Commit Graph

  • 69ad6d6b7a Only copy constants from C to Ruby once Alex Young 2012-07-14 17:25:26 +01:00
  • b734a468c1 Make the --verbose flag universal Alex Young 2012-07-14 12:27:16 +01:00
  • 768b30c4eb Clobber a dangling fprintf Alex Young 2012-07-14 12:11:25 +01:00
  • 1ce1003d3d Error when reading sent data fails Alex Young 2012-07-14 12:10:12 +01:00
  • c6e6952def Open files with O_DIRECT dependent on a compile-time DIRECT_IO #define. Alex Young 2012-07-14 10:07:58 +01:00
  • 03c06a689d Append the CFLAGS environment variable to the build flags. Alex Young 2012-07-14 10:05:35 +01:00
  • e4d2b9a667 Make test sockets less dependent on enviroment Alex Young 2012-07-14 10:04:55 +01:00
  • 2ea5a2e38a Unlink the control socket on clean shutdown Alex Young 2012-07-13 14:09:52 +01:00
  • a838714571 Tweak the fuzz script to work with the new test layout Alex Young 2012-07-13 13:13:04 +01:00
  • fd8ee5b8c3 Tweak the parse_acl declaration Alex Young 2012-07-13 12:37:21 +01:00
  • 15109c72d1 Add a newline to log messages at macro expansion Alex Young 2012-07-13 12:18:19 +01:00
  • 9f4da5def0 Switch to use nbd_r2h_reply in read_reply() Alex Young 2012-07-13 12:13:55 +01:00
  • 40101e49f3 Silence a vfprintf valgrind error Alex Young 2012-07-13 11:57:46 +01:00
  • 2a50b64a43 Free the flexnbd switch mutex Alex Young 2012-07-13 11:31:22 +01:00
  • 00e912d0a6 Add a 'just in case' error case to acl checking Alex Young 2012-07-13 10:16:44 +01:00
  • 2f24d02a8f Remove unused variables Alex Young 2012-07-13 09:34:18 +01:00
  • 2e4e592c08 Enable writing after the 2G boundary Alex Young 2012-07-12 18:01:10 +01:00
  • cef2dcaad2 Rename struct mirror_status to struct mirror Alex Young 2012-07-12 14:54:48 +01:00
  • c6a084ce82 Add a --quiet command-line option Alex Young 2012-07-12 14:45:55 +01:00
  • 10b46beeea Retry failed rebind attempts Alex Young 2012-07-12 14:14:46 +01:00
  • 9002341e77 Fix the broken --rebind-port command-line option. Alex Young 2012-07-12 10:45:19 +01:00
  • 71b7708964 Minor tidy Alex Young 2012-07-12 10:22:31 +01:00
  • eb90308b6e Handle a failed disconnect correctly Alex Young 2012-07-12 09:39:39 +01:00
  • f3cebcdcd5 Test a source crashing after an entrust. Alex Young 2012-07-11 15:19:50 +01:00
  • 84dd052465 Fix a test broken by stdout/stderr reshuffle Alex Young 2012-07-11 10:12:10 +01:00
  • f3f017a87d Free all possibly held mutexes in error handlers Alex Young 2012-07-11 09:43:16 +01:00
  • 17fe6d3023 Test that a blocked entrust causes a retry Alex Young 2012-07-03 18:00:31 +01:00
  • 061512f3dc Test that a write reply with the wrong magic will force a retry Alex Young 2012-07-03 17:01:39 +01:00
  • 5c66d35677 Test that closing the socket immediately after sending write data causes an error Alex Young 2012-07-03 15:33:00 +01:00
  • d16aebf36e Test that a disconnect after the write request but before the data is an error Alex Young 2012-07-03 15:25:39 +01:00
  • a767d4bc8c Test the source handles a dest crash after write correctly Alex Young 2012-07-03 14:52:27 +01:00
  • 64ebbe7688 Refactor FakeSource from a module to a class Alex Young 2012-07-03 14:39:05 +01:00
  • ded4914c84 Simplified FlexNBD::FakeDest Alex Young 2012-07-03 14:23:20 +01:00
  • 9e67f228f0 Rename a test class Alex Young 2012-07-03 13:35:47 +01:00
  • 2283b99834 Split acceptance tests into separate files Alex Young 2012-07-03 13:33:52 +01:00
  • 988b2ec014 Moved acceptance tests into tests/acceptance Alex Young 2012-07-03 10:59:31 +01:00
  • c0c9c6f076 Moved unit tests into tests/unit Alex Young 2012-07-03 10:53:08 +01:00
  • e817129c47 Changes to error severity in readwrite.c made a test fail, this patch fixes it Alex Young 2012-07-02 18:10:02 +01:00
  • cc2e67d4bb Test that an invalid write gets an error response Alex Young 2012-07-02 15:37:52 +01:00
  • ea4642a878 Check that a mirror write returning an error will cause a reconnect and retry Alex Young 2012-07-02 15:04:45 +01:00
  • 99f8c24b01 Tweak a timeout to prevent an intermittent test failure Alex Young 2012-07-02 13:00:30 +01:00
  • 9850f5d0a4 Test that timing out a write causes a disconnect and a reconnect Alex Young 2012-06-28 14:45:53 +01:00
  • 4de4cee3d0 Test for acl rejection Alex Young 2012-06-28 13:29:22 +01:00
  • c9fdd5a60e Handle ECONNRESET during a read request Alex Young 2012-06-28 11:46:02 +01:00
  • 9b717d6391 Factor common code out of fake destinations Alex Young 2012-06-28 11:34:36 +01:00
  • 192471ee82 Factor common code out of the test fake sources * * * More fake source refacoring Alex Young 2012-06-27 17:28:24 +01:00
  • 137a764cc7 Add a test for a second client connecting during a mirror Alex Young 2012-06-27 16:32:01 +01:00
  • cea9d97086 Missing file Alex Young 2012-06-27 16:19:13 +01:00
  • 04a10179a0 check_acl correctly sets log_level Alex Young 2012-06-27 16:18:38 +01:00
  • ac3e6692a8 make sure that an invalid flexnbd signal fd can't break the serve accept loop Alex Young 2012-06-27 16:17:51 +01:00
  • 94b4fa887c Add mboxes Alex Young 2012-06-27 15:45:33 +01:00
  • 2078d17053 connect failure scenarios Alex Young 2012-06-22 10:05:41 +01:00
  • 80f298f6cd Make non-fatal errors return properly Alex Young 2012-06-21 18:01:56 +01:00
  • f37a217cb9 Add listen mode Alex Young 2012-06-21 18:01:50 +01:00
  • 79ba1cf728 Make max_nbd_clients configurable per struct server Alex Young 2012-06-21 17:22:34 +01:00
  • e21beb1866 Add the REQUEST_ENTRUST nbd request type Alex Young 2012-06-21 17:12:06 +01:00
  • a3dc670939 Squash valgrind errors by making sure client threads get joined on termination Alex Young 2012-06-21 17:11:12 +01:00
  • bafc3d3687 Make sure filename_incomplete gets freed Alex Young 2012-06-21 15:58:32 +01:00
  • 322eae137b Add a missed free() Alex Young 2012-06-21 15:55:48 +01:00
  • 43e95dc4db Make sure all the lines we read get freed (including the trailing blank) Alex Young 2012-06-21 15:31:28 +01:00
  • cc22f50fe6 Avoid a use-after-free in serve.c Alex Young 2012-06-21 14:15:58 +01:00
  • c054403208 Trim the length bitset_run_count looks at not to exceed the bits array Alex Young 2012-06-21 12:05:01 +01:00
  • 80fff4e0e6 Squash a valgrind error caused by debug output Alex Young 2012-06-21 11:55:21 +01:00
  • 4e8a9670e5 Merge Alex Young 2012-06-21 11:37:18 +01:00
  • e3c04ade29 Added early-exit on any valgrind error Alex Young 2012-06-21 11:37:00 +01:00
  • ed3090d6d5 Tweak struct initialisation to squash a valgrind error Alex Young 2012-06-21 10:29:06 +01:00
  • 50b0db7bf6 Reject mirroring if the remote size doesn't match the local size Alex Young 2012-06-13 15:51:37 +01:00
  • c9ece5a63f Tidy mirror_runner somewhat Alex Young 2012-06-13 15:45:59 +01:00
  • c2b6fac92d Fix an argv array reference (root cause of a bug from the last commit) Alex Young 2012-06-13 13:52:15 +01:00
  • 7d1c15b07a Fix two bugs in mirroring. Alex Young 2012-06-13 13:44:21 +01:00
  • b986f6b63e Take _GNU_SOURCE out of source and put it in CFLAGS Alex Young 2012-06-13 09:59:08 +01:00
  • c7525f87dc Removed proxying completely and fixed the pthread_join bug revealed in the process Alex Young 2012-06-12 15:08:07 +01:00
  • 2a71b4e7a4 Fix broken error checking around pthread functions Alex Young 2012-06-11 16:08:19 +01:00
  • 5996c8f7ba Simplify a FATAL_IF_NEGATIVE Alex Young 2012-06-11 15:31:59 +01:00
  • 4c52bcd870 Make the error and fatal functions swallow semicolons properly Alex Young 2012-06-11 15:26:42 +01:00
  • 13a6a403a4 Make the error and fatal macros swallow semicolons properly Alex Young 2012-06-11 15:23:06 +01:00
  • 83b8b9eaac Add general-purpose ERROR/FATAL_IF and ERROR/FATAL_UNLESS macros Alex Young 2012-06-11 15:20:05 +01:00
  • c6182b9edf Merge Alex Young 2012-06-11 14:59:52 +01:00
  • e2d3161a4a Set default log level to warn to shut the tests up Alex Young 2012-06-11 14:59:26 +01:00
  • 8513144354 Automated merge with ssh://dev/flexnbd-c nick 2012-06-11 14:40:53 +01:00
  • 5ab9e10019 test: make check_serve bind() its outgoing socket to a known IP for these tests nick 2012-06-11 14:40:41 +01:00
  • 710d8254d4 Make sure all ifs are braced Alex Young 2012-06-11 14:34:17 +01:00
  • 25fc0969cf Make the compiler stricter and tidy up code to make the subsequent errors and warnings go away Alex Young 2012-06-11 13:57:03 +01:00
  • 8825f86726 Merge Alex Young 2012-06-11 13:49:56 +01:00
  • b5427d13db Explicitly check for which fd is acceptable in server_accept Alex Young 2012-06-11 13:49:35 +01:00
  • 893db71d7c Whitespace nick 2012-06-11 13:05:22 +01:00
  • 224bdcbf87 Fix handling ACLs where > 1 entry exists nick 2012-06-11 12:56:45 +01:00
  • 0b90517035 tests: Get rid of a warning nick 2012-06-11 10:08:24 +01:00
  • 0441ef9d74 tests: Get check_serve working after the merge of doom nick 2012-06-11 10:04:31 +01:00
  • e8b5fae7ab Merge, just renaming old error macros. Matthew Bloch 2012-06-09 02:37:23 +01:00
  • b546539ab8 Rewrote error & log functions to be more general, use longjmp to get out of trouble and into predictable cleanup functions (one for each of serve, client & control contexts). We use 'fatal' to mean 'kill the thread' and 'error' to mean 'don't kill the thread', assuming some recovery action, except I don't use error anywhere yet. Matthew Bloch 2012-06-09 02:25:12 +01:00
  • 8691533d88 Added hopeful default path to find rake_utils, turned undefined function warnings into errors, and added expensive header scanning to .c->.o rule to ensure changes to .h files cause recompiles as you'd expect. Matthew Bloch 2012-06-09 02:17:34 +01:00
  • b7096ef908 Audit client connections on acl update Alex Young 2012-06-08 18:03:41 +01:00
  • 35ca93b42c Lock around acl updates Alex Young 2012-06-08 11:02:40 +01:00
  • f7e1a098b1 Move updating the acl object into serve.c * * * Replacing the server acl sends an acl_updated signal Alex Young 2012-06-08 10:32:33 +01:00
  • 5fb0cd4cca Fix O_NONBLOCK setting on self_pipes Alex Young 2012-06-08 10:11:06 +01:00
  • 2d9d00b636 Pull ACLs into their own struct Alex Young 2012-06-07 17:47:43 +01:00
  • 601e5b475a Tidy the NULLCHECK macro to swallow semicolons properly Alex Young 2012-06-07 16:00:38 +01:00
  • c628435f77 Fix an invalid define symbol Alex Young 2012-06-07 15:59:13 +01:00
  • 1cd8f4660f Merge of doom Alex Young 2012-06-07 14:40:55 +01:00