Changeset: 0e03f7e9565e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0e03f7e9565e Added Files: monetdb5/mal/Tests/tst830.mal monetdb5/mal/Tests/tst900.malC monetdb5/mal/Tests/tst901.malC monetdb5/mal/Tests/tst902.malC monetdb5/mal/Tests/tst903.malC monetdb5/mal/Tests/tst904.malC monetdb5/mal/Tests/tst905.malC monetdb5/mal/Tests/tst906.malC monetdb5/mal/Tests/tst907.malC monetdb5/mal/Tests/tst908.malC monetdb5/mal/Tests/tst911.malC monetdb5/mal/Tests/tst912.malC monetdb5/mal/Tests/tst913.malC monetdb5/mal/Tests/tst920.malC monetdb5/mal/Tests/tst960.malC Removed Files: monetdb5/mal/Tests/tst830.malC monetdb5/mal/Tests/tst900.mal Modified Files: monetdb5/mal/Tests/All monetdb5/mal/Tests/tst400e.stable.out monetdb5/mal/Tests/tst804.stable.err monetdb5/mal/Tests/tst830.stable.out monetdb5/mal/Tests/tst850.stable.out monetdb5/mal/Tests/tst901.stable.out monetdb5/mal/Tests/tst902.stable.out monetdb5/mal/Tests/tst904.stable.out monetdb5/mal/Tests/tst905.stable.out monetdb5/mal/Tests/tst906.stable.out monetdb5/mal/Tests/tst907.stable.out monetdb5/mal/Tests/tst908.stable.out monetdb5/mal/Tests/tst911.stable.out monetdb5/mal/Tests/tst912.stable.out monetdb5/mal/Tests/tst913.stable.out monetdb5/mal/Tests/tst920.stable.out monetdb5/mal/Tests/tst960.stable.out Branch: default Log Message:
MAL test revamping diffs (truncated from 1424 to 300 lines): diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All --- a/monetdb5/mal/Tests/All +++ b/monetdb5/mal/Tests/All @@ -170,7 +170,7 @@ tst802 tst804 tst810 tst819 -tst830 +#tst830 tst840 tst850 tst866 diff --git a/monetdb5/mal/Tests/tst400e.stable.out b/monetdb5/mal/Tests/tst400e.stable.out --- a/monetdb5/mal/Tests/tst400e.stable.out +++ b/monetdb5/mal/Tests/tst400e.stable.out @@ -5,32 +5,31 @@ stdout of test 'tst400e` in directory 'm # 07:48:32 > Mtimeout -timeout 60 mserver5 "--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set "monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set "sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set "xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set mapi_port=36666 --set xrpc_port=40130 --set monet_prompt= --trace --dbname=mTests_src_mal tst400e.mal # 07:48:32 > -# MonetDB Server v5.0.0_beta2_1 -# Copyright (c) 1993-2007 CWI, all rights reserved -# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked -# dbname:mTests_src_mal -# Visit http://monetdb.cwi.nl/ for further information -## simple test of a function call -## performance evaluation, how expensive are 100k calls? -# -#function simple(z:lng):lng; -# z:= z+1:lng; -# return z; -#end simple; -function user.simple(z:lng):lng; - z := calc.+(z,1:lng); - return simple := z; -end user.simple; -function user.main():void; -# simple test of a function call -# performance evaluation, how expensive are 100k calls? - k := 0:lng; -barrier v := calc.<(k,1000000:lng); - k := user.simple(k); - redo v := calc.<(k,1000000:lng); -exit v; - io.print(k); -end user.main; +# MonetDB 5 server v11.22.0 +# This is an unreleased version +# Serving database 'mTests_monetdb5_mal', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 15.589 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:39098/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-27487/.s.monetdb.39098 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Start reading the write-ahead log 'sql_logs/sql/log.4' +# Finished reading the write-ahead log 'sql_logs/sql/log.4' +# Finished processing logs sql/sql_logs +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. + +# 22:15:39 > +# 22:15:39 > "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-27487" "--port=39098" +# 22:15:39 > + +#io.print(k); [ 1000000 ] # 07:48:33 > diff --git a/monetdb5/mal/Tests/tst804.stable.err b/monetdb5/mal/Tests/tst804.stable.err --- a/monetdb5/mal/Tests/tst804.stable.err +++ b/monetdb5/mal/Tests/tst804.stable.err @@ -30,18 +30,19 @@ stderr of test 'tst804` in directory 'mo # 15:26:53 > "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-30489" "--port=34680" # 15:26:53 > -MAPI = (monetdb) /var/tmp/mtest-30489/.s.monetdb.34680 +MAPI = (monetdb) /var/tmp/mtest-12593/.s.monetdb.34923 QUERY = function wrong.message():void; - +ERROR = !SyntaxException:parseError:function wrong.message():void; !SyntaxException:parseError: ^<module> name not defined !SyntaxException:parseError: !';' expected -MAPI = (monetdb) /var/tmp/mtest-30489/.s.monetdb.34680 +MAPI = (monetdb) /var/tmp/mtest-12593/.s.monetdb.34923 QUERY = end message; - +ERROR = !SyntaxException:parseError:end message; !SyntaxException:parseError: ^non matching end label -MAPI = (monetdb) /var/tmp/mtest-30489/.s.monetdb.34680 +MAPI = (monetdb) /var/tmp/mtest-12593/.s.monetdb.34923 QUERY = end foo; +ERROR = !TypeException:user.foo[1]:'wrong.message' undefined in: wrong.message(); # 15:26:53 > diff --git a/monetdb5/mal/Tests/tst830.malC b/monetdb5/mal/Tests/tst830.mal rename from monetdb5/mal/Tests/tst830.malC rename to monetdb5/mal/Tests/tst830.mal diff --git a/monetdb5/mal/Tests/tst830.stable.out b/monetdb5/mal/Tests/tst830.stable.out --- a/monetdb5/mal/Tests/tst830.stable.out +++ b/monetdb5/mal/Tests/tst830.stable.out @@ -19,15 +19,64 @@ stdout of test 'tst830` in directory 'mo # Finished reading the write-ahead log 'sql_logs/sql/log.4' # Finished processing logs sql/sql_logs # MonetDB/SQL module loaded -# MonetDB/R module loaded - -Ready. - -# 12:52:19 > -# 12:52:19 > "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-13998" "--port=37997" -# 12:52:19 > - -#user.foo(); +function user.foo():void; + pw := clients.backendsum("Pmonetdb"); + id := clients.addUser("monetdb",pw); +catch MALException:str; + io.printf("%s\n",MALException); +exit MALException:str; +# should print 1@0 or something + id := clients.addUser("test",pw); + io.print(id); +# this should work also + id := clients.addUser("checkpoint",pw); + io.print(id); +# do a simple listing of users known + (u,n) := clients.getUsers(); + io.print(u,n); +# should work, we're the admin here + clients.removeUser("checkpoint"); +# do a simple listing of users known + (u,n) := clients.getUsers(); + io.print(u,n); +# forcefully set the password of the user test + clients.setPassword("test",pw); +# now try to set the password for ourself, should fail + clients.setPassword("monetdb",pw); +catch InvalidCredentialsException:str; + io.printf("%s\n",InvalidCredentialsException); +exit InvalidCredentialsException:str; +# change our own password + mypw := clients.backendsum("monetdb"); + clients.changePassword(mypw,pw); +# try it again, should fail... + clients.changePassword(mypw,pw); +catch InvalidCredentialsException:str; + io.printf("%s\n",InvalidCredentialsException); + InvalidCredentialsException:str := nil:str; +exit InvalidCredentialsException:str; +# all should fail + clients.checkPermission("monetdb","Pmonetdb"); +catch InvalidCredentialsException:str; + io.printf("%s\n",InvalidCredentialsException); + InvalidCredentialsException:str := nil:str; +exit InvalidCredentialsException:str; + clients.checkPermission("monetdb","x"); +catch InvalidCredentialsException:str; + io.printf("%s\n",InvalidCredentialsException); + InvalidCredentialsException:str := nil:str; +exit InvalidCredentialsException:str; + clients.checkPermission("x","Pmonetdb"); +catch InvalidCredentialsException:str; + io.printf("%s\n",InvalidCredentialsException); + InvalidCredentialsException:str := nil:str; +exit InvalidCredentialsException:str; +end user.foo; +function user.main():void; +# a simple functional test for the access control table +# this should fail, the monetdb user is already there + user.foo(); +end user.main; MALException:addUser:user 'monetdb' already exists [ 1@0 ] [ 2@0 ] diff --git a/monetdb5/mal/Tests/tst850.stable.out b/monetdb5/mal/Tests/tst850.stable.out --- a/monetdb5/mal/Tests/tst850.stable.out +++ b/monetdb5/mal/Tests/tst850.stable.out @@ -33,13 +33,13 @@ Ready. #--------------------------# # h t # name # void str # type -#-------------------------# -[ 0@0, "hello world" ] -[ 1@0, "sleep well" ] -#-----------------# -# h tmp_5 # name -# int bit # type -#-----------------# +#--------------------------# +[ 0@0, "#hello world" ] +[ 1@0, "#sleep well" ] +#--------------------------# +# h t # name +# void bit # type +#--------------------------# [ 0@0, true ] [ 1@0, true ] diff --git a/monetdb5/mal/Tests/tst900.mal b/monetdb5/mal/Tests/tst900.malC rename from monetdb5/mal/Tests/tst900.mal rename to monetdb5/mal/Tests/tst900.malC --- a/monetdb5/mal/Tests/tst900.mal +++ b/monetdb5/mal/Tests/tst900.malC @@ -1,6 +1,9 @@ # the multiplex code blocks. Testing syntax errors +function foo(); b:= bat.new(:lng,:lng); x:= multiplex.+(b,b); d:= [+](b,c) ;;# parser bug a:= b [+] b; +end; +user.foo(); diff --git a/monetdb5/mal/Tests/tst901.malC b/monetdb5/mal/Tests/tst901.malC new file mode 100644 --- /dev/null +++ b/monetdb5/mal/Tests/tst901.malC @@ -0,0 +1,24 @@ +# the multiplex code blocks. + +function foo(); +b:= bat.new(:oid,:int); +barrier i:= 0:int; + bat.append(b,i); + redo i:= iterator.next(1:int,10:int); +exit i; +c:= algebra.copy(b); +io.print(c); +x:= batcalc.+(b,c); +io.print(x); +x:= batcalc.+(b,1:int); +io.print(x); +x:= batcalc.*(b,c); +io.print(x); +y:= batcalc.==(b,b); +io.print(y); +y:= batcalc.==(b,x); +io.print(y); +z:= batcalc.not(y); +io.print(z); +end; +user.foo(); diff --git a/monetdb5/mal/Tests/tst901.stable.out b/monetdb5/mal/Tests/tst901.stable.out --- a/monetdb5/mal/Tests/tst901.stable.out +++ b/monetdb5/mal/Tests/tst901.stable.out @@ -21,28 +21,15 @@ stdout of test 'tst901` in directory 'mo # Finished reading the write-ahead log 'sql_logs/sql/log.4' # Finished processing logs sql/sql_logs # MonetDB/SQL module loaded -function user.main():void; -# the multiplex code blocks. - b := bat.new(:oid,:int); -barrier i := 0:int; - bat.append(b,i); - redo i := iterator.next(1:int,10:int); -exit i; - c := algebra.copy(b); - io.print(c); - x := batcalc.+(b,c); - io.print(x); - x := batcalc.+(b,1:int); - io.print(x); - x := batcalc.*(b,c); - io.print(x); - y := batcalc.==(b,b); - io.print(y); - y := batcalc.==(b,x); - io.print(y); - z := batcalc.not(y); - io.print(z); -end user.main; +# MonetDB/R module loaded + +Ready. + +# 22:45:31 > +# 22:45:31 > "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-7101" "--port=34631" +# 22:45:31 > + +#user.foo(); #--------------------------# # h t # name # oid int # type diff --git a/monetdb5/mal/Tests/tst902.malC b/monetdb5/mal/Tests/tst902.malC new file mode 100644 --- /dev/null +++ b/monetdb5/mal/Tests/tst902.malC @@ -0,0 +1,24 @@ +# what is the overhead of MAL in multiplex situations +# using a BATloop !! This is 40x slower as the V4.3 multiplex implementation +function foo(); +b:= bat.new(:oid,:lng); +barrier v:= 0:lng; _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
