search for: do_nbdkit

Displaying 20 results from an estimated 22 matches for "do_nbdkit".

2018 Dec 14
0
[PATCH nbdkit 3/3] tests: Test export flags (eflags).
...END_FLUSH=$(( 1 << 2 )) +SEND_FUA=$(( 1 << 3 )) +ROTATIONAL=$(( 1 << 4 )) +SEND_TRIM=$(( 1 << 5 )) +SEND_WRITE_ZEROES=$(( 1 << 6 )) + +all_flags="HAS_FLAGS READ_ONLY SEND_FLUSH SEND_FUA ROTATIONAL SEND_TRIM SEND_WRITE_ZEROES" + +do_nbdkit () +{ + nbdkit -v -U - -o "$@" sh script=- --run ' + socat -b 28 unix-connect:$unixsocket \ + exec:"dd bs=1 skip=26 count=2 of=eflags.out status=none" + ' + + # By adding 0 we convert the string to an integer (removing + # whitespace). +...
2020 Aug 06
0
[nbdkit PATCH v2 5/5] sh, eval: Add .list_exports support
...# Check here that it doesn't regress. + +source ./functions.sh +set -e +set -x + +requires nbdsh -c 'print (h.get_list_export_description)' +requires nbdinfo --help +requires jq --version + +files="eval-exports.list eval-exports.out" +rm -f $files +cleanup_fn rm -f $files + +# do_nbdkit [skip_list] EXPOUT +do_nbdkit () +{ + # Hack: since we never pass args that would go through .config, we can + # define a dummy .config to avoid defining .list_export + hack= + if test $1 = skip_list; then + hack=config= + shift + else + cat eval-exports.list +...
2018 Dec 15
5
[PATCH nbdkit v2 0/4] tests: Test export flags (eflags).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-December/thread.html#00123 v2: - Document "-" instead of "script=-" and use it in the test; and verify this also works on FreeBSD; and verify that it doesn't depend on the particular behaviour of our wrapper script and should work with installed nbdkit too. - Fix handling of zero flags parameter. -
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
...",null,0]]') - -# Start a long-running server with .list_exports set to varying contents -start_nbdkit -P eval-exports.pid -U $sock eval get_size='echo "$2"|wc -c' \ - open='echo "$3"' list_exports="cat '$PWD/eval-exports.list'" - -# do_nbdkit EXPNAME EXPOUT -do_nbdkit () -{ - # Check how the default export name is handled - # nbdinfo currently makes multiple connections, so we can't use the - # long-running server for validating default export name. - nbdkit -U - -v eval list_exports="cat '$PWD/eval-exports.list...
2018 Dec 14
6
[PATCH nbdkit 0/3] tests: Test export flags (eflags).
Some feature additions to the shell script plugin allow us to test the export flags field reasonably easily. Rich.
2020 Aug 27
4
[PATCH nbdkit 0/2] Temporarily remove .list_exports for nbdkit 1.22
If you're following nbdkit development upstream you'll have seen that we are still making changes to the .list_exports and related APIs. The current .list_exports API upstream is not how it will look finally. The latest set of proposals was here: https://www.redhat.com/archives/libguestfs/2020-August/thread.html#00330 At the same time I'd like to do an nbdkit 1.22 (stable) release.
2019 May 20
3
[nbdkit PATCH 0/2] More on .thread_model
Rich pointed out that making thread_model dynamic even for plugins makes some sense, so here is the code for doing it for 'sh'. I'm less confident on how to do it for OCaml and Rust (not to mention that those allow the plugin to already compile in their model, rather than the language binding glue forcing a model). The other languages (lua, perl, python, ruby) still need to be
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
...f5cd43ed..9b3a6a3a 100755 --- a/tests/test-eflags.sh +++ b/tests/test-eflags.sh @@ -68,6 +68,7 @@ SEND_DF=$(( 1 << 7 )) CAN_MULTI_CONN=$(( 1 << 8 )) SEND_RESIZE=$(( 1 << 9 )) SEND_CACHE=$(( 1 << 10 )) +SEND_FAST_ZERO=$(( 1 << 11 )) do_nbdkit () { @@ -133,8 +134,8 @@ EOF #---------------------------------------------------------------------- # can_write=true # -# NBD_FLAG_SEND_WRITE_ZEROES is set on writable connections -# even when can_zero returns false, because nbdkit reckons it +# NBD_FLAG_SEND_WRITE_ZEROES and NBD_FLAG_SEND_FAS...
2020 Aug 25
0
[nbdkit PATCH 5/5] sh, eval: Implement .default_export
...2"|wc -c' \ - open='echo "$3"' list_exports="cat '$PWD/eval-exports.list'" + open='echo "$3"' list_exports="cat '$PWD/eval-exports.list'" \ + default_export="cat '$PWD/eval-exports.list'" # do_nbdkit EXPNAME EXPOUT do_nbdkit () { # Check how the default export name is handled - # nbdinfo currently makes multiple connections, so we can't use the - # long-running server for validating default export name. - # XXX FIXME: requires .default_export in eval - : || nbdkit -U - -v...
2020 Aug 06
6
[nbdkit PATCH v2 0/5] .list_exports
Since v1: - patch 1: check size limits - patch 2: better handling of default export name canonicalization - patch 3: support filters as well as plugins - patch 4: new - patch 5: rewrite sh parser, fix testsuite to actually work and cover more cases (now that libnbd.git is fixed) Eric Blake (4): server: Add exports list functions server: Prepare to use export list from plugin log: Add
2019 May 16
0
[nbdkit PATCH v2 24/24] nocache: Implement new filter
....sh index eaaaae0..14a0099 100755 --- a/tests/test-eflags.sh +++ b/tests/test-eflags.sh @@ -51,6 +51,7 @@ if ! qemu-nbd --help | grep -sq -- --list; then fi files="eflags.out" +late_args= rm -f $files cleanup_fn rm -f $files @@ -70,7 +71,7 @@ SEND_CACHE=$(( 1 << 10 )) do_nbdkit () { - nbdkit -v -U - "$@" sh - --run 'qemu-nbd --list -k $unixsocket' | + nbdkit -v -U - "$@" sh - $late_args --run 'qemu-nbd --list -k $unixsocket' | grep -E "flags: 0x" | grep -Eoi '0x[a-f0-9]+' > eflags.out echo -n ef...
2019 Aug 19
2
[nbdkit PATCH] noextents: Add hook to cripple SR advertisement
.../tests/test-eflags.sh b/tests/test-eflags.sh index b3724170..7a064bbb 100755 --- a/tests/test-eflags.sh +++ b/tests/test-eflags.sh @@ -87,6 +87,8 @@ fail () #---------------------------------------------------------------------- # can_write=false +# +# nbdkit supports DF if client requests SR. do_nbdkit <<'EOF' case "$1" in @@ -98,6 +100,22 @@ EOF [ $eflags -eq $(( HAS_FLAGS|READ_ONLY|SEND_DF )) ] || fail "expected HAS_FLAGS|READ_ONLY|SEND_DF" +#---------------------------------------------------------------------- +# --filter=noextents structured=false +#...
2019 Aug 20
2
[nbdkit PATCH v2] main: Add option to disable SR advertisement
.../tests/test-eflags.sh b/tests/test-eflags.sh index 6cc61631..f5cd43ed 100755 --- a/tests/test-eflags.sh +++ b/tests/test-eflags.sh @@ -87,6 +87,8 @@ fail () #---------------------------------------------------------------------- # can_write=false +# +# nbdkit supports DF if client requests SR. do_nbdkit <<'EOF' case "$1" in @@ -98,6 +100,22 @@ EOF [ $eflags -eq $(( HAS_FLAGS|READ_ONLY|SEND_DF )) ] || fail "$LINENO: expected HAS_FLAGS|READ_ONLY|SEND_DF" +#---------------------------------------------------------------------- +# --no-sr +# can_write=false +#...
2020 Mar 19
0
[nbdkit PATCH 1/2] sh, eval: Cache .can_zero and .can_flush
...hat the following conditions are @@ -50,7 +50,7 @@ if ! qemu-nbd --help | grep -sq -- --list; then exit 77 fi -files="eflags.out" +files="eflags.out eflags.err" late_args= rm -f $files cleanup_fn rm -f $files @@ -72,12 +72,29 @@ SEND_FAST_ZERO=$(( 1 << 11 )) do_nbdkit () { - nbdkit -v -U - "$@" sh - $late_args --run 'qemu-nbd --list -k $unixsocket' | - grep -E "flags: 0x" | grep -Eoi '0x[a-f0-9]+' > eflags.out + # Prepend a check for internal caching to the script on stdin. + { printf %s ' +...
2020 Mar 19
5
[nbdkit PATCH 0/2] More caching of initial setup
When I added .can_FOO caching in 1.16, I missed the case that the sh plugin itself was calling .can_flush twice in some situations (in order to default .can_fua). Then right after, I regressed it to call .can_zero twice (in order to default .can_fast_zero). I also missed that .thread_model could use better caching, because at the time, I did not add testsuite coverage. Fix that now. Eric Blake
2020 Aug 25
9
[nbdkit PATCH 0/5] Implement .default_export, nbdkit_string_intern
More patches on the way for improving .list_exports signature and adding .export_description, but this is the promised code showing why nbdkit_string_intern is useful. Patch 4 is somewhat RFC: we could either add new API to take the boilerplate from: foo_config(const char *key, const char *value) { if (strcmp (key, "file") == 0) { CLEANUP_FREE char *tmp = nbdkit_realpath (value);
2019 May 17
4
[nbdkit PATCH 0/3] Add noparallel filter
Being able to programmatically force nbdkit to be less parallel can be useful during testing. I was less sure about patch 3, but if you like it, I'm inclined to instead squash it into patch 1. This patch is written to apply after my NBD_CMD_CACHE work (since I touched the nocache filter); but can be rearranged if we think this series should go in first while that one undergoes any adjustments
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a
2020 Aug 25
0
[nbdkit PATCH 1/5] api: Add .default_export
...tls_fallback_open, .get_size = tls_fallback_get_size, .can_write = tls_fallback_can_write, diff --git a/tests/test-eval-exports.sh b/tests/test-eval-exports.sh index aa694aaa..7c946378 100755 --- a/tests/test-eval-exports.sh +++ b/tests/test-eval-exports.sh @@ -67,7 +67,8 @@ do_nbdkit () # Check how the default export name is handled # nbdinfo currently makes multiple connections, so we can't use the # long-running server for validating default export name. - nbdkit -U - -v eval list_exports="cat '$PWD/eval-exports.list'" \ + # XXX FIXM...
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing