Skip to Content.
Sympa Menu

freetds - Re: [freetds] dblib bcp, t0017 broken

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dblib bcp, t0017 broken
  • Date: Mon, 30 Jan 2006 15:59:04 +0100

>
> Just from the distance, it sounds like the unit test found a
> valid weakness.
> Maybe bcp should fflush() or fclose() buffered outputs at a
> transitional
> point where the error checking is important, in the spirit of
> a commit, and
> handle and meaningfully report any error there, including
> unexpected EOF?
> Then, both unit tests and users get the benefit of timely
> error detection,
> while running faster with outputs buffered.
>
> Usually, stderr is usually unbuffered, presumably so you get
> some hint of
> error location in your logs even if, for example, your app
> gets SEGV in the
> middle of something like fprintf(stderr,"Invalid mysub()
> return: %s\n",
> bad_pointer ).
>
> Best regards,
>
> David
>

Hi David,
the problem is not that "unit test found a valid weakness" but that
"unit tests have a weakness". Our library usually do not output anything
(it just communicate any problem to client and is up to client to output
errors or whatever) and log is always fflushed.
The problem with EOF has gone. The problem was that bcp did not detect
normal EOF (reported as error) not the opposite.

bye
Frediano




Archive powered by MHonArc 2.6.24.

Top of Page