Changeset: 14c3f53e58d8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14c3f53e58d8 Added Files: monetdb5/mal/Tests/tracer00.malC Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out monetdb5/mal/Tests/All Branch: gdk_tracer Log Message:
Added tracer00.malC to the test files and removed approved output (was done by hand) diffs (189 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -11252,7 +11252,6 @@ stdout of test 'MAL-signatures` in direc [ "logging", "setcomplevel", "command logging.setcomplevel(comp:int, lvl:int):void ", "TRACERset_component_level;", "Set the log level for a specific component" ] [ "logging", "setflushlevel", "command logging.setflushlevel(lvl:int):void ", "TRACERset_flush_level;", "Set the flush level" ] [ "logging", "setlayerlevel", "command logging.setlayerlevel(layer:int, lvl:int):void ", "TRACERset_layer_level;", "Set the log level for a specific layer" ] -[ "logging", "showinfo", "command logging.showinfo():void ", "TRACERshow_info;", "Show logging levels per component and available layers" ] [ "mal", "manifold", "pattern mal.manifold(mod:str, fcn:str, a:any...):bat[:any] ", "MANIFOLDevaluate;", "" ] [ "mal", "multiplex", "pattern mal.multiplex(mod:str, fcn:str, a:any...):any... ", "MANIFOLDremapMultiplex;", "" ] [ "manual", "functions", "pattern manual.functions() (mod:bat[:str], fcn:bat[:str], sig:bat[:str], adr:bat[:str], com:bat[:str]) ", "MANUALcreateOverview;", "Produces a table with all MAL functions known" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -15654,7 +15654,6 @@ stdout of test 'MAL-signatures` in direc [ "logging", "setcomplevel", "command logging.setcomplevel(comp:int, lvl:int):void ", "TRACERset_component_level;", "Set the log level for a specific component" ] [ "logging", "setflushlevel", "command logging.setflushlevel(lvl:int):void ", "TRACERset_flush_level;", "Set the flush level" ] [ "logging", "setlayerlevel", "command logging.setlayerlevel(layer:int, lvl:int):void ", "TRACERset_layer_level;", "Set the log level for a specific layer" ] -[ "logging", "showinfo", "command logging.showinfo():void ", "TRACERshow_info;", "Show logging levels per component and available layers" ] [ "mal", "manifold", "pattern mal.manifold(mod:str, fcn:str, a:any...):bat[:any] ", "MANIFOLDevaluate;", "" ] [ "mal", "multiplex", "pattern mal.multiplex(mod:str, fcn:str, a:any...):any... ", "MANIFOLDremapMultiplex;", "" ] [ "manual", "functions", "pattern manual.functions() (mod:bat[:str], fcn:bat[:str], sig:bat[:str], adr:bat[:str], com:bat[:str]) ", "MANUALcreateOverview;", "Produces a table with all MAL functions known" ] diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -286,6 +286,7 @@ ssize_t GDKstrFromStr(unsigned char *res str GDKstrdup(const char *s) __attribute__((__warn_unused_result__)); str GDKstrndup(const char *s, size_t n) __attribute__((__warn_unused_result__)); void GDKsyserror(_In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); +void GDKtracerinfo(void); size_t GDKuniqueid(size_t offset); gdk_return GDKupgradevarheap(BAT *b, var_t v, bool copyall, bool mayshare) __attribute__((__warn_unused_result__)); lng GDKusec(void); @@ -1882,7 +1883,6 @@ str TRACERset_adapter(void *ret, int *ad str TRACERset_component_level(void *ret, int *comp, int *lvl); str TRACERset_flush_level(void *ret, int *lvl); str TRACERset_layer_level(void *ret, int *layer, int *lvl); -str TRACERshow_info(void); int TRACEtable(Client cntxt, BAT **r); str TRNglobal_abort(bit *ret); str TRNglobal_commit(bit *ret); diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All --- a/monetdb5/mal/Tests/All +++ b/monetdb5/mal/Tests/All @@ -194,3 +194,6 @@ flowchk dynamicload pithole malids + +# Tracer +tracer00 \ No newline at end of file diff --git a/monetdb5/mal/Tests/tracer00.malC b/monetdb5/mal/Tests/tracer00.malC new file mode 100644 --- /dev/null +++ b/monetdb5/mal/Tests/tracer00.malC @@ -0,0 +1,132 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +# +# Test SQL API for TRACER: +# In some test cases (marked with #WARNING) the argument used is supposed to be +# an enum entry used to count the number of elements (e.g: COMPONENTS_COUNT in +# gdk_tracer.h). Thus, in those cases an error should be raised. However, adding +# new entries to the enum will affect the marked test cases and they won't fail. + + +# logging.setcomplevel(...) +logging.setcomplevel(-1, 1); # Should raise an error + # Component -1 does not exist + +logging.setcomplevel(3, -1); # Should raise an error + # Log level -1 does not exist + +logging.setcomplevel(-10, -1); # Should raise an error + # Component -10 does not exist + # Log level -1 does not exist + +# WARNING +logging.setcomplevel(1, 5); # Should raise an error + # The last level is used for enum count + +# WARNING +logging.setcomplevel(98, 3); # Should raise an error + # The last component is used for enum count + +# WARNING +logging.setcomplevel(98, 5); # Should raise an error + # The last component is used for enum count + # The last level is used for enum count + +logging.setcomplevel(1, 4); # OK + + + +# logging.resetcomplevel(...) +logging.resetcomplevel(-1); # Should raise an error + # Component -1 does not exist + +# WARNING +logging.resetcomplevel(98); # Should raise an error + # The last component is used for enum count + +logging.resetcomplevel(1); # OK + + + +# logging.setlayerlevel(...) +logging.setlayerlevel(-1, 1); # Should raise an error + # Layer -1 does not exist + +logging.setlayerlevel(2, -1); # Should raise an error + # Log level -1 does not exist + +logging.setlayerlevel(-10, -1); # Should raise an error + # Layer -10 does not exist + # Log level -1 does not exist + +# WARNING +logging.setlayerlevel(4, 2); # Should raise an error + # The last layer is used for enum count + +# WARNING +logging.setlayerlevel(1, 5); # Should raise an error + # The last level is used for enum count + +# WARNING +logging.setlayerlevel(4, 5); # Should raise an error + # The last layer is used for enum count + # The last level is used for enum count + +logging.setlayerlevel(1, 2); # OK + + + +# logging.resetlayerlevel(...) +logging.resetlayerlevel(-1); # Should raise an error + # Layer -1 does not exist + +# WARNING +logging.resetlayerlevel(4); # Should raise an error + # The last layer is used for enum count + +logging.resetlayerlevel(1); # OK + + + +# logging.setflushlevel(...) +logging.setflushlevel(-1); # Should raise an error + # Level -1 does not exist + +# WARNING +logging.setflushlevel(5); # Should raise an error + # The last level is used for enum count + +logging.setflushlevel(3); # OK + + + +logging.resetflushlevel(); + + + +# logging.setadapter(...) +logging.setadapter(-1); # Should raise an error + # Adapter -1 does not exist + +# WARNING +logging.setadapter(2); # Should raise an error + # The last adapter is used for enum count + +logging.setadapter(1); # OK + + + +logging.resetadapter(); + + + +# log & flush +logging.log(); +logging.flush(); + + +# Show log levels etc +logging.showinfo(); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list