pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedTestsuite failing on s390x
5+ messages / 4 participants
[nested] [flat]
* Testsuite failing on s390x
@ 2013-06-12 10:47 Christoph Berg <cb@df7cb.de>
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Berg @ 2013-06-12 10:47 UTC (permalink / raw)
To: pgsql-odbc
Hi,
thanks for the new regression test suite in psqlodbc - I've activated
it for the Debian package.
It runs fine on all architectures except s390x (our 64bit s390 port)
where 3 tests fail:
test sampletables ... ok
test connect ... ok
test stmthandles ... ok
test select ... ok
test getresult ... ok
test prepare ... FAILED
test params ... ok
test notice ... ok
test arraybinding ... FAILED
test insertreturning ... ok
test dataatexecution ... FAILED
test boolsaschar ... ok
test cvtnulldate ... ok
test alter ... ok
regression.diffs:
inline patch 1: /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/prepare.out (+0/-1 lines) download inline-1.patch
*** /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/expected/prepare.out Tue Jun 11 16:17:50 2013
--- /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/prepare.out Tue Jun 11 16:18:42 2013
***************
*** 4,10 ****
Result set:
2 bar
Result set:
- 3 foobar
Result set:
1 @ 1 day one day
2 @ 10 secs ten secs
--- 4,9 ----
======================================================================
inline patch 2: /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/arraybinding.out (+1/-29 lines) download inline-2.patch
*** /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/expected/arraybinding.out Tue Jun 11 16:17:50 2013
--- /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/arraybinding.out Tue Jun 11 16:18:43 2013
***************
*** 1,30 ****
\! ./src/arraybinding-test
! connected
! Parameter Status
! Result set:
! 10000
! Result set:
! 0 columnwise 0
! 1 columnwise 1
! 100 columnwise 100
! 9999 columnwise 9999
! Parameter Status
! Fetching result sets for array bound (5 results expected)
! 1: Result set:
! columnwise 100
! 2: Result set:
! columnwise 101
! 3: Result set:
! columnwise 102
! 4: Result set:
! columnwise 103
! 5: Result set:
! columnwise 104
! Number of rows in table:
! Result set:
! 9995
! Result set:
! 0 columnwise 0
! 1 columnwise 1
! 9999 columnwise 9999
! disconnecting
--- 1,2 ----
\! ./src/arraybinding-test
! Segmentation fault (core dumped)
======================================================================
inline patch 3: /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/dataatexecution.out (+1/-7 lines) download inline-3.patch
*** /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/expected/dataatexecution.out Tue Jun 11 16:17:50 2013
--- /build/buildd-psqlodbc_09.02.0100-1-s390x-d7IBem/psqlodbc-09.02.0100/test/results/dataatexecution.out Tue Jun 11 16:18:43 2013
***************
*** 3,12 ****
Result set:
2
3
! Parameter Status
! Fetching result sets for array bound (2 results expected)
! 1: Result set:
! 4
! 2: Result set:
! 5
! disconnecting
--- 3,6 ----
Result set:
2
3
! unexpected # of rows processed after SQL_NEED_DATA: 0
I can provide backtraces and look into the core, but maybe someone
already knows what the problem is before I dig deeper into it.
Christoph
--
cb@df7cb.de | http://www.df7cb.de/
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Patches: download all (3 files, .tar.gz)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Testsuite failing on s390x
@ 2013-06-12 14:40 Heikki Linnakangas <hlinnakangas@vmware.com>
parent: Christoph Berg <cb@df7cb.de>
1 sibling, 1 reply; 5+ messages in thread
From: Heikki Linnakangas @ 2013-06-12 14:40 UTC (permalink / raw)
To: Christoph Berg <cb@df7cb.de>; +Cc: pgsql-odbc
On 12.06.2013 13:47, Christoph Berg wrote:
> thanks for the new regression test suite in psqlodbc - I've activated
> it for the Debian package.
>
> It runs fine on all architectures except s390x (our 64bit s390 port)
> where 3 tests fail:
>
> test sampletables ... ok
> test connect ... ok
> test stmthandles ... ok
> test select ... ok
> test getresult ... ok
> test prepare ... FAILED
> test params ... ok
> test notice ... ok
> test arraybinding ... FAILED
> test insertreturning ... ok
> test dataatexecution ... FAILED
> test boolsaschar ... ok
> test cvtnulldate ... ok
> test alter ... ok
>
> ...
>
> I can provide backtraces and look into the core, but maybe someone
> already knows what the problem is before I dig deeper into it.
Nope, dunno what's going on. I suspect the prepare test might be failing
because of some mismatch between integer types. It's binding a parameter
as SQL_C_SLONG, which means it's passed as a C variable with "signed
long int" type. Maybe that behaves funnily on s390x.
Backtraces would be helpful. Or if you can give me access to a box
running debian on s390x, I can log in and take a look myself.
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Testsuite failing on s390x
@ 2013-06-12 14:49 Tom Lane <tgl@sss.pgh.pa.us>
parent: Heikki Linnakangas <hlinnakangas@vmware.com>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2013-06-12 14:49 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: Christoph Berg <cb@df7cb.de>; pgsql-odbc
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> Nope, dunno what's going on. I suspect the prepare test might be failing
> because of some mismatch between integer types. It's binding a parameter
> as SQL_C_SLONG, which means it's passed as a C variable with "signed
> long int" type. Maybe that behaves funnily on s390x.
Remember that s390 is big-endian, so integer width mismatches are more
likely to be exposed than they are on Intel hardware. For instance,
passing a long by-reference to an integer parameter will work fine on
x86_64 and not so fine on s390x.
regards, tom lane
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Testsuite failing on s390x
@ 2013-06-12 14:51 Hiroshi Inoue <inoue@tpf.co.jp>
parent: Christoph Berg <cb@df7cb.de>
1 sibling, 1 reply; 5+ messages in thread
From: Hiroshi Inoue @ 2013-06-12 14:51 UTC (permalink / raw)
To: Christoph Berg <cb@df7cb.de>; pgsql-odbc
Hi Christoph,
(2013/06/12 19:47), Christoph Berg wrote:
> Hi,
>
> thanks for the new regression test suite in psqlodbc - I've activated
> it for the Debian package.
>
> It runs fine on all architectures except s390x (our 64bit s390 port)
> where 3 tests fail:
>
> test sampletables ... ok
> test connect ... ok
> test stmthandles ... ok
> test select ... ok
> test getresult ... ok
> test prepare ... FAILED
> test params ... ok
> test notice ... ok
> test arraybinding ... FAILED
> test insertreturning ... ok
> test dataatexecution ... FAILED
> test boolsaschar ... ok
> test cvtnulldate ... ok
> test alter ... ok
Thanks for the report.
Could you please try the attached patch?
The patch changes both the driver and testsuite.
regard,
Hiroshsi Inoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
testsuite.patch (text/x-patch, 2.1K) download
diff --git a/descriptor.h b/descriptor.h
index d90bd4e..f367311 100644
--- a/descriptor.h
+++ b/descriptor.h
@@ -210,11 +210,7 @@ struct IRDFields_
struct IPDFields_
{
-#if (ODBCVER >= 0x0300)
- SQLUINTEGER *param_processed_ptr;
-#else
- SQLULEN *param_processed_ptr; /* SQLParamOptions */
-#endif /* ODBCVER */
+ SQLULEN *param_processed_ptr;
SQLUSMALLINT *param_status_ptr;
SQLSMALLINT allocated;
ParameterImplClass *parameters;
diff --git a/pgapi30.c b/pgapi30.c
index 25e8963..a057e59 100644
--- a/pgapi30.c
+++ b/pgapi30.c
@@ -825,7 +825,7 @@ IPDSetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
ipdopts->param_status_ptr = (SQLUSMALLINT *) Value;
return ret;
case SQL_DESC_ROWS_PROCESSED_PTR:
- ipdopts->param_processed_ptr = (SQLUINTEGER *) Value;
+ ipdopts->param_processed_ptr = (SQLULEN *) Value;
return ret;
case SQL_DESC_COUNT:
parameter_ibindings_set(ipdopts, CAST_PTR(SQLSMALLINT, Value), FALSE);
@@ -1545,7 +1545,7 @@ PGAPI_GetStmtAttr(HSTMT StatementHandle,
len = sizeof(SQLPOINTER);
break;
case SQL_ATTR_PARAMS_PROCESSED_PTR: /* 21 */
- *((SQLUINTEGER **) Value) = (SQLUINTEGER *) SC_get_IPDF(stmt)->param_processed_ptr;
+ *((SQLULEN **) Value) = (SQLULEN *) SC_get_IPDF(stmt)->param_processed_ptr;
len = sizeof(SQLPOINTER);
break;
case SQL_ATTR_PARAMSET_SIZE: /* 22 */
@@ -1906,7 +1906,7 @@ inolog("set ard=%p\n", stmt->ard);
SC_get_IPDF(stmt)->param_status_ptr = (SQLUSMALLINT *) Value;
break;
case SQL_ATTR_PARAMS_PROCESSED_PTR: /* 21 */
- SC_get_IPDF(stmt)->param_processed_ptr = (SQLUINTEGER *) Value;
+ SC_get_IPDF(stmt)->param_processed_ptr = (SQLULEN *) Value;
break;
case SQL_ATTR_PARAMSET_SIZE: /* 22 */
SC_get_APDF(stmt)->paramset_size = CAST_UPTR(SQLUINTEGER, Value);
diff --git a/test/src/prepare-test.c b/test/src/prepare-test.c
index c6d618a..4596acb 100644
--- a/test/src/prepare-test.c
+++ b/test/src/prepare-test.c
@@ -9,7 +9,7 @@ int main(int argc, char **argv)
HSTMT hstmt = SQL_NULL_HSTMT;
char *param1;
SQLLEN cbParam1;
- long longparam;
+ SQLINTEGER longparam;
SQL_INTERVAL_STRUCT intervalparam;
SQLSMALLINT colcount;
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Testsuite failing on s390x
@ 2013-06-13 12:54 Christoph Berg <cb@df7cb.de>
parent: Hiroshi Inoue <inoue@tpf.co.jp>
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Berg @ 2013-06-13 12:54 UTC (permalink / raw)
To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc
Re: Hiroshi Inoue 2013-06-12 <51B88B07.8070007@tpf.co.jp>
> Thanks for the report.
> Could you please try the attached patch?
> The patch changes both the driver and testsuite.
The patch fixed all the problems, thanks!
Btw, lots of files in the current release tarball seem to have dos
line endings which broke the testsuite, I've recoded them for Debian,
but it would be nice if the next tarball was clean.
Also, test/src/common.o is not cleaned by the Makefile in test/.
(And as a minor nitpick "make installcheck" should imho rather be
"make check" because it doesn't install anything.)
Christoph
--
cb@df7cb.de | http://www.df7cb.de/
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2013-06-13 12:54 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12 10:47 Testsuite failing on s390x Christoph Berg <cb@df7cb.de>
2013-06-12 14:40 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-06-12 14:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-06-12 14:51 ` Hiroshi Inoue <inoue@tpf.co.jp>
2013-06-13 12:54 ` Christoph Berg <cb@df7cb.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox