Add exportname option to CLI and interop tests#134
Merged
Conversation
0542214 to
924df45
Compare
This is better, as we directly connect to the server, instead of going through an additional component (nbd-client), and we don't even need sudo access. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
3a2398b to
af0c1d6
Compare
Contributor
Author
|
Travis build depends on ocaml/ocaml-ci-scripts#237 |
a0b2016 to
71f7bc4
Compare
edwintorok
reviewed
Aug 9, 2018
| SERVER_PROCESS=$! | ||
| echo $SERVER_PROCESS | ||
| # Wait for the server to start the main loop | ||
| sleep 0.1 |
Member
There was a problem hiding this comment.
Isn't there some way the server could notify that it has started?
Contributor
Author
There was a problem hiding this comment.
I think there might be, maybe we could wait until something is listening on the 10809 port, but I wanted to keep things simple in the tests.
| Server.with_connection | ||
| (match exportname with | ||
| | None -> Server.with_connection ?offer:None | ||
| | Some exportname -> Server.with_connection ~offer:[exportname]) |
Member
There was a problem hiding this comment.
Could this be written as:
let offer = match exportname with
| None -> None
| Some exportname -> Some [exportname] in
Server.with_connection ?offer71f7bc4 to
90b27f3
Compare
edwintorok
approved these changes
Aug 9, 2018
1cd36ea to
ab84d57
Compare
Add an option to specify an export name when serving a file. If specified, only this export name will be accepted, and the client will be allowed to list the exports. If unspecified, the behavior is the same as before: listing the exports is not allowed, and any export name is accepted. I've added compatibility tests with qemu-img and nbd-client. By default, these test are skipped if the required programs aren't installed. If the strict option is enabled, the tests will fail instead of being skipped. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
ab84d57 to
381c515
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an option to specify an export name when serving a file. If
specified, only this export name will be accepted, and the client will
be allowed to list the exports.
If unspecified, the behavior is the same as before: listing the exports
is not allowed, and any export name is accepted.
I've added compatibility tests with qemu-img and nbd-client. By default,
these test are skipped if the required programs aren't installed. If the
strict option is enabled, the tests will fail instead of being skipped.
Signed-off-by: Gabor Igloi gabor.igloi@citrix.com