[ 
https://issues.apache.org/jira/browse/BIGTOP-1316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031201#comment-14031201
 ] 

jay vyas commented on BIGTOP-1316:
----------------------------------

Thanks [[email protected]] .  

Two quesitons:  Partially due to my ignorance ;

* But what about exit -2, and so on ?    I think 255 is idiomatic for when 
another program uses an "out-of-range" exit value, so actually exit -1 *should* 
normally be mapped to 255, not -1.  

* I really like the idea of dumping logs on failure... even when trace isnt 
enabled.  That will make tests results easier to debug.  So -- shall we merge 
the logic in the existing Shell constructor
 {noformat} 
 97     if (LOG.isTraceEnabled()) {
 98         if (ret != 0) {
 99            LOG.trace("return: $ret");
100         }
101         if (out.size() != 0) {
102            LOG.trace("\n<stdout>\n${out.join('\n')}\n</stdout>");
103         }
104         if (err.size() != 0) {
105            LOG.trace("\n<stderr>\n${err.join('\n')}\n</stderr>");
{noformat} 

with yours ?  



> enhance Shell for better checking of return code & output logging
> -----------------------------------------------------------------
>
>                 Key: BIGTOP-1316
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1316
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 0.8.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: BIGTOP-1316-001.patch
>
>
> for the slider tests, we extended Shell with 
> [SliderShellhttps://svn.apache.org/viewvc/incubator/slider/trunk/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy?view=markup],
>  adding some more features. Some of those are biased towards executing our 
> entry point, but there are some useful core features worth pulling up to the 
> base class
> # {{toString()}} and {{dump()}} methods with diagnostics
> # return code sign correction and assertion checking
> # construction of bash environment and command lines
> The bash setup could be done with a class {{Bash extends Shell}} which is 
> designed purely for bash execution



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to