[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for config/sim.exp
From: |
Richard Sandiford |
Subject: |
Re: Fix for config/sim.exp |
Date: |
Sat, 15 Feb 2014 10:01:10 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
"Steve Ellcey " <address@hidden> writes:
> While looking at some GCC testsuite failures that were occuring while
> testing with the qemu simulator I ran into a problem that I believe is
> due to a missing override of sim_exec in config/sim.exp.
>
> Basically the script in GCC (gcc/testsuite/lib/profopt.exp) was running:
>
> remote_file build delete $execname1
>
> to remove a file and this was being translated into a rsh/ssh command
> to my simulator baseboard as if it was a remote system. After some
> false leads I now believe that the problem is that config/sim.exp has
> overrides for load, upload, and download, but no override for exec.
>
> I made this patch to my dejagnu and now things are working, can this
> patch be checked in to the dejagnu source tree?
I agree that's probably safe in practice, but it seems a bit odd for
sim_exec to execute host binaries rather than target binaries. The comment
for remote_exec says:
# Execute the supplied program on HOSTNAME.
which leaves it a bit vague as to what "supplied" means. standard_file
uses it with /bin commands, but if any harnesses are building the program
for the board themselves then running on the host won't work for many
simulator setups. I suppose it'd be OK for qemu though thanks to misc
binary support.
Maybe a safer fix would be to provide sim_file instead. Untested patch below.
Of course, that leaves remote_exec broken, but if it gets called and fails
in other contexts then maybe it'd be clearer then whether to use host
execution or to split out most of sim_load into sim_exec.
Thanks,
Richard
sim-file.diff
Description: Text Data