[freetds] dblib bcp, t0017 broken
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Mon Jan 30 09:59:04 EST 2006
>
> 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
More information about the FreeTDS
mailing list