INN commit: trunk/tests/innd (artparse-t.c chan-t.c)
INN Commit
Russ_Allbery at isc.org
Tue Aug 21 19:27:17 UTC 2007
Date: Tuesday, August 21, 2007 @ 12:27:16
Author: iulius
Revision: 7652
Fix the initialization of Path in artparse.t
and the NULL-ending of cp->In.data in chan.t.
Note that the behaviour of In buffers should
be reviewed (the meaning of .used and .left differs).
Modified:
trunk/tests/innd/artparse-t.c
trunk/tests/innd/chan-t.c
--------------+
artparse-t.c | 4 +++-
chan-t.c | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
Modified: artparse-t.c
===================================================================
--- artparse-t.c 2007-08-20 10:28:34 UTC (rev 7651)
+++ artparse-t.c 2007-08-21 19:27:16 UTC (rev 7652)
@@ -94,7 +94,9 @@
if (Log == NULL)
sysdie("Cannot open /dev/null");
fdreserve(4);
- buffer_set(&Path, "", 1);
+ /* ARTsetup needs to have a proper Path. */
+ buffer_set(&Path, "example.com!others", strlen("example.com!others") + 1);
+ Path.used += strlen("example.com!");
ARTsetup();
}
Modified: chan-t.c
===================================================================
--- chan-t.c 2007-08-20 10:28:34 UTC (rev 7651)
+++ chan-t.c 2007-08-21 19:27:16 UTC (rev 7652)
@@ -98,7 +98,10 @@
ok(9, true);
ok_int(10, strlen("some output"), CHANreadtext(cp));
ok_int(11, strlen("some output"), cp->In.used);
- buffer_append(&cp->In, "", 1);
+ /* FIXME: As long as the In buffer does not use the normal meanings of
+ .used and .left, we cannot use buffer_append.
+ buffer_append(&cp->In, "", 1); */
+ memcpy(cp->In.data + cp->In.used, "", 1);
ok_string(12, "some output", cp->In.data);
SCHANwakeup(&Now);
}
More information about the inn-committers
mailing list