Patrick J Cherry
da35187af0
Allow blocksize to be changed in Environment
...
This number is peppered all over the test suite, so changing @blocksize
for everything is not a goer, when we really only need to change it for
one test.
2018-02-06 09:55:32 +00:00
Patrick J Cherry
7704f9e5c8
Fix tests to reflect new filesize.
2018-02-06 07:57:40 +00:00
Patrick J Cherry
3a86870c9f
Use sysconf to determine actual page size for msync
...
Also added comments in tests around testing for msync offsets/lengths.
2018-02-06 07:32:58 +00:00
Patrick J Cherry
2b58468800
Added test for FUA acceptance.
...
Although I think this might be a bit useless as servers normally just
ingore flags.
2018-02-03 20:29:15 +00:00
Patrick J Cherry
4d9db4d6e9
Added basic FLUSH test
2018-02-03 20:10:47 +00:00
Patrick J Cherry
d6057a4244
Use 'English' in ruby
2018-02-02 21:41:07 +00:00
Patrick J Cherry
1d98ba1d3e
Further rubocopping
2018-02-02 21:36:30 +00:00
Patrick J Cherry
9c48da82cc
Rubocop
2018-02-02 21:34:14 +00:00
Patrick J Cherry
1b7b688f7a
Tidied up nbd init test
2018-02-02 21:30:55 +00:00
Patrick J Cherry
051576df6d
Remove warnings about Object#timeout
2018-02-02 20:46:46 +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
James Carter
1efb7bada6
Merge branch 'fix-unsigned-longs-in-bitset-test' into 'master'
...
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
```
See merge request !24
2016-10-07 10:20:08 +01:00
Patrick J Cherry
209da655b3
Skip large file test on 32-bit platforms
...
This test cannot run on 32-bit machines as they cannot access files
large than 2G. Makes flexnbd on 32-bit a bit useless really..
2016-10-06 21:42:52 +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
679fa6dbf8
force binary encoding in a ruby2.1-compatible way
2016-10-05 11:54:09 +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
James Carter
f5de8fb12b
Merge branch '20-fix-encoding-failures' into 'master'
...
Use a BINARY encoded string when doing read/write comparisons.
This is a bit of a cheat really, but `#read` returns an ASCII encoded
string, where as our ruby generates UTF-8 encoded strings, causing
assertion failures.
Closes #20
See merge request !8
2016-10-05 10:32:05 +01:00
James F. Carter
99a5f79a52
fixed typo
2016-10-05 10:30:44 +01:00
Patrick J Cherry
356e1fd6a1
Use a BINARY encoded string when doing read/write comparisons.
...
This is a bit of a cheat really, but `#read` returns an ASCII encoded
string, where as our ruby generates UTF-8 encoded strings, causing
assertion failures.
Fixes #20
2016-10-05 10:01:15 +01:00
Patrick J Cherry
d3762162db
Fixes "double-definition of constants" warning
...
Looks like `#constants.include?` doesn't work as well as
`#const_defined?`.
2016-10-05 09:29:07 +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
nick
f48bf2b296
Automated merge with ssh://dev/flexnbd-c
2014-02-27 14:33:01 +00:00
nick
dbe7053bf3
Avoid some false positives
2014-02-27 14:32:26 +00:00
Alex Young
fa8023cf69
Proxy prefetch cache becomes a command-line argument.
2014-02-27 14:21:36 +00:00
Alex Young
5551373073
Merge
2014-02-26 15:37:44 +00:00
Alex Young
77f333423b
Apply Michel's tidy-ups
2014-02-26 15:19:03 +00:00
Alex Young
4f31bd9340
Switch from a rake-based build to a make-based build.
...
This commit beefs up the Makefile to do the build, instead of the
Rakefile.
It also removes from the Rakefile the dependency on rake_utils, which
should mean it's ok to build in a schroot.
The files are reorganised to make the Makefile rules more tractable,
although the reorganisation reveals a problem with our current code
organisation.
The problem is that the proxy-specific code transitively depends on the
server code via flexnbd.h, which has a circular dependency on the server
and client structs. This should be broken in a future commit by
separating the flexnbd struct into a shared config struct and
server-specific parts, so that the server code can be moved into
src/server to more accurately show the functional dependencies.
2014-02-21 19:10:55 +00:00
nick
5ca5858929
Increase a timeout on a test to handle slow unlink calls on other filesystems
2014-01-22 12:21:49 +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
53cbe14556
mirror: lengthen the request timeout to 60 seconds
...
This is complicated slightly by a need to keep the tests fast, so
we introduce an environment variable that can override the constant
2013-10-30 22:45:12 +00:00
nick
d87af93cec
tests: Add a migration test with many clients connecting in two waves
2013-09-24 10:11:40 +01: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