Re: Remote file exists bug

Ben Elliston <[email protected]> Tue, 12 Jan 2016 10:13:21 +1100
Newsgroups gmane.comp.sysutils.dejagnu.bugs
Message-ID <[email protected]>
Hi Simon

> However, the [ operator does not actually output anything, it
> returns 1 or 0 as its exit code.  So the outcome is always simply
> "exit", which is equivalent to "exit 0", which is always true.  As
> an alternative, I suggest calling the "test" utility (which is
> present on all unixes I know about) and use its exit code directly:

>     set status [remote_exec $dest "test -f $file"]

Great catch!  Your proposed fix looks fine, thanks.

Cheers,
Ben

_______________________________________________
Bug-dejagnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-dejagnu
signature.asc (application/pgp-signature, 811 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBVpQ3EHY2KIi1WYjUAQgK/BAAt5WLp17QVs6WFmd56hNfAk2LduBR/iDV
lv7QtW539OseUWZ6IT9z4Oqy7EjpauRYsz4qwoQACSE7m6Q+OUG9a2Hx06K25boL
wydtC6SaJy5Uf+4T9XcEzr5qlYe7ipHfUAKlZN0qgq8C2muquDmGdu4npBHSlchU
hy1yYpdcRhq5QkcEd0By9nCSSmaRKQMbmF4CQcj+gklV/sACDDYyLjs6/IyzJgy1
GkhJ7NJVtdV/qWxKA4ZkDeWFLpaTeicjMDIqnRdgId/Yrgkr/eol4DGYCzSc2HZd
INbwOp0iFdLfCj72v4WMo8cphRV7P9LNx+SGO2zzsRu3IuQ1BafLe+fZUy+RBPIU
fDlLMi3wJdBeVxI7F2DRw9YBJb1YdAFcKK4svl/KZ+OdETRomoCgrh8pVea4e5MP
Wrr+4mjUPpIKccUNDzenuo4NeVmEWEMbOutk4qgHn7plHwMPGOv2zLdFYBXDQiHW
vuofPbEP10KQoCQ0w85qgjM+8Tg7IcSco0JN/sSh0jQOje/wrTEhhIWERUdBZA26
E1hWAzs1OVr4/Lleg3T/K+IsMagABusOEcDBnPMUeL1lB2HTIjtvccTb9BUKZFFQ
ReA/+YSg3BUoxj48AHSXKSW90ase6spdb7IibTjiwCl0I4KHw48nXfl8iVXgCTuE
9N4+DRxglpo=
=Lq2p
-----END PGP SIGNATURE-----