search for: experr

Displaying 4 results from an estimated 4 matches for "experr".

Did you mean: expert
2023 May 30
2
[libnbd PATCH v3 04/22] states: Prepare to send 64-bit requests
...indentation: two spaces rather than one tab. Arrgh. ./.editorconfig is supposed to do this correctly, but obviously its interaction with emacs is a bit botched when it comes to Makefile syntax. Will clean up. > > +++ b/tests/pwrite-extended.c > > +static void > > +check (int experr, const char *prefix) > > +{ > > + const char *msg = nbd_get_error (); > > + int errnum = nbd_get_errno (); > > + > > + fprintf (stderr, "error: \"%s\"\n", msg); > > + fprintf (stderr, "errno: %d (%s)\n", errnum, strerror (errnum)...
2019 Jun 28
3
[libnbd PATCH] tests: Enhance errors test
...it a/tests/errors.c b/tests/errors.c index 99d5820..415c378 100644 --- a/tests/errors.c +++ b/tests/errors.c @@ -27,12 +27,40 @@ #include <libnbd.h> +#define MAXSIZE (65 * 1024 * 1024) /* Oversize on purpose */ + +static char *progname; +static char buf[MAXSIZE]; + +static void +check (int experr, const char *prefix) +{ + const char *msg = nbd_get_error (); + int errnum = nbd_get_errno (); + + printf ("error: \"%s\"\n", msg); + printf ("errno: %d (%s)\n", errnum, strerror (errnum)); + if (strncmp (msg, prefix, strlen (prefix)) != 0) { + fprintf (stderr,...
2023 Jul 13
2
[libnbd PATCH 0/2] Fix docs and testing of completion callback
This is my proposal for fixing the documentation to match practice (namely, that completion.callback is not invoked in the cases where the aio call itself reports errors); we could instead try to go the other direction and tweak the generator to guarantee that both completion.callback and completion.free are reached no matter what, but that felt more invasive to me. Eric Blake (2): api: Tighten
2019 Jul 03
1
[libnbd PATCH] tests: Make errors more robust under load
...ests/errors.c index faa1488..b4ff665 100644 --- a/tests/errors.c +++ b/tests/errors.c @@ -24,6 +24,8 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <unistd.h> +#include <sys/stat.h> #include <libnbd.h> @@ -53,15 +55,73 @@ check (int experr, const char *prefix) } } +static char script[] = "/tmp/libnbd-errors-scriptXXXXXX"; +static char witness[] = "/tmp/libnbd-errors-witnessXXXXXX"; +static int script_fd = -1, witness_fd = -1; + +static void +cleanup (void) +{ + if (script_fd != -1) { + if (script_fd >=...