cdb self-tests, was Re: GCC 3.2 errors

"clemens fischer" <[email protected]> 27 Jul 2003 14:03:26 +0200
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
* Chris Wilkes:

> On Sun, Jul 27, 2003 at 01:56:51AM +0800, Neo Wee Teck wrote:
>> Anyone have the problem compiling cdb with GCC 3.2?
>
> It would be helpful if you posted your error messages.

... and the operating system!  which you "forgot" as well.  especially
as this topic may well be related to the OS used.

> Which fixes that compile problem.  However doing the automatic test as
> described on DJB's webpage
>   http://cr.yp.to/cdb/install.html
>   # ./rts > rts.out
>   # cmp rts.out rts.exp
>     rts.out rts.exp differ: byte 3670, line 202
>
> Line 202 in my rts.out is
>   --- cdbmake handles nomem
>   cdbmake: fatal: unable to read input: bad format
>   111
> When it should be this from rts.exp
>   cdbmake: fatal: unable to create test.tmp: out of memory
>
> Looking at rts.tests that test is:
>   echo '--- cdbmake handles nomem'
>   csh -cf 'repeat 5000 echo "+3,5:one->Hello"' \
>   | softlimit -d 50000 cdbmake test.cdb test.tmp
>   echo $?

i'm running freebsd-4.8 and have frequently experienced problems with
automatic test-procedures, which tend to be linux-centric.  since the
test-case here is memory consumption, you should lower the softlimit
in rts.tests.  also, i'd try to surround the csh(1) command with
double quotes and the inner echo argument for cdb with single quotes,
in case there's some misunderstanding on cshs part of what constitutes
shell-metacharacters:

  csh -cf "repeat 5000 echo '+3,5:one->Hello'" | softlimit ...

  clemens