Changeset: f277a120089d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f277a120089d
Modified Files:
sql/backends/monet5/UDF/capi/Tests/capi03.sql
sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
sql/backends/monet5/UDF/capi/Tests/capi04.sql
sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
sql/backends/monet5/UDF/capi/Tests/capi10.sql
sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
Branch: jitudf
Log Message:
Make non-deterministic tests deterministic.
diffs (152 lines):
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi03.sql
b/sql/backends/monet5/UDF/capi/Tests/capi03.sql
--- a/sql/backends/monet5/UDF/capi/Tests/capi03.sql
+++ b/sql/backends/monet5/UDF/capi/Tests/capi03.sql
@@ -50,37 +50,3 @@ INSERT INTO integers VALUES (1), (2), (3
SELECT capi03(i) FROM integers;
ROLLBACK;
-
-START TRANSACTION;
-
-# Modify input data
-CREATE FUNCTION capi03(inp INTEGER) RETURNS INTEGER LANGUAGE C {
- size_t i;
- inp.data[0] = 10;
- result->initialize(result, inp.count);
- for(i = 0; i < inp.count; i++) {
- result->data[i] = inp.data[i] * 2;
- }
-};
-
-CREATE TABLE integers(i INTEGER);
-INSERT INTO integers VALUES (1), (2), (3), (4), (5);
-
-SELECT capi03(i) FROM integers;
-
-ROLLBACK;
-
-START TRANSACTION;
-
-# Trigger a segfault
-CREATE FUNCTION capi03(inp INTEGER) RETURNS INTEGER LANGUAGE C {
- int x = *((int*)NULL);
-};
-
-CREATE TABLE integers(i INTEGER);
-INSERT INTO integers VALUES (1), (2), (3), (4), (5);
-
-SELECT capi03(i) FROM integers;
-
-ROLLBACK;
-
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
b/sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
--- a/sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
+++ b/sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
@@ -36,12 +36,6 @@ ERROR = !No data returned.
MAPI = (monetdb) /var/tmp/mtest-2836/.s.monetdb.35915
QUERY = SELECT capi03(i) FROM integers;
ERROR = !Something went wrong!
-MAPI = (monetdb) /var/tmp/mtest-25067/.s.monetdb.39212
-QUERY = SELECT capi03(i) FROM integers;
-ERROR = !Attempting to write to the input or triggered a segfault/bus error
-MAPI = (monetdb) /var/tmp/mtest-25067/.s.monetdb.39212
-QUERY = SELECT capi03(i) FROM integers;
-ERROR = !Attempting to write to the input or triggered a segfault/bus error
# 17:24:55 >
# 17:24:55 > "Done."
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
b/sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
--- a/sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
+++ b/sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
@@ -87,26 +87,6 @@ Ready.
#INSERT INTO integers VALUES (1), (2), (3), (4), (5);
[ 5 ]
#ROLLBACK;
-#START TRANSACTION;
-#CREATE FUNCTION capi03(inp INTEGER) RETURNS INTEGER LANGUAGE C {
-# inp.data[0] = 10;
-# result->initialize(result, inp.count);
-# for(size_t i = 0; i < inp.count; i++) {
-# result->data[i] = inp.data[i] * 2;
-# }
-#};
-#CREATE TABLE integers(i INTEGER);
-#INSERT INTO integers VALUES (1), (2), (3), (4), (5);
-[ 5 ]
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE FUNCTION capi03(inp INTEGER) RETURNS INTEGER LANGUAGE C {
-# int x = *((int*)NULL);
-#};
-#CREATE TABLE integers(i INTEGER);
-#INSERT INTO integers VALUES (1), (2), (3), (4), (5);
-[ 5 ]
-#ROLLBACK;
# 17:24:55 >
# 17:24:55 > "Done."
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi04.sql
b/sql/backends/monet5/UDF/capi/Tests/capi04.sql
--- a/sql/backends/monet5/UDF/capi/Tests/capi04.sql
+++ b/sql/backends/monet5/UDF/capi/Tests/capi04.sql
@@ -25,16 +25,6 @@ SELECT capi04(i) FROM strings;
DROP FUNCTION capi04;
-# try to modify one of the input strings
-CREATE FUNCTION capi04(inp STRING) RETURNS STRING LANGUAGE C {
- size_t i;
- result->initialize(result, inp.count);
- for(i = 0; i < inp.count; i++) {
- result->data[i][0] = 'h';
- }
-};
-
-SELECT capi04(i) FROM strings;
ROLLBACK;
START TRANSACTION;
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
b/sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
--- a/sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
+++ b/sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
@@ -27,9 +27,6 @@ stderr of test 'capi04` in directory 'sq
# 15:50:30 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-20003" "--port=32751"
# 15:50:30 >
-MAPI = (monetdb) /var/tmp/mtest-20003/.s.monetdb.32751
-QUERY = SELECT capi04(i) FROM strings;
-ERROR = !Attempting to write to the input or triggered a segfault/bus error
# 15:50:31 >
# 15:50:31 > "Done."
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi10.sql
b/sql/backends/monet5/UDF/capi/Tests/capi10.sql
--- a/sql/backends/monet5/UDF/capi/Tests/capi10.sql
+++ b/sql/backends/monet5/UDF/capi/Tests/capi10.sql
@@ -31,15 +31,4 @@ SELECT capi10(i) FROM blobs;
DROP FUNCTION capi10;
-# attempt to modify input of blobs
-CREATE FUNCTION capi10(inp BLOB) RETURNS BLOB LANGUAGE C {
- size_t i;
- result->initialize(result, inp.count);
- for(i = 0; i < inp.count; i++) {
- if (inp.data[i].data && inp.data[i].size > 0) {
- ((char*)inp.data[i].data)[0] = 'h';
- }
- }
-};
-SELECT capi10(i) FROM blobs;
ROLLBACK;
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
b/sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
--- a/sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
+++ b/sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
@@ -27,9 +27,6 @@ stderr of test 'capi10` in directory 'sq
# 11:25:01 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-24716" "--port=30547"
# 11:25:01 >
-MAPI = (monetdb) /var/tmp/mtest-81291/.s.monetdb.38148
-QUERY = SELECT capi10(i) FROM blobs;
-ERROR = !Attempting to write to the input or triggered a segfault/bus error
# 11:25:02 >
# 11:25:02 > "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list