Skip to Content.
Sympa Menu

freetds - Re: [freetds] Kerberos delegation question, and Solaris 10 x86 problems in unittests

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Kerberos delegation question, and Solaris 10 x86 problems in unittests
  • Date: Thu, 16 Sep 2010 10:01:33 +0200

2010/9/15 Peter C. Norton <spacey-freetds.org AT ssr.com>

> Greetings lists,
>
>
... omissis ...

Second, we've found that under some circumstances, there are now 2
> tests that fail under Solaris 10 x86.
>
> Test #1 is in src/dblib/unittests/done_handling.c:err_handler. The fix is:
>
> diff -r 0de86646fcd3 src/dblib/unittests/done_handling.c
> --- a/src/dblib/unittests/done_handling.c Tue Sep 14 15:57:39 2010
> -0400
> +++ b/src/dblib/unittests/done_handling.c Wed Sep 15 11:00:02 2010
> -0400
> @@ -221,8 +221,14 @@
> fflush(stdout);
> fprintf(stderr, "DB-Library error (severity %d):\n\t%s\n", severity,
> dberrstr);
>
> - if (oserr != DBNOERR)
> - fprintf(stderr, "Operating-system error:\n\t%s\n",
> oserrstr);
> + if (oserr != DBNOERR) {
> + if (oserrstr != NULL) {
> + fprintf(stderr, "Operating-system error:\n\t%s\n",
> oserrstr);
> + } else {
> + fprintf(stderr, "Operating-system error, NULL error
> string (probable bogon in the test)\n", oserrstr);
> + }
> +
> + }
> fflush(stderr);
>
> return INT_CANCEL;
>
> it seems that on recent updates to Solaris 10, if oserrstr is NULL,
> the test will segfault. In prior updates to the OS, this test passed.
> The man page for fprintf only specifies that passing in a non-null
> terminated pointer to the *printf calls will result in "unspecified
> behavior", while it seems like on linux, glibc will protect the caller
> by printing something like (null).
>
>
Yes, fix is fine, I think in this case test is broken, not library although
I cannot grant there is similar problem in library (mainly in dump code).


> Test #2 is in src/ctlib/unittests/cancel.c. I don't have a fix at the
> moment, and I don't know if the failure is of an OS-specific nature,
> but this one actually bothers me more because it seems like the
> expected behavior of setting a SIGALARM handler isn't working properly:
>
> ~/work/freetds-0.83.dev.20100902/src/ctlib/unittests $ ./cancel
> cancel.c: Check asynchronous called ct_cancel()
> connecting as sa to SYBQA1.tempdb
> SYBQA1 Message 5704 severity 10 state 1 line 0:
> "Changed client character set setting to 'iso_1'.
> "
> Changed database context to 'master'.
>
> Changed database context to 'tempdb'.
>
> More results?...
> do_fetch retrieved 10000 rows
> do_fetch() returned: 0
> More results?...
> All rows read, this may not occur.
>
> I expect this to match the output at
> http://freetds.sourceforge.net/up/out82/test3/ctlib_cancel.1.html,
> which it doesnt :(
>
>
Mmm.... perhaps your system is too fast... test set an alarm condition than
try to send a cancel in signal handler (I don't remember where but I found
this specification and I wrote the test). Try replacing 100000 value (micro
seconds) with something smaller.


> I'm able to tests out any suggestions for the next few days.
>
> Thanks,
>
> -Peter
>
>
bye
freddy77




Archive powered by MHonArc 2.6.24.

Top of Page