Testing needed for the new date routines

Geoff Wilson gmwils at ecr.mu.oz.au
Fri Jun 9 07:05:53 UTC 2000


On Thu, Jun 08, 2000 at 01:28:58AM -0700, Russ Allbery wrote:
> CURRENT snapshots have the new date generation routines but they're not
> being used to generate Date headers yet because I want to make sure they
> produce valid results.  So far, I've only tested the code on Solaris.
> 
> I'd love for someone to test the code on a *BSD platform (anything that
> has tm_gmtoff and tm_zone in struct tm).  convdate with the -d flag will
> print out what should be a valid Usenet Date header.  Please follow up to
> the list if you can test on a *BSD and let us know if the results look
> correct.
> 
> On Solaris:
> 
> headwall:~> convdate
> Thu Jun  8 01:22:52 2000
> headwall:~> convdate -d
> Thu, 8 Jun 2000 08:22:54 +0000 (UTC)
> headwall:~> convdate -dl
> Thu, 8 Jun 2000 01:22:56 -0700 (PDT)
> headwall:~> env TZ=Iran ./convdate -dl
> Thu, 8 Jun 2000 11:55:47 +0330 (IST)
> headwall:~> ./convdate "`env TZ=Iran ./convdate -dl`"
> Thu Jun  8 01:27:22 2000
> 
> I've just checked in the modification to convdate that causes it to assume
> the current time if no dates are given on the command line, so it should
> be in tonight's snapshot.  The above commands are a reasonable basic test.
> 
> (Note that Iran is a good test because it's a half-hour time zone and a
> somewhat unusual one; there are several others.  The last test is useful
> because it generates a Date header and then feeds it into parsedate to
> make sure that it parses correctly.)
> 
nntp at mired:/usr/local/apps/inn-2.4/bin > uname -a
FreeBSD mired.zark.thedonkeys.org 3.4-RELEASE FreeBSD 3.4-RELEASE #2: Sun Apr 16 08:57:49 EST 2000 mink at mired.zark.thedonkeys.org:/usr/src/sys/compile/MIRED  i386
nntp at mired:/usr/local/apps/inn-2.4/bin > ./convdate
Fri Jun  9 16:57:26 2000
nntp at mired:/usr/local/apps/inn-2.4/bin > ./convdate -d
Fri, 9 Jun 2000 06:57:44 +0000 (UTC)
nntp at mired:/usr/local/apps/inn-2.4/bin > ./convdate -dl
Fri, 9 Jun 2000 16:57:52 +1000 (EST)
nntp at mired:/usr/local/apps/inn-2.4/bin > env TZ=Asia/Tehran ./convdate -dl
Fri, 9 Jun 2000 11:28:18 +0430 (IRST)
nntp at mired:/usr/local/apps/inn-2.4/bin > ./convdate "`env TZ=Asia/Tehran ./convdate -dl`"
Fri Jun  9 16:58:45 2000
nntp at mired:/usr/local/apps/inn-2.4/bin >


nntp at quirk:~news/bin > uname -a
FreeBSD quirk.zark.thedonkeys.org 3.4-RELEASE FreeBSD 3.4-RELEASE #2: Mon May 15 17:22:49 GMT 2000 root at quirk.zark.thedonkeys.org:/usr/src/sys/compile/QUIRK  i386
nntp at quirk:~news/bin > ./convdate
Fri Jun  9 17:01:10 2000
nntp at quirk:~news/bin > ./convdate -d
Fri, 9 Jun 2000 07:01:15 +0000 (UTC)
nntp at quirk:~news/bin > ./convdate -dl
Fri, 9 Jun 2000 17:01:18 +1000 (EST)
nntp at quirk:~news/bin > env TZ=Asia/Tehran ./convdate -dl
Fri, 9 Jun 2000 11:31:30 +0430 (IRST)
nntp at quirk:~news/bin > ./convdate "`env TZ=Asia/Tehran ./convdate -dl `"
Fri Jun  9 17:01:46 2000
nntp at quirk:~news/bin >

Both running inn-CURRENT-20000608 with the following diff:

diff -ur inn-CURRENT-20000608-base/lib/date.c inn-CURRENT-20000608/lib/date.c
--- inn-CURRENT-20000608-base/lib/date.c	Thu Jun  8 19:00:55 2000
+++ inn-CURRENT-20000608/lib/date.c	Fri Jun  9 15:26:27 2000
@@ -151,7 +151,7 @@
         tz_name = "UTC";
     } else {
 #if HAVE_TM_ZONE
-        tz_name = tm->tm_zone;
+        tz_name = tm.tm_zone;
 #elif HAVE_VAR_TZNAME
         tz_name = tzname[(tm.tm_isdst > 0) ? 1 : 0];
 #else
diff -ur inn-CURRENT-20000608-base/storage/cnfs/cnfs.c inn-CURRENT-20000608/storage/cnfs/cnfs.c
--- inn-CURRENT-20000608-base/storage/cnfs/cnfs.c	Thu Jun  8 19:01:21 2000
+++ inn-CURRENT-20000608/storage/cnfs/cnfs.c	Fri Jun  9 15:33:00 2000
@@ -10,6 +10,7 @@
 #include <syslog.h> 
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <sys/uio.h>
 
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>

----- end diff -----

Geoff

-- 
	a paranoid is just someone with all of the facts at his disposal
		- william seaward burroughs  1914-1997 

Geoff M. Wilson <gmwils at zark.thedonkeys.org>  www.zark.thedonkeys.org/~gmwils



More information about the inn-workers mailing list