Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing quickJS via configmgr #489

Open
wants to merge 11 commits into
base: v3.x/staging
Choose a base branch
from

Conversation

Martin-Zeithaml
Copy link
Contributor

@Martin-Zeithaml Martin-Zeithaml commented Sep 24, 2024

Quick JS test for "zowe" functions.

  1. Run with ./zowe-common-c/build/build_cmgr_xlclang.sh --test
  2. Run from ./zowe-common-c/tests/quickJS/run_test.sh [optional parameter]
/martin/zowe-common-c/tests/quickJS: ./run_test.sh
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("null")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("undefined")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("true")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("false")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("-16")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("0")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("256")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("3.141592")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("999999999")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("["banana","apple","kiwi"]")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("{"success":"guaranteed"}")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("./file, which does not exit")=-1
��/��ʀ�/�%������ǀ���>?�����zos.changeTag("["./file, which does not exit",250000]")=-1
zos.changeTag("["./testLib/hello.txt",0]")=0
zos.changeTag("["./testLib/hello.txt",859]")=0
zos.changeTag("["./testLib/hello.txt",1047]")=0
zos.changeExtAttr("")=-1
zos.changeExtAttr("null")=-1
zos.changeExtAttr("undefined")=-1
zos.changeExtAttr("true")=-1
zos.changeExtAttr("false")=-1
zos.changeExtAttr("-16")=-1
zos.changeExtAttr("0")=-1
zos.changeExtAttr("256")=-1
zos.changeExtAttr("3.141592")=-1
zos.changeExtAttr("999999999")=-1
zos.changeExtAttr("["banana","apple","kiwi"]")=-1
zos.changeExtAttr("{"success":"guaranteed"}")=-1
zos.changeExtAttr("["./testLib/hello.txt",2,true]")=0
zos.changeExtAttr("["./testLib/hello.txt",2,false]")=0
���>���>/%����?ʊ��?>����|��>����/_����/>��/���������Ā��>���?>���/%%�����>�%��/�%������>?�����zos.changeStreamCCSID("-2")=-1
���>���>/%����?ʊ��?>����|��>����/_����/>��/���������Ā��>���?>���/%%�����>�%��/�%������>?�����zos.changeStreamCCSID("-1")=-1
���>���>/%����?ʊ��?>����|��>����/_����/>��/���������Ā��>���?>���/%%�����>�%��/�%������>?�����zos.changeStreamCCSID("999999999")=-1
���>���>/%����?ʊ��?>����|��>����/_����/>��/���������Ā��>���?>���/%%�����>�%��/�%������>?�����zos.changeStreamCCSID("1048576")=-1
zos.zstat("")=[null,129]
zos.zstat("null")=[null,129]
zos.zstat("undefined")=[null,129]
zos.zstat("true")=[null,129]
zos.zstat("false")=[null,129]
zos.zstat("-16")=[null,129]
zos.zstat("0")=[null,129]
zos.zstat("256")=[null,129]
zos.zstat("3.141592")=[null,129]
zos.zstat("999999999")=[null,129]
zos.zstat("["banana","apple","kiwi"]")=[null,129]
zos.zstat("{"success":"guaranteed"}")=[null,129]
zos.zstat("./testLib/hello.txt")=[{"dev":3011,"ino":49434,"mode":50332068,"nlink":1,"uid":110000020,"gid":1,"rdev":0,"size":13,"blocks":1,"atime":1728391513000,"mtime":1728391513000,"ctime":1728391643000,"extattrs":0,"isText":true,"ccsid":1047},0]
zos.zstat("./")=[{"dev":3011,"ino":49426,"mode":16777709,"nlink":4,"uid":110000020,"gid":1,"rdev":0,"size":8192,"blocks":8,"atime":1728391642000,"mtime":1728391513000,"ctime":1728391513000,"extattrs":0,"isText":false,"ccsid":0},0]
zos.zstat("./run_test.sh")=[{"dev":3011,"ino":49432,"mode":50332141,"nlink":1,"uid":110000020,"gid":1,"rdev":0,"size":1056,"blocks":8,"atime":1728391643000,"mtime":1728391513000,"ctime":1728391513000,"extattrs":0,"isText":true,"ccsid":1047},0]
zos.getZosVersion("no parameter")=16974080 [in hex 0x1030100]
zos.getEsms("no parameter")=TSS
zos.dslist("")=null
zos.dslist("null")=null
zos.dslist("undefined")=null
zos.dslist("true")=null
zos.dslist("false")=null
zos.dslist("-16")=null
zos.dslist("0")=null
zos.dslist("256")=null
zos.dslist("3.141592")=null
zos.dslist("999999999")=null
zos.dslist("["banana","apple","kiwi"]")=null
zos.dslist("{"success":"guaranteed"}")=null
zos.dslist("sys1.maclib")=null
zos.dslist("SYS1.PARMLIB")={"datasets":[{"dsn":"SYS1.PARMLIB","entryType":"A"}]}
zos.dslist("SYS1.MACLIB")={"datasets":[{"dsn":"SYS1.MACLIB","entryType":"A"}]}
zos.resolveSymbol("&YYMMDD")=241008 [javascript date -> 241008]
zos.resolveSymbol("")=
zos.resolveSymbol("null")=
zos.resolveSymbol("undefined")=
zos.resolveSymbol("true")=
zos.resolveSymbol("false")=
zos.resolveSymbol("-16")=
zos.resolveSymbol("0")=
zos.resolveSymbol("256")=
zos.resolveSymbol("3.141592")=
zos.resolveSymbol("999999999")=
zos.resolveSymbol("["banana","apple","kiwi"]")=
zos.resolveSymbol("{"success":"guaranteed"}")=
zos.resolveSymbol("YYMMDD")=
zos.resolveSymbol(" &")=
zos.resolveSymbol("["a","b"]")=
zos.resolveSymbol("& UNDEFINED SYMBOL !@#$%^&*()")=& UNDEFINED SYMBOL !@#$%^&*()
zos.getStatvfs("./")=[{"bsize":1024,"blocks":4096080,"bavail":2051071,"fsid":3011,"flag":0,"frsize":1024,"bfree":2051071,"files":4294967295,"ffree":4294923447,"favail":4294923447,"namemax":255,"OEmaxfilesizehw":1023,"OEmaxfilesizelw":-1024,"OEusedspace":2045009,"OEinvarsec":0},0]
zos.getStatvfs("/")=[{"bsize":1024,"blocks":3600,"bavail":3275,"fsid":1,"flag":1,"frsize":1024,"bfree":3275,"files":4294967295,"ffree":4294967243,"favail":4294967243,"namemax":255,"OEmaxfilesizehw":1023,"OEmaxfilesizelw":-1024,"OEusedspace":325,"OEinvarsec":0},0]
zos.getStatvfs("/bin/")=[{"bsize":1024,"blocks":3954960,"bavail":159562,"fsid":170,"flag":1,"frsize":1024,"bfree":159562,"files":4294967295,"ffree":4294940191,"favail":4294940191,"namemax":255,"OEmaxfilesizehw":1023,"OEmaxfilesizelw":-1024,"OEusedspace":3795398,"OEinvarsec":0},0]
zos.getStatvfs("")=129
zos.getStatvfs("null")=129
zos.getStatvfs("undefined")=129
zos.getStatvfs("true")=129
zos.getStatvfs("false")=129
zos.getStatvfs("-16")=129
zos.getStatvfs("0")=129
zos.getStatvfs("256")=129
zos.getStatvfs("3.141592")=129
zos.getStatvfs("999999999")=129
zos.getStatvfs("["banana","apple","kiwi"]")=129
zos.getStatvfs("{"success":"guaranteed"}")=129
zos.getStatvfs("/aaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccc")=129

Time elapsed 66 ms.

------------------------------------------------------
1 error detected in 100 tests, review the test output.
------------------------------------------------------

Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
Copy link
Contributor

@JoeNemo JoeNemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@JoeNemo
Copy link
Contributor

JoeNemo commented Sep 25, 2024

It would be good have this added to automation. @struga0258

Martin-Zeithaml and others added 5 commits September 27, 2024 17:18
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
@Martin-Zeithaml Martin-Zeithaml changed the title [TEST] Testing quickJS via configmgr Testing quickJS via configmgr Oct 8, 2024
Signed-off-by: Martin Zeithaml <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants