You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Kevin L. M. <kl...@MI...> - 2005-06-04 03:12:13
|
As those of you who subscribe to libevent-cvs may have noticed,
development has picked up a bit. I'm attempting to document every
element of what I'm writing as I go along (which should again be
apparent from the commits ;) I'm also writing test suites as I go
along, and checking coverage with gcov and showcov, the latter being a
simple perl script I wrote to summarize gcov's results in terms of
unexecuted lines. (I'll send you showcov if you want; just drop me a
note...) I have also started committing the HTML documentation (that
commit got lost due to its size) and have added it to the web site, so
that people can look at it and get an idea of what's happening and
development directions. Finally, I'm trying to make a few entries in my
SF diary about what I'm doing with development--though I keep forgetting
to mark the entries public, so people subscribing to my diary may not be
getting emailed notifications like they're expecting to.
I close with the most recent showcov results:
---------------------------------------------------------------------------=
----
event_attr_confpath.c.gcov: source "event_attr_confpath.c"
Unexecuted lines: 39
---------------------------------------------------------------------------
36: ev_init(); /* initialize library... */
37:
38: if (!ea_verify(attr) || !path) /* must be a valid attr */
39> ev_return(EINVAL);
40:
41: oldpath =3D ea_confpath(attr); /* remember old path... */
42:
---------------------------------------------------------------------------
event_attr_destroy.c.gcov: source "event_attr_destroy.c"
Unexecuted lines: 40
---------------------------------------------------------------------------
37: ev_init(); /* initialize the library */
38:
39: if (!ea_verify(attr)) /* must be a valid attr */
40> ev_return(EINVAL);
41:
42: free(*attr); /* release the memory... */
43:
---------------------------------------------------------------------------
event_attr_init.c.gcov: source "event_attr_init.c"
Unexecuted lines: 41, 44
---------------------------------------------------------------------------
38: ev_init(); /* initialize library... */
39:
40: if (!attr) /* gotta have a way to return it, ya know... */
41> ev_return(EINVAL);
42:
43: if (!(tmp =3D (ev_attr_t)malloc(sizeof(_ev_attr_t)))) /*
allocate m...
44> ev_return(ENOMEM);
45:
46: *tmp =3D *_ev_defattr; /* copy default attributes... */
47:
---------------------------------------------------------------------------
event_attr_libpath.c.gcov: source "event_attr_libpath.c"
Unexecuted lines: 39
---------------------------------------------------------------------------
36: ev_init(); /* initialize library... */
37:
38: if (!ea_verify(attr) || !path) /* must be a valid attr */
39> ev_return(EINVAL);
40:
41: oldpath =3D ea_libpath(attr); /* remember old path... */
42:
---------------------------------------------------------------------------
event_attr_modlist.c.gcov: source "event_attr_modlist.c"
Unexecuted lines: 39
---------------------------------------------------------------------------
36: ev_init(); /* initialize library... */
37:
38: if (!ea_verify(attr) || !list) /* must be a valid attr */
39> ev_return(EINVAL);
40:
41: oldlist =3D ea_modlist(attr); /* remember old list... */
42:
---------------------------------------------------------------------------
event_destroy.c.gcov: source "event_destroy.c"
Unexecuted lines: 40
---------------------------------------------------------------------------
37:
38: /* sanity-check the argument... */
39: if (!ec_verify(ctx) || (ec_flags(ctx) & EV_CTX_RUNNING))
40> ev_return(EINVAL);
41:
42: /* destroy the configuration context... */
43: tc_destroy(ec_conf(ctx)); /* never mind the error code... */
---------------------------------------------------------------------------
event_gen_register.c.gcov: source "event_gen_register.c"
Unexecuted lines: 122, 169, 224, 267
---------------------------------------------------------------------------
119:
120: /* allocate the thing... */
121: if (!(gens =3D (ev_gens_t *)malloc(sizeof(ev_gens_t))))
122> ev_return(ENOMEM);
123:
124: /* Now initialize it... */
125: gens->gs_next =3D next; /* initialize list pointers... */
---------------------------------------------------------------------------
166: /* resize the gens... */
167: if (!(gens =3D (ev_gens_t *)realloc(gens, sizeof(ev_gens_t) +
168: sizeof(ev_gendesc_t) *
gens->gs...
169> ev_return(ENOMEM);
170:
171: if (gens->gs_first > desc->gentype) { /* expanding at the
beginni...
172: memmove(&gens->gs_gens[1], &gens->gs_gens[0], /* shift the
arra...
---------------------------------------------------------------------------
221: /* allocate new gens structure... */
222: if (!(new =3D (ev_gens_t *)malloc(sizeof(ev_gens_t) + sizeof
(ev_gen...
223: (gens->gs_count + gens-
>gs_next->...
224> ev_return(ENOMEM);
225:
226: /* initialize it... */
227: new->gs_next =3D gens->gs_next->gs_next; /* taking out *two*
entrie...
---------------------------------------------------------------------------
264: ev_init(); /* make sure library is initialized... */
265:
266: if (!ec_verify(ctx) || gentype =3D=3D EGT_NONE || !genmagic || !
gensize)
267> ev_return(EINVAL); /* sanity-check arguments */
268:
269: desc.gentype =3D gentype; /* initialize the generator
description */
270: desc.genmagic =3D genmagic;
---------------------------------------------------------------------------
event_init.c.gcov: source "event_init.c"
Unexecuted lines: 90, 93, 98, 126
---------------------------------------------------------------------------
87: ev_init(); /* make sure library is initialized... */
88:
89: if (!ctx || (attr && !ea_verify(attr)))
90> ev_return(EINVAL); /* sanity check arguments */
91:
92: if (!attr) /* set default attributes... */
93> attr =3D (const ev_attr_t *)&_ev_defattr;
94:
95: if (prog) /* prepare substitutions... */
96: tu_value(&substs[1]) =3D prog; /* substitute program name...
*/
97: else
98> tu_flags(&substs[1]) |=3D TC_SUBST_IGNORE; /* must ignore
substit...
99:
100: tc_init(ec_conf(ctx)); /* initialize the treeconf... */
101:
---------------------------------------------------------------------------
123: substs, sizeof(substs) / sizeof
(treeconf_subst...
124: ((flags & EV_INIT_SECURE) ?
TC_PATH_SECURE : 0) |
125: TC_PATH_ALL, tc_load, ec_conf(ctx))))
126> goto error;
127:
128: /* Register initial generators */
129: if ((err =3D event_gen_register(ctx, EGT_SOCKET, EV_SOCK_MAGIC,
---------------------------------------------------------------------------
event_log.c.gcov: source "event_log.c"
No unexecuted lines.
--=20
Kevin L. Mitchell <kl...@mi...>
|
|
From: Kevin L. M. <kl...@MI...> - 2004-10-30 04:18:57
|
I just committed treeconf, a simple library for creating and tracking "foo.bar"-style variables. This will be used by libevent for its configuration. I need three basic things to call treeconf done: 1) Create a test program for tc_register(), tc_find(), tc_set(), and tc_get(). Attached to this email is a text file describing what to test along with an almost-pseudocode description of how that testing might proceed. 2) Create a function, tc_load(), to read ini-inspired files. It should have a signature compatible with tc_path()'s callback. (tc_path() is a PATH-traversal function.) '#' is a comment character, blank lines are ignored, variable declarations look like: foo.bar = "value"; (Even if value is numeric, maybe...) C-style \ escapes should be supported, including octal and hex escapes and GCC's \e, but only in double-quoted strings; single-quoted strings translate \'s verbatim. Also supported is line continuation; '\\' followed by '\n' will ignore the '\n' and all following whitespace. Before any '[]' expressions (or after an empty bracket expression), variables are interpreted as relative to the root of the configuration tree; after a '[]' expression, they are interpreted relative to the root of the subtree specified by the expression. Example: foo.bar = "5"; foo.baz = "seven"; [foo] bink = "blah"; [foo/blah] baz = "blarg"; [] foo.qux = "quixotic"; This would set the variable "foo.bar" to "5", "foo.baz" to "seven"; "foo.bink" to "blah"; "foo.blah.baz" to "blarg"; and "foo.qux" to "quixotic". The function is intended to have a signature compatible with treeconf_file_t, i.e., "unsigned int tc_load(char *file, treeconf_ctx_t *ctx)"; this could be passed to tc_path() with a cast. 3) Create a test program for tc_load(). Also attached to this mail is a simple set of m4 macros that will make it easier to extract the test description for test-harness.dat. Usage is: "m4 test-harness.m4 t_file.c"; I believe this is fully m4 compliant, but there is a possibility it may require a GNU version of m4. The next step after completion of libtreeconf will be to define what configuration options libevent may need and how to achieve them using libtreeconf. (I'll put that in a separate, later email :) This email is largely for the archives, but if you want to do it: Just attach a patch in the patch tracker and, thanks! (And yes, you can add yourself to the AUTHORS file if you wish ;) -- Kevin L. Mitchell <kl...@mi...> |