Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?
This seems reasonable. If the called program has multiple assertions, perhaps it could push a message onto the queue giving a failure reason. The calling test driver could then pull that message and use it in a failure assertion. This method also has the side benefit of testing the ability to pass back a return code. While you're doing this, it might be a good idea to include a test of using the rexx command on a file that raises a syntax error to make sure the syntax error code shows up as the return code. Rick On Sun, Apr 1, 2012 at 3:30 AM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Commit done for the size of rxcargs. I wanted to add a few tests for syscargs, but I'm not sure of the best way to do that... I need to call an external routine, but I can't use the assert from this external routine (right ?). What i'm thinking to do : Create a file syscargs_test0.rex to test the case 0 args, do the test I want and returns 1 if ok, 0 otherwise. Call this file from a testgroup, assert RC==1. Idem for the case 1 arg, etc... I will do that this evening, unless a better approach is possible ?. Jean-Louis Le 26 mars 2012 01:40, Jean-Louis Faucher jfaucher...@gmail.com a écrit : Commit done, but I see that this declaration rxcargs = pgmThrdInst-NewArray(1); could also be declared with the right size, as done in rexxhide. Several files to fix, nothing urgent, I will do that next WE. Jean-Louis 2012/3/26 Jean-Louis Faucher jfaucher...@gmail.com Hi Mark Ok, I will fix trunk by using the same style of code than Windows, i.e. size 0 or 1. Jean-Louis 2012/3/26 Mark Miesfeld miesf...@gmail.com Hi Jean-Louis, I saw your commit and realized that the unix version of rexx is probably still broken. I checked and it is. You're correct in that the argument array must be of size 0 if there are no arguments. I personally perfer to create the array the correct size, as is done in the Windows version of rexx, rather than create it and then have to expand it. But, your fix in your sandbox is prefectly fine also. I'd say go ahead and fix trunk now. -- Mark Miesfeld On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Hi Tiny fix for unix, works for me. Will apply it in trunk, unless David wants to fix differently. Jean-Louis -- Forwarded message -- From: jfauc...@users.sourceforge.net Date: 2012/3/26 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp To: oorexx-...@lists.sourceforge.net Revision: 7699 http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev Author: jfaucher Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012) Log Message: --- arg()==1 when no arg : fixed by declaring an array of size 0 Modified Paths: -- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp === --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 20:46:25 UTC (rev 7698) +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 22:27:58 UTC (rev 7699) @@ -143,7 +143,8 @@ else { RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL); // configure the traditional single argument string - rxargs = pgmThrdInst-NewArray(1); + // Initial size must be zero, because in CallProgramDispatcher::run, size will be tested, not items + rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed if (argCount 0) { pgmThrdInst-ArrayPut(rxargs, pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-svn mailing list oorexx-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-svn -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?
ok, I will use a queue to pass infos from the external called routine. For the test of RC in case of syntax error, I will add it in RESULT_RC_SIGL.testGroup (if not already tested, did not analyze in details). Thanks. Jean-Louis Le 1 avril 2012 15:37, Rick McGuire object.r...@gmail.com a écrit : This seems reasonable. If the called program has multiple assertions, perhaps it could push a message onto the queue giving a failure reason. The calling test driver could then pull that message and use it in a failure assertion. This method also has the side benefit of testing the ability to pass back a return code. While you're doing this, it might be a good idea to include a test of using the rexx command on a file that raises a syntax error to make sure the syntax error code shows up as the return code. Rick On Sun, Apr 1, 2012 at 3:30 AM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Commit done for the size of rxcargs. I wanted to add a few tests for syscargs, but I'm not sure of the best way to do that... I need to call an external routine, but I can't use the assert from this external routine (right ?). What i'm thinking to do : Create a file syscargs_test0.rex to test the case 0 args, do the test I want and returns 1 if ok, 0 otherwise. Call this file from a testgroup, assert RC==1. Idem for the case 1 arg, etc... I will do that this evening, unless a better approach is possible ?. Jean-Louis Le 26 mars 2012 01:40, Jean-Louis Faucher jfaucher...@gmail.com a écrit : Commit done, but I see that this declaration rxcargs = pgmThrdInst-NewArray(1); could also be declared with the right size, as done in rexxhide. Several files to fix, nothing urgent, I will do that next WE. Jean-Louis 2012/3/26 Jean-Louis Faucher jfaucher...@gmail.com Hi Mark Ok, I will fix trunk by using the same style of code than Windows, i.e. size 0 or 1. Jean-Louis 2012/3/26 Mark Miesfeld miesf...@gmail.com Hi Jean-Louis, I saw your commit and realized that the unix version of rexx is probably still broken. I checked and it is. You're correct in that the argument array must be of size 0 if there are no arguments. I personally perfer to create the array the correct size, as is done in the Windows version of rexx, rather than create it and then have to expand it. But, your fix in your sandbox is prefectly fine also. I'd say go ahead and fix trunk now. -- Mark Miesfeld On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Hi Tiny fix for unix, works for me. Will apply it in trunk, unless David wants to fix differently. Jean-Louis -- Forwarded message -- From: jfauc...@users.sourceforge.net Date: 2012/3/26 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp To: oorexx-...@lists.sourceforge.net Revision: 7699 http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev Author: jfaucher Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012) Log Message: --- arg()==1 when no arg : fixed by declaring an array of size 0 Modified Paths: -- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp === --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 20:46:25 UTC (rev 7698) +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 22:27:58 UTC (rev 7699) @@ -143,7 +143,8 @@ else { RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL); // configure the traditional single argument string -rxargs = pgmThrdInst-NewArray(1); +// Initial size must be zero, because in CallProgramDispatcher::run, size will be tested, not items +rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed if (argCount 0) { pgmThrdInst-ArrayPut(rxargs, pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-svn mailing list oorexx-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-svn -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list
Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?
Hi Mark Ok, I will fix trunk by using the same style of code than Windows, i.e. size 0 or 1. Jean-Louis 2012/3/26 Mark Miesfeld miesf...@gmail.com Hi Jean-Louis, I saw your commit and realized that the unix version of rexx is probably still broken. I checked and it is. You're correct in that the argument array must be of size 0 if there are no arguments. I personally perfer to create the array the correct size, as is done in the Windows version of rexx, rather than create it and then have to expand it. But, your fix in your sandbox is prefectly fine also. I'd say go ahead and fix trunk now. -- Mark Miesfeld On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Hi Tiny fix for unix, works for me. Will apply it in trunk, unless David wants to fix differently. Jean-Louis -- Forwarded message -- From: jfauc...@users.sourceforge.net Date: 2012/3/26 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp To: oorexx-...@lists.sourceforge.net Revision: 7699 http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev Author: jfaucher Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012) Log Message: --- arg()==1 when no arg : fixed by declaring an array of size 0 Modified Paths: -- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp === --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 20:46:25 UTC (rev 7698) +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 22:27:58 UTC (rev 7699) @@ -143,7 +143,8 @@ else { RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL); // configure the traditional single argument string -rxargs = pgmThrdInst-NewArray(1); +// Initial size must be zero, because in CallProgramDispatcher::run, size will be tested, not items +rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed if (argCount 0) { pgmThrdInst-ArrayPut(rxargs, pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-svn mailing list oorexx-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-svn -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?
Commit done, but I see that this declaration rxcargs = pgmThrdInst-NewArray(1); could also be declared with the right size, as done in rexxhide. Several files to fix, nothing urgent, I will do that next WE. Jean-Louis 2012/3/26 Jean-Louis Faucher jfaucher...@gmail.com Hi Mark Ok, I will fix trunk by using the same style of code than Windows, i.e. size 0 or 1. Jean-Louis 2012/3/26 Mark Miesfeld miesf...@gmail.com Hi Jean-Louis, I saw your commit and realized that the unix version of rexx is probably still broken. I checked and it is. You're correct in that the argument array must be of size 0 if there are no arguments. I personally perfer to create the array the correct size, as is done in the Windows version of rexx, rather than create it and then have to expand it. But, your fix in your sandbox is prefectly fine also. I'd say go ahead and fix trunk now. -- Mark Miesfeld On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher jfaucher...@gmail.com wrote: Hi Tiny fix for unix, works for me. Will apply it in trunk, unless David wants to fix differently. Jean-Louis -- Forwarded message -- From: jfauc...@users.sourceforge.net Date: 2012/3/26 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp To: oorexx-...@lists.sourceforge.net Revision: 7699 http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev Author: jfaucher Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012) Log Message: --- arg()==1 when no arg : fixed by declaring an array of size 0 Modified Paths: -- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp === --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 20:46:25 UTC (rev 7698) +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp 2012-03-25 22:27:58 UTC (rev 7699) @@ -143,7 +143,8 @@ else { RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL); // configure the traditional single argument string -rxargs = pgmThrdInst-NewArray(1); +// Initial size must be zero, because in CallProgramDispatcher::run, size will be tested, not items +rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed if (argCount 0) { pgmThrdInst-ArrayPut(rxargs, pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-svn mailing list oorexx-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-svn -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel