Displaying 20 results from an estimated 31 matches for "test_start_nbdkit".
2017 Nov 20
3
[nbdkit PATCH 0/2] Add nbd forwarder test coverage
To avoid bitrot, any new feature needs testsuite coverage ;)
Still to come: once I get my work on parallel nbd finished,
I will add a test-parallel-nbd.sh that closely mirrors what
my other series added in test-parallel-file.sh.
If desired, it might be a fun exercise to tweak test-nbd into
using a for-loop of user-controlled depth for how deep you
want to nest the forwarding tree, to see where
2018 Sep 07
0
[PATCH nbdkit 3/6] file: Make the file= parameter into a magic config key.
...file-block.c b/tests/test-file-block.c
index f053242..e2ea068 100644
--- a/tests/test-file-block.c
+++ b/tests/test-file-block.c
@@ -124,9 +124,8 @@ main (int argc, char *argv[])
atexit (detach_loopdev);
/* Start nbdkit. */
- snprintf (buf, sizeof buf, "file=%s", loopdev);
if (test_start_nbdkit ("-D", "file.zero=1",
- "file", buf, NULL) == -1)
+ "file", loopdev, NULL) == -1)
exit (EXIT_FAILURE);
g = guestfs_create ();
diff --git a/tests/test-file.c b/tests/test-file.c
index 65a2568..9382ed2 1...
2018 Sep 08
0
[PATCH nbdkit v2 3/6] file: Make the file= parameter into a magic config key.
...file-block.c b/tests/test-file-block.c
index f053242..e2ea068 100644
--- a/tests/test-file-block.c
+++ b/tests/test-file-block.c
@@ -124,9 +124,8 @@ main (int argc, char *argv[])
atexit (detach_loopdev);
/* Start nbdkit. */
- snprintf (buf, sizeof buf, "file=%s", loopdev);
if (test_start_nbdkit ("-D", "file.zero=1",
- "file", buf, NULL) == -1)
+ "file", loopdev, NULL) == -1)
exit (EXIT_FAILURE);
g = guestfs_create ();
diff --git a/tests/test-file.c b/tests/test-file.c
index 65a2568..9382ed2 1...
2018 Sep 07
7
[PATCH nbdkit 0/6] plugins: Implement magic config key.
Remove the need to use file= (and in future other) parameters for many
plugins. eg. Using the file plugin becomes:
nbdkit file disk.img
Rich.
2018 Sep 08
8
[PATCH nbdkit v2 0/6] plugins: Implement magic config key.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2:
- As discussed in the patch review, tighten up the characters
permitted in keys.
- Update documentation to note that relative paths can be made
safe by prefixing with ./ and absolute paths do not need any
extra steps.
- I pushed patch 1/6 from the v1 series since it was just a trivial
2018 Sep 10
7
[PATCH nbdkit v3 0/6] plugins: Implement magic config key.
v1: https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2: https://www.redhat.com/archives/libguestfs/2018-September/msg00034.html
v3:
- Fixed is_config_key zero length test.
- Fixed is_config_key so it uses strspn and is not O(n^2).
- Changed >= 1.7 to >= 1.8 in the documentation.
Rich.
2019 Jan 02
1
Re: [PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...are opaque).
> +++ b/tests/test.h
> @@ -44,7 +44,8 @@ extern const char *sock; /* socket of most recent nbdkit process */
> extern const char *server[2]; /* server parameter for add_drive */
>
> /* Can be called more than once (useful for nbd plugin) */
> -extern int test_start_nbdkit (const char *arg, ...);
> +extern int test_start_nbdkit (const char *arg, ...)
> + __attribute__((__nonnull__ (1)));
Independent fix: this should probably also have
__attribute__((__sentinel__))
All the other changes look sane.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc....
2019 Jan 02
4
[PATCH nbdkit v2 0/2] Use of attribute(()).
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-January/msg00008.html
In v2 I have provided two patches:
The first patch extends attribute((nonnull)) to most internal
functions, but not to the external API.
The second patch uses a macro so that attribute((format)) is only used
in the public API on GCC or Clang. At least in theory these headers
could be used by a C compiler which
2020 Aug 07
2
[PATCH nbdkit] plugins: file: More standard cache mode names
...it file disk.img fadvise=sequential cache=writethrough
=head2 Files on tmpfs
diff --git a/tests/test-gzip.c b/tests/test-gzip.c
index 8f81c5b7..b1685098 100644
--- a/tests/test-gzip.c
+++ b/tests/test-gzip.c
@@ -62,7 +62,7 @@ main (int argc, char *argv[])
/* Test the new filter. */
if (test_start_nbdkit ("file", "--filter=gzip", disk,
- "fadvise=sequential", "cache=none",
+ "fadvise=sequential", "cache=writethrough",
NULL) == -1)
exit (EXIT_FAILURE);
do_test...
2020 Aug 08
0
Re: [PATCH nbdkit] plugins: file: More standard cache mode names
...>
> =head2 Files on tmpfs
>
> diff --git a/tests/test-gzip.c b/tests/test-gzip.c
> index 8f81c5b7..b1685098 100644
> --- a/tests/test-gzip.c
> +++ b/tests/test-gzip.c
> @@ -62,7 +62,7 @@ main (int argc, char *argv[])
>
> /* Test the new filter. */
> if (test_start_nbdkit ("file", "--filter=gzip", disk,
> - "fadvise=sequential", "cache=none",
> + "fadvise=sequential", "cache=writethrough",
> NULL) == -1)
> exit (EXIT_...
2020 Jun 30
5
[PATCH nbdkit 0/5 NOT WORKING] nbd: Implement command= and socket-fd= parameters.
The first four patches are fairly routine clean up and can be
reviewed/applied on their own. The fifth patch is problematic as
described below.
At the moment if you want to proxy through to qemu-nbd (eg. for
handling qcow2 files) it's rather complicated and you end up having to
manage the sockets and clean up yourself. However the library we use
for the proxying supports a perfectly good
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...dae3afc..cf0b1eb 100644
--- a/tests/test.h
+++ b/tests/test.h
@@ -44,7 +44,8 @@ extern const char *sock; /* socket of most recent nbdkit process */
extern const char *server[2]; /* server parameter for add_drive */
/* Can be called more than once (useful for nbd plugin) */
-extern int test_start_nbdkit (const char *arg, ...);
+extern int test_start_nbdkit (const char *arg, ...)
+ __attribute__((__nonnull__ (1)));
/* Declare program_name. */
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1
diff --git a/tests/web-server.h b/tests/web-server.h
index ac022b4..77faf6f 100644
--- a/tests/web-serve...
2019 Jan 21
0
[PATCH nbdkit v2 3/4] tests: Implement a better nbdkit-partition-filter test.
...dio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <guestfs.h>
-
-#include "test.h"
-
-int
-main (int argc, char *argv[])
-{
- guestfs_h *g;
- int r;
- char *data;
-
- if (test_start_nbdkit ("-r",
- "--filter", "partition",
- "file", "disk",
- "partition=1",
- NULL) == -1)
- exit (EXIT_FAILURE);
-
- g = guestfs_create ();
- if...
2019 Jan 22
0
[PATCH nbdkit v3 2/5] tests: Implement a better nbdkit-partition-filter test.
...dio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <guestfs.h>
-
-#include "test.h"
-
-int
-main (int argc, char *argv[])
-{
- guestfs_h *g;
- int r;
- char *data;
-
- if (test_start_nbdkit ("-r",
- "--filter", "partition",
- "file", "disk",
- "partition=1",
- NULL) == -1)
- exit (EXIT_FAILURE);
-
- g = guestfs_create ();
- if...
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and
they are skipped by default (normally you should not build or test as
root), but you can do this to run them:
sudo make check-root
In nbdkit I wanted to check that the file plugin works with block
devices (this is not tested), and the only way I can sensibly think to
do this is using a loopback device and root. This commit
2020 Jul 10
2
[PATCH nbdkit] New filter: gzip
...ight (C) 2013 Red Hat Inc.
+ * Copyright (C) 2013-2020 Red Hat Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -50,7 +50,7 @@ main (int argc, char *argv[])
int r;
char *data;
- if (test_start_nbdkit ("gzip", "-r", "file=disk.gz", NULL) == -1)
+ if (test_start_nbdkit ("file", "--filter=gzip", "disk.gz", NULL) == -1)
exit (EXIT_FAILURE);
g = guestfs_create ();
diff --git a/TODO b/TODO
index 28bcc952..addf8025 100644
--- a/TOD...
2020 Jul 01
15
[PATCH nbdkit 0/9] nbd: Implement command= and socket-fd= parameters.
I fixed the deadlock - turned out to be an actual bug in the nbd
plugin (see patch 8).
I changed the command syntax so it's now:
nbdkit nbd command=qemu arg=-f arg=qcow2 arg=/path/to/disk.qcow2
Nir wrote:
18:08 < nsoffer> rwmjones: regarding the nbd proxy patches, did you have specific flow that help us?
18:08 < nsoffer> rwmjones: or this is just a way to support qcow2 in the
2020 Aug 08
1
Re: [PATCH nbdkit] plugins: file: More standard cache mode names
...gt;
> > diff --git a/tests/test-gzip.c b/tests/test-gzip.c
> > index 8f81c5b7..b1685098 100644
> > --- a/tests/test-gzip.c
> > +++ b/tests/test-gzip.c
> > @@ -62,7 +62,7 @@ main (int argc, char *argv[])
> >
> > /* Test the new filter. */
> > if (test_start_nbdkit ("file", "--filter=gzip", disk,
> > - "fadvise=sequential", "cache=none",
> > + "fadvise=sequential", "cache=writethrough",
> > NULL) == -1)
> &...
2020 Feb 12
4
[nbdkit PATCH 0/3] Make ext2 a filter
I'm impressed that I was able to whip this out in just one day of
hacking. Below, I'll include a diff between the plugin and the
filter as of patch 1, if it aids review.
Eric Blake (3):
filters: Add ext2 filter
ext2: Deprecate ext2 plugin
ext2: Add mode for letting client exportname choose file from image
TODO | 5 -
configure.ac
2018 Nov 21
3
[PATCH nbdkit v2 0/3] Rewrite xz plugin as a filter.
v2:
- Fixes a number of bugs in corner cases.
- Uses a 1M block size to fetch from the underlying plugin. This
improves performance considerably.
I also tested this much more thoroughly and can't find any more bugs.
Rich.