[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 4/7] OssTest: Add target_cmd_root_rc which returns return code.
Konrad Rzeszutek Wilk writes ("[PATCH v1 4/7] OssTest: Add target_cmd_root_rc which returns return code."): > All the different target_cmd_* end up calling tcmdex > which has the unfortunate side-effect of calling 'die' if > the SSH sessions results in any return code not zero. ... > Also we make tcmd behave in the normal old way (die "status $r") > or if returnrc is set to one, we will return the error code. Why not add the $returnrc argument to tcmdex ? That would mean just adding an extra argument to the callers, rather than extra code. (Also I would call it "$badstatusok" or something.) > -sub target_cmd ($$;$$) { tcmd(undef,undef,'osstest',@_); } > -sub target_cmd_root ($$;$$) { tcmd(undef,undef,'root',@_); } > +sub target_cmd ($$;$$) { tcmd(undef,undef,0, 'osstest',@_); } > +sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } > +sub target_cmd_root_rc ($$;$$) { tcmd(undef,undef,1, 'root',@_); } Can you call this "target_cmd_root_status" please ? Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |