Patrick J Cherry
27a94a807e
Remove the test_gets_num_clients test from the C unit tests
...
This test was causing problems by using dummy pointers to simulate
connections. When calling the cleanup code, these pointers were
thought to be real, and the code attemtped to clean up threads
referenced by those pointers, causing a segfault.
I've reimplemented the test in the ruby acceptance suite.
2018-02-16 13:46:31 +00:00
Patrick J Cherry
72c8c6f757
Altered test to check for type as a 16-bit uint; added flags test
2018-02-02 20:30:39 +00:00
Chris Elsworth
42d206cfb7
Update test
2017-07-14 16:26:25 +01:00
James Carter
b4cb2d9240
Merge branch 'fix-wrong-handle-type' into 'master'
...
Fix up "wrong" handle type from char* to uint64_t
Following from the NBD handle comparison simplifications.
See merge request !25
2016-10-07 10:20:35 +01:00
Patrick J Cherry
52b45e6b40
fix check_bitset test on 32-bit platforms
...
The use of `unsigned long` and `UL` suffices caused this test to fail
on 32 bit platforms, where these are just 4, not 8 bits long.
```
tests/unit/check_bitset.c:73:F:bit:test_bit_ranges:0: longs[32] = 0 SHOULD BE ffffffff
```
2016-10-06 21:22:53 +01:00
Patrick J Cherry
d279eb7570
Fix up "wrong" handle type from char* to uint64_t
...
Following from the NBD handle comparison simplifications.
2016-10-06 21:19:15 +01:00
Patrick J Cherry
d1e6e835c4
OK removed the cast and fixed the function def in the test
...
This should definitely clear the warning.
2016-10-06 15:56:57 +01:00
Patrick J Cherry
898f3f6c7e
Reinstated char * cast to remove compiler warning
2016-10-06 15:43:20 +01:00
Patrick J Cherry
1338d9e910
Fix up nbdtypes test to correctly use htobe64
...
Previous change hadn't taken this into account, and hopefully this makes
our test a little clearer.
2016-10-06 14:46:29 +01:00
Patrick J Cherry
191b3bc72c
Merge branch 'master' of gitlab.bytemark.co.uk:open-source/flexnbd-c into fix-check-readwrite
2016-10-06 14:06:21 +01:00
Patrick J Cherry
6505588f25
Fixed check_readwrite test to pass correct handle to fd_write_reply
...
The (char*) cast to resp->received.handle.b was causing a segfault
2016-10-06 14:01:47 +01:00
Patrick J Cherry
957707bcfc
Fixed up internal test names (copy/pasta?)
...
The test names output by `make check` now reflect reality.
2016-10-06 13:44:20 +01:00
James F. Carter
a09e14b2d4
whitespace fix
2016-10-05 11:06:39 +01:00
James F. Carter
a6710b6c32
update tests to reflect changes in handle storage
2016-10-05 10:57:52 +01:00
Michel Pollet
956a602475
Simplified NBD handle comparisons
...
8 bytes, therefore a uing64_t to compare to, no need for memcmp()
Signed-off-by: Michel Pollet <buserror@gmail.com >
2016-10-04 15:41:48 +01:00
Alex Young
77f333423b
Apply Michel's tidy-ups
2014-02-26 15:19:03 +00:00
nick
afcc07a181
Fix stop signal logic broken by the killswitch
2014-01-22 12:16:09 +00:00
nick
dcead04cf6
Fix up the check_util test once more
2014-01-22 12:10:34 +00:00
nick
976e9ba07f
Automated merge with ssh://dev.bytemark.co.uk//repos/flexnbd-c
2014-01-22 11:49:26 +00:00
nick
905d66af77
Rework a test
2014-01-22 11:45:35 +00:00
nick
ce5c51cdcf
Fix a test case
2014-01-22 11:40:19 +00:00
nick
866bf835e6
tests: Fix an uninitialized memory access
2013-10-30 22:46:49 +00:00
nick
78fc65c515
bitset: Rename bitset_stream_on/off as bitset_enable/disable_stream
2013-09-23 17:10:14 +01:00
nick
f4793c7059
bitset: Rename bitset_mapping to bitset
2013-09-23 16:58:40 +01:00
nick
847b2ec9ad
status: Remove useless stats
2013-09-23 14:19:49 +01:00
nick
ca9aea0d13
status: Expose migration_seconds_left
2013-09-23 14:09:25 +01:00
nick
0f2225becf
status: Display number of currently connected clients, and whether new clients are allowed
...
These will be useful for migration status monitoring - replaces "is pass == 7?"
2013-09-23 13:38:19 +01:00
nick
c3a5eb0600
bitset: add bitset_stream_size and bitset_stream_queued_bytes
2013-09-12 16:54:42 +01:00
nick
0a029fbbf5
bitset: Add an event stream implementation
...
Nothing is using it yet
2013-09-12 12:30:50 +01:00
nick
83426e1c01
tests: Update check_bitset to use new bitset_free() function
2013-09-11 16:09:27 +01:00
nick
385c9027db
flexnbd status: display mirror->max_bytes_per_second as mirror_speed_limit
2013-08-14 13:30:25 +01:00
nick
9f4fbe782c
Branch merge
2013-08-09 17:03:25 +01:00
nick
754949d43f
bitset: Add a bitset_run_count_ex that lets you learn the value of the bits in the run
2013-08-09 16:49:38 +01:00
lupine
1a966ca0be
bitset: Prove that bitset operations with len=0 don't underflow
2013-07-26 17:09:21 +01:00
nick
f590f8ed3c
status: Add migration_speed ( bytes per second ) and migration_duration( seconds ) to the migration output
2013-07-26 11:50:01 +01:00
nick
bc9ce93648
bitset: squash one more bug
2013-07-25 10:58:50 +01:00
nick
bed8959d47
bitset: Fix large runs
2013-07-24 17:42:08 +01:00
nick
253cee5a10
flexnbd: Acknowledge new return type of bitset_run_count
2013-07-24 15:08:29 +01:00
nick
d18423c153
tests: Fix a couple of compile warnings
2013-07-23 17:22:23 +01:00
nick
1b0fe24529
test: Add some tests for bitset_run_count
2013-07-23 17:13:40 +01:00
nick
afe76debf7
flexnbd status: Actually output pass statistics
2013-07-08 14:27:04 +01:00
nick
f4bfc70a4b
flexnbd status: Add current pass clean/dirty byte statistics
2013-07-08 13:51:15 +01:00
nick
b29ef6d4de
flexnbd status: Avoid a possible NULL dereference reading migration status
...
While the mirror mutex is taken, the mirroring can be abandoned and serve->mirror
set to NULL, so we need to lock around reading information from serve->mirror
2013-07-08 13:32:14 +01:00
nick
dee0bb27d6
flexnbd status: Add the size of the backing file, in bytes
...
This will be handy information if you're querying flexnbd for migration
stats, particularly.
2013-07-08 10:11:18 +01:00
nick
f556f298b1
flexnbd status: Add current migration pass to the status output if we're migrating
2013-07-08 09:58:31 +01:00
nick
55b452ebef
Fix tests for new killswitch argument
2013-07-03 10:04:08 +01:00
nick
2bb8434128
sockutil: Make sockaddr_address_string conform to its comment
2013-03-19 14:47:50 +00:00
nick
63f7e3e8d4
Fix some sockutil tests
2013-02-15 16:48:23 +00:00
nick
cb7eed28e7
sockutil: Add some tests for sockaddr_address_string
2013-02-13 15:07:30 +00:00
Alex Young
22bea81445
Don't open the control socket until after the server socket is bound
...
This makes it easier for the tests (and supervisor) to guarantee to be
able to connect to the server socket.
Also this patch moves freeing the mirror supervisor into the server
thread.
2012-10-09 17:35:20 +01:00