SSH Execute Command not failed on unexpected exit status

  • FinalBuilder Version: 7.0.0.3319
  • Windows Version: Windows Server 2012 R2 Standard
  • Linux Version: CentOS 6.4

I have an SSH execute command action that execute perl script on CentOS Linux server. The perl script returned with exit code 0 when successful and other positive integers when error occurs.
Hence I configured the action with Expected Exit Status = 0 and Fail on Unexpected Status = True.
However when the script returns 1 or other integers the action still considered as successful.
I can see in the log a line reporting the exit status and the last line says :Attempting to get exit code of last command."
Looks like a bug to me, the "Fail on Unexpected Status" option doesn't seem to be doing what it says it should. Although I noticed that this option is not explained in the Help guide.

/Freji

We’ll look into this, I know when Jason was working on this a while back it’s not easy to achieve but it was working. What shell did you specify on the action?

Hi Vincent,

I tried running perl and shell script, both same behavior. Just have a single line with exit code other than 0 in the script. The command is always considered as exit with 0.

/Freji

On your SSH Connect action, what shell type is selected?

Hi Vincent,

I have tried different shell types with same result.

/Freji

Hi Freji,

Would you be able to send us a short Perl script which simulates the returning of the exit code of 1. The reason I ask for this is to confirm that I am testing exactly what your experiencing.

Thank you.

Hi Jason,

The perl script contains only the following lines:
--------------------------------------
#!/usr/bin/perl -w

print “test run\n”;
exit 1;
--------------------------------------

Hi Freji,

Please find an updated build located here:

http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_3322.exe

Please let us know if this addresses the issues your seeing. The build has passed the test cases we have developed based on your report.

Hi Jason,

I have installed the new build and it looks like it’s working as expected now.

Thank you so much!

/Freji