From 24bee20ce4196d45891925332a47a05aa5e40938 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 1 May 2009 11:27:52 +0100 Subject: [PATCH] Generated code for dmesg command. --- daemon/actions.h | 1 + daemon/stubs.c | 19 +++++++ fish/cmds.c | 22 ++++++++ fish/completion.c | 1 + guestfish-actions.pod | 13 +++++ guestfs-actions.pod | 16 ++++++ java/com/redhat/et/libguestfs/GuestFS.java | 24 +++++++++ java/com_redhat_et_libguestfs_GuestFS.c | 18 +++++++ ocaml/guestfs.ml | 1 + ocaml/guestfs.mli | 3 ++ ocaml/guestfs_c_actions.c | 23 ++++++++ perl/Guestfs.xs | 14 +++++ perl/lib/Sys/Guestfs.pm | 11 ++++ python/guestfs-py.c | 25 +++++++++ python/guestfs.py | 12 +++++ ruby/ext/guestfs/_guestfs.c | 21 ++++++++ src/guestfs-actions.c | 87 ++++++++++++++++++++++++++++++ src/guestfs-actions.h | 1 + src/guestfs_protocol.c | 10 ++++ src/guestfs_protocol.h | 10 +++- src/guestfs_protocol.x | 5 ++ tests.c | 37 ++++++++++++- 22 files changed, 372 insertions(+), 2 deletions(-) diff --git a/daemon/actions.h b/daemon/actions.h index 11253f8..dbc2bbd 100644 --- a/daemon/actions.h +++ b/daemon/actions.h @@ -111,3 +111,4 @@ extern int do_cp (const char *src, const char *dest); extern int do_cp_a (const char *src, const char *dest); extern int do_mv (const char *src, const char *dest); extern int do_drop_caches (int whattodrop); +extern char *do_dmesg (void); diff --git a/daemon/stubs.c b/daemon/stubs.c index 64d66a9..c21eecf 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2255,6 +2255,22 @@ done: xdr_free ((xdrproc_t) xdr_guestfs_drop_caches_args, (char *) &args); } +static void dmesg_stub (XDR *xdr_in) +{ + char *r; + + r = do_dmesg (); + if (r == NULL) + /* do_dmesg has already called reply_with_error */ + goto done; + + struct guestfs_dmesg_ret ret; + ret.kmsgs = r; + reply ((xdrproc_t) &xdr_guestfs_dmesg_ret, (char *) &ret); + free (r); +done: ; +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -2528,6 +2544,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_DROP_CACHES: drop_caches_stub (xdr_in); break; + case GUESTFS_PROC_DMESG: + dmesg_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } diff --git a/fish/cmds.c b/fish/cmds.c index 4529d29..561018a 100644 --- a/fish/cmds.c +++ b/fish/cmds.c @@ -66,6 +66,7 @@ void list_commands (void) printf ("%-20s %s\n", "cp", "copy a file"); printf ("%-20s %s\n", "cp-a", "copy a file or directory recursively"); printf ("%-20s %s\n", "debug", "debugging and internals"); + printf ("%-20s %s\n", "dmesg", "return kernel messages"); printf ("%-20s %s\n", "download", "download a file to the local machine"); printf ("%-20s %s\n", "drop-caches", "drop kernel page cache, dentries and inodes"); printf ("%-20s %s\n", "exists", "test if file or directory exists"); @@ -468,6 +469,9 @@ void display_command (const char *cmd) if (strcasecmp (cmd, "drop_caches") == 0 || strcasecmp (cmd, "drop-caches") == 0) pod2text ("drop-caches - drop kernel page cache, dentries and inodes", " drop-caches \n\nThis instructs the guest kernel to drop its page cache,\nand/or dentries and inode caches. The parameter C\ntells the kernel what precisely to drop, see\nL\n\nSetting C to 3 should drop everything.\n\nThis automatically calls L before the operation,\nso that the maximum guest memory is freed."); else + if (strcasecmp (cmd, "dmesg") == 0) + pod2text ("dmesg - return kernel messages", " dmesg\n\nThis returns the kernel messages (C output) from\nthe guest kernel. This is sometimes useful for extended\ndebugging of problems.\n\nAnother way to get the same information is to enable\nverbose messages with C or by setting\nthe environment variable C before\nrunning the program."); + else display_builtin_command (cmd); } @@ -2280,6 +2284,21 @@ static int run_drop_caches (const char *cmd, int argc, char *argv[]) return r; } +static int run_dmesg (const char *cmd, int argc, char *argv[]) +{ + char *r; + if (argc != 0) { + fprintf (stderr, "%s should have 0 parameter(s)\n", cmd); + fprintf (stderr, "type 'help %s' for help on %s\n", cmd, cmd); + return -1; + } + r = guestfs_dmesg (g); + if (r == NULL) return -1; + printf ("%s\n", r); + free (r); + return 0; +} + int run_action (const char *cmd, int argc, char *argv[]) { if (strcasecmp (cmd, "launch") == 0 || strcasecmp (cmd, "run") == 0) @@ -2606,6 +2625,9 @@ int run_action (const char *cmd, int argc, char *argv[]) if (strcasecmp (cmd, "drop_caches") == 0 || strcasecmp (cmd, "drop-caches") == 0) return run_drop_caches (cmd, argc, argv); else + if (strcasecmp (cmd, "dmesg") == 0) + return run_dmesg (cmd, argc, argv); + else { fprintf (stderr, "%s: unknown command\n", cmd); return -1; diff --git a/fish/completion.c b/fish/completion.c index e2c9780..f1abc0b 100644 --- a/fish/completion.c +++ b/fish/completion.c @@ -72,6 +72,7 @@ static const char *const commands[] = { "cp", "cp-a", "debug", + "dmesg", "download", "drop-caches", "exists", diff --git a/guestfish-actions.pod b/guestfish-actions.pod index c31905a..d04a663 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -429,6 +429,19 @@ There is no comprehensive help for this command. You have to look at the file C in the libguestfs source to find out what you can do. +=head2 dmesg + + dmesg + +This returns the kernel messages (C output) from +the guest kernel. This is sometimes useful for extended +debugging of problems. + +Another way to get the same information is to enable +verbose messages with C or by setting +the environment variable C before +running the program. + =head2 download download remotefilename (filename|-) diff --git a/guestfs-actions.pod b/guestfs-actions.pod index b3daa05..f1b5964 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -561,6 +561,22 @@ to find out what you can do. This function returns a string, or NULL on error. I. +=head2 guestfs_dmesg + + char *guestfs_dmesg (guestfs_h *handle); + +This returns the kernel messages (C output) from +the guest kernel. This is sometimes useful for extended +debugging of problems. + +Another way to get the same information is to enable +verbose messages with C or by setting +the environment variable C before +running the program. + +This function returns a string, or NULL on error. +I. + =head2 guestfs_download int guestfs_download (guestfs_h *handle, diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index c29789c..f56ae41 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -2512,4 +2512,28 @@ public class GuestFS { private native void _drop_caches (long g, int whattodrop) throws LibGuestFSException; + /** + * return kernel messages + * + * This returns the kernel messages ("dmesg" output) from + * the guest kernel. This is sometimes useful for extended + * debugging of problems. + * + * Another way to get the same information is to enable + * verbose messages with "g.set_verbose" or by setting the + * environment variable "LIBGUESTFS_DEBUG=1" before running + * the program. + * + * @throws LibGuestFSException + */ + public String dmesg () + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("dmesg: handle is closed"); + return _dmesg (g); + } + private native String _dmesg (long g) + throws LibGuestFSException; + } diff --git a/java/com_redhat_et_libguestfs_GuestFS.c b/java/com_redhat_et_libguestfs_GuestFS.c index ae6ff86..323402d 100644 --- a/java/com_redhat_et_libguestfs_GuestFS.c +++ b/java/com_redhat_et_libguestfs_GuestFS.c @@ -2533,3 +2533,21 @@ Java_com_redhat_et_libguestfs_GuestFS__1drop_1caches } } +JNIEXPORT jstring JNICALL +Java_com_redhat_et_libguestfs_GuestFS__1dmesg + (JNIEnv *env, jobject obj, jlong jg) +{ + guestfs_h *g = (guestfs_h *) (long) jg; + jstring jr; + char *r; + + r = guestfs_dmesg (g); + if (r == NULL) { + throw_exception (env, guestfs_last_error (g)); + return NULL; + } + jr = (*env)->NewStringUTF (env, r); + free (r); + return jr; +} + diff --git a/ocaml/guestfs.ml b/ocaml/guestfs.ml index e79a076..80e1d39 100644 --- a/ocaml/guestfs.ml +++ b/ocaml/guestfs.ml @@ -226,3 +226,4 @@ external cp : t -> string -> string -> unit = "ocaml_guestfs_cp" external cp_a : t -> string -> string -> unit = "ocaml_guestfs_cp_a" external mv : t -> string -> string -> unit = "ocaml_guestfs_mv" external drop_caches : t -> int -> unit = "ocaml_guestfs_drop_caches" +external dmesg : t -> string = "ocaml_guestfs_dmesg" diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli index 5baf995..810c49a 100644 --- a/ocaml/guestfs.mli +++ b/ocaml/guestfs.mli @@ -457,3 +457,6 @@ val mv : t -> string -> string -> unit val drop_caches : t -> int -> unit (** drop kernel page cache, dentries and inodes *) +val dmesg : t -> string +(** return kernel messages *) + diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c index d6d1305..20cb327 100644 --- a/ocaml/guestfs_c_actions.c +++ b/ocaml/guestfs_c_actions.c @@ -2965,3 +2965,26 @@ ocaml_guestfs_drop_caches (value gv, value whattodropv) CAMLreturn (rv); } +CAMLprim value +ocaml_guestfs_dmesg (value gv) +{ + CAMLparam1 (gv); + CAMLlocal1 (rv); + + guestfs_h *g = Guestfs_val (gv); + if (g == NULL) + caml_failwith ("dmesg: used handle after closing it"); + + char *r; + + caml_enter_blocking_section (); + r = guestfs_dmesg (g); + caml_leave_blocking_section (); + if (r == NULL) + ocaml_guestfs_raise_error (g, "dmesg"); + + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +} + diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index 1a45c79..ed8e670 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -1658,3 +1658,17 @@ PREINIT: if (r == -1) croak ("drop_caches: %s", guestfs_last_error (g)); +SV * +dmesg (g) + guestfs_h *g; +PREINIT: + char *kmsgs; + CODE: + kmsgs = guestfs_dmesg (g); + if (kmsgs == NULL) + croak ("dmesg: %s", guestfs_last_error (g)); + RETVAL = newSVpv (kmsgs, 0); + free (kmsgs); + OUTPUT: + RETVAL + diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 63a4925..01d81a6 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -452,6 +452,17 @@ There is no comprehensive help for this command. You have to look at the file C in the libguestfs source to find out what you can do. +=item $kmsgs = $h->dmesg (); + +This returns the kernel messages (C output) from +the guest kernel. This is sometimes useful for extended +debugging of problems. + +Another way to get the same information is to enable +verbose messages with C<$h-Eset_verbose> or by setting +the environment variable C before +running the program. + =item $h->download ($remotefilename, $filename); Download file C and save it as C diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 24f9ff8..dd9f4ca 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -3181,6 +3181,30 @@ py_guestfs_drop_caches (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_dmesg (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + char *r; + + if (!PyArg_ParseTuple (args, (char *) "O:guestfs_dmesg", + &py_g)) + return NULL; + g = get_handle (py_g); + + r = guestfs_dmesg (g); + if (r == NULL) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyString_FromString (r); + free (r); + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -3295,6 +3319,7 @@ static PyMethodDef methods[] = { { (char *) "cp_a", py_guestfs_cp_a, METH_VARARGS, NULL }, { (char *) "mv", py_guestfs_mv, METH_VARARGS, NULL }, { (char *) "drop_caches", py_guestfs_drop_caches, METH_VARARGS, NULL }, + { (char *) "dmesg", py_guestfs_dmesg, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; diff --git a/python/guestfs.py b/python/guestfs.py index 6c425bc..e298922 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1221,3 +1221,15 @@ class GuestFS: """ return libguestfsmod.drop_caches (self._o, whattodrop) + def dmesg (self): + u"""This returns the kernel messages ("dmesg" output) from + the guest kernel. This is sometimes useful for extended + debugging of problems. + + Another way to get the same information is to enable + verbose messages with "g.set_verbose" or by setting the + environment variable "LIBGUESTFS_DEBUG=1" before running + the program. + """ + return libguestfsmod.dmesg (self._o) + diff --git a/ruby/ext/guestfs/_guestfs.c b/ruby/ext/guestfs/_guestfs.c index 12ca6de..c0fc180 100644 --- a/ruby/ext/guestfs/_guestfs.c +++ b/ruby/ext/guestfs/_guestfs.c @@ -2679,6 +2679,25 @@ static VALUE ruby_guestfs_drop_caches (VALUE gv, VALUE whattodropv) return Qnil; } +static VALUE ruby_guestfs_dmesg (VALUE gv) +{ + guestfs_h *g; + Data_Get_Struct (gv, guestfs_h, g); + if (!g) + rb_raise (rb_eArgError, "%s: used handle after closing it", "dmesg"); + + + char *r; + + r = guestfs_dmesg (g); + if (r == NULL) + rb_raise (e_Error, "%s", guestfs_last_error (g)); + + VALUE rv = rb_str_new2 (r); + free (r); + return rv; +} + /* Initialize the module. */ void Init__guestfs () { @@ -2911,4 +2930,6 @@ void Init__guestfs () ruby_guestfs_mv, 2); rb_define_method (c_guestfs, "drop_caches", ruby_guestfs_drop_caches, 1); + rb_define_method (c_guestfs, "dmesg", + ruby_guestfs_dmesg, 0); } diff --git a/src/guestfs-actions.c b/src/guestfs-actions.c index 99f8a44..94963ff 100644 --- a/src/guestfs-actions.c +++ b/src/guestfs-actions.c @@ -8166,3 +8166,90 @@ int guestfs_drop_caches (guestfs_h *g, return 0; } +struct dmesg_ctx { + /* This flag is set by the callbacks, so we know we've done + * the callbacks as expected, and in the right sequence. + * 0 = not called, 1 = reply_cb called. + */ + int cb_sequence; + struct guestfs_message_header hdr; + struct guestfs_message_error err; + struct guestfs_dmesg_ret ret; +}; + +static void dmesg_reply_cb (guestfs_h *g, void *data, XDR *xdr) +{ + guestfs_main_loop *ml = guestfs_get_main_loop (g); + struct dmesg_ctx *ctx = (struct dmesg_ctx *) data; + + /* This should definitely not happen. */ + if (ctx->cb_sequence != 0) { + ctx->cb_sequence = 9999; + error (g, "%s: internal error: reply callback called twice", "guestfs_dmesg"); + return; + } + + ml->main_loop_quit (ml, g); + + if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) { + error (g, "%s: failed to parse reply header", "guestfs_dmesg"); + return; + } + if (ctx->hdr.status == GUESTFS_STATUS_ERROR) { + if (!xdr_guestfs_message_error (xdr, &ctx->err)) { + error (g, "%s: failed to parse reply error", "guestfs_dmesg"); + return; + } + goto done; + } + if (!xdr_guestfs_dmesg_ret (xdr, &ctx->ret)) { + error (g, "%s: failed to parse reply", "guestfs_dmesg"); + return; + } + done: + ctx->cb_sequence = 1; +} + +char *guestfs_dmesg (guestfs_h *g) +{ + struct dmesg_ctx ctx; + guestfs_main_loop *ml = guestfs_get_main_loop (g); + int serial; + + if (check_state (g, "guestfs_dmesg") == -1) return NULL; + guestfs_set_busy (g); + + memset (&ctx, 0, sizeof ctx); + + serial = guestfs__send_sync (g, GUESTFS_PROC_DMESG, NULL, NULL); + if (serial == -1) { + guestfs_set_ready (g); + return NULL; + } + + guestfs__switch_to_receiving (g); + ctx.cb_sequence = 0; + guestfs_set_reply_callback (g, dmesg_reply_cb, &ctx); + (void) ml->main_loop_run (ml, g); + guestfs_set_reply_callback (g, NULL, NULL); + if (ctx.cb_sequence != 1) { + error (g, "%s reply failed, see earlier error messages", "guestfs_dmesg"); + guestfs_set_ready (g); + return NULL; + } + + if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_DMESG, serial) == -1) { + guestfs_set_ready (g); + return NULL; + } + + if (ctx.hdr.status == GUESTFS_STATUS_ERROR) { + error (g, "%s", ctx.err.error_message); + guestfs_set_ready (g); + return NULL; + } + + guestfs_set_ready (g); + return ctx.ret.kmsgs; /* caller will free */ +} + diff --git a/src/guestfs-actions.h b/src/guestfs-actions.h index ef4e775..b14840c 100644 --- a/src/guestfs-actions.h +++ b/src/guestfs-actions.h @@ -130,3 +130,4 @@ extern int guestfs_cp (guestfs_h *handle, const char *src, const char *dest); extern int guestfs_cp_a (guestfs_h *handle, const char *src, const char *dest); extern int guestfs_mv (guestfs_h *handle, const char *src, const char *dest); extern int guestfs_drop_caches (guestfs_h *handle, int whattodrop); +extern char *guestfs_dmesg (guestfs_h *handle); diff --git a/src/guestfs_protocol.c b/src/guestfs_protocol.c index 395e710..7a40e14 100644 --- a/src/guestfs_protocol.c +++ b/src/guestfs_protocol.c @@ -1518,6 +1518,16 @@ xdr_guestfs_drop_caches_args (XDR *xdrs, guestfs_drop_caches_args *objp) } bool_t +xdr_guestfs_dmesg_ret (XDR *xdrs, guestfs_dmesg_ret *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->kmsgs, ~0)) + return FALSE; + return TRUE; +} + +bool_t xdr_guestfs_procedure (XDR *xdrs, guestfs_procedure *objp) { register int32_t *buf; diff --git a/src/guestfs_protocol.h b/src/guestfs_protocol.h index a3bf185..40c84ee 100644 --- a/src/guestfs_protocol.h +++ b/src/guestfs_protocol.h @@ -784,6 +784,11 @@ struct guestfs_drop_caches_args { }; typedef struct guestfs_drop_caches_args guestfs_drop_caches_args; +struct guestfs_dmesg_ret { + char *kmsgs; +}; +typedef struct guestfs_dmesg_ret guestfs_dmesg_ret; + enum guestfs_procedure { GUESTFS_PROC_MOUNT = 1, GUESTFS_PROC_SYNC = 2, @@ -875,7 +880,8 @@ enum guestfs_procedure { GUESTFS_PROC_CP_A = 88, GUESTFS_PROC_MV = 89, GUESTFS_PROC_DROP_CACHES = 90, - GUESTFS_PROC_NR_PROCS = 90 + 1, + GUESTFS_PROC_DMESG = 91, + GUESTFS_PROC_NR_PROCS = 91 + 1, }; typedef enum guestfs_procedure guestfs_procedure; #define GUESTFS_MESSAGE_MAX 4194304 @@ -1048,6 +1054,7 @@ extern bool_t xdr_guestfs_cp_args (XDR *, guestfs_cp_args*); extern bool_t xdr_guestfs_cp_a_args (XDR *, guestfs_cp_a_args*); extern bool_t xdr_guestfs_mv_args (XDR *, guestfs_mv_args*); extern bool_t xdr_guestfs_drop_caches_args (XDR *, guestfs_drop_caches_args*); +extern bool_t xdr_guestfs_dmesg_ret (XDR *, guestfs_dmesg_ret*); extern bool_t xdr_guestfs_procedure (XDR *, guestfs_procedure*); extern bool_t xdr_guestfs_message_direction (XDR *, guestfs_message_direction*); extern bool_t xdr_guestfs_message_status (XDR *, guestfs_message_status*); @@ -1179,6 +1186,7 @@ extern bool_t xdr_guestfs_cp_args (); extern bool_t xdr_guestfs_cp_a_args (); extern bool_t xdr_guestfs_mv_args (); extern bool_t xdr_guestfs_drop_caches_args (); +extern bool_t xdr_guestfs_dmesg_ret (); extern bool_t xdr_guestfs_procedure (); extern bool_t xdr_guestfs_message_direction (); extern bool_t xdr_guestfs_message_status (); diff --git a/src/guestfs_protocol.x b/src/guestfs_protocol.x index 68b0ac4..4bf42be 100644 --- a/src/guestfs_protocol.x +++ b/src/guestfs_protocol.x @@ -610,6 +610,10 @@ struct guestfs_drop_caches_args { int whattodrop; }; +struct guestfs_dmesg_ret { + string kmsgs<>; +}; + enum guestfs_procedure { GUESTFS_PROC_MOUNT = 1, GUESTFS_PROC_SYNC = 2, @@ -701,6 +705,7 @@ enum guestfs_procedure { GUESTFS_PROC_CP_A = 88, GUESTFS_PROC_MV = 89, GUESTFS_PROC_DROP_CACHES = 90, + GUESTFS_PROC_DMESG = 91, GUESTFS_PROC_NR_PROCS }; diff --git a/tests.c b/tests.c index 082068a..e494d9c 100644 --- a/tests.c +++ b/tests.c @@ -112,6 +112,35 @@ static void no_test_warnings (void) fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n"); } +static int test_dmesg_0 (void) +{ + /* InitEmpty for dmesg (0) */ + { + int r; + suppress_error = 0; + r = guestfs_umount_all (g); + if (r == -1) + return -1; + } + { + int r; + suppress_error = 0; + r = guestfs_lvm_remove_all (g); + if (r == -1) + return -1; + } + /* TestRun for dmesg (0) */ + { + char *r; + suppress_error = 0; + r = guestfs_dmesg (g); + if (r == NULL) + return -1; + free (r); + } + return 0; +} + static int test_drop_caches_0 (void) { /* InitEmpty for drop_caches (0) */ @@ -7263,9 +7292,15 @@ int main (int argc, char *argv[]) exit (1); } - nr_tests = 102; + nr_tests = 103; test_num++; + printf ("%3d/%3d test_dmesg_0\n", test_num, nr_tests); + if (test_dmesg_0 () == -1) { + printf ("test_dmesg_0 FAILED\n"); + failed++; + } + test_num++; printf ("%3d/%3d test_drop_caches_0\n", test_num, nr_tests); if (test_drop_caches_0 () == -1) { printf ("test_drop_caches_0 FAILED\n"); -- 1.8.3.1