dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++dg/dg.exp newbie usage problem


From: dank
Subject: Re: g++dg/dg.exp newbie usage problem
Date: Tue, 09 Jul 2002 09:03:09 -0700

Thanks!  I think I'm going to build a custom rshd, but if
I need to try the ssh trick, I'll keep this in mind.
- Dan

Daniel Jacobowitz wrote:
> 
> On Mon, Jul 08, 2002 at 01:17:13PM -0400, Daniel Jacobowitz wrote:
> > On Mon, Jul 08, 2002 at 10:12:25AM -0700, address@hidden wrote:
> > > ...  Now to figure out how
> > > to get dejagnu to use telnet for remote_exec, or to
> > > figure out how to get redhat to allow rsh logins from
> > > nonprivileged clients.
> >
> > I do this via SSH actually.  Here's the config.  Use a passwordless SSH
> > RSA/DSA key and authorized_hosts to make it log in, and don't be fooled
> > by the references to the gdb testsuite in the below, because it doesn't
> > work without a ton of patches not in this file :P  Just drop this in
> > baseboards/<target>.exp and use --target_board <target>.
> 
> Two more things I noticed about this:
>  - If you drop them in the DejaGNU source tree, which I generally do,
>   then it's baseboards/.  If you put them next to site.exp, it's
>   boards/.
>  - I needed a patch to remote.exp to make SSH quoting work right; I
>   never remembered to send it upstream.  I'm not quite sure it's right,
>   but here it is:
> 
> Index: dejagnu/lib/remote.exp
> ===================================================================
> RCS file: /cvs/src/src/dejagnu/lib/remote.exp,v
> retrieving revision 1.5
> diff -u -p -r1.5 remote.exp
> --- dejagnu/lib/remote.exp      21 Apr 2002 08:47:07 -0000      1.5
> +++ dejagnu/lib/remote.exp      9 Jul 2002 15:48:04 -0000
> @@ -782,7 +782,7 @@ proc remote_raw_spawn { dest commandline
>  #
>  # The default spawn procedure. Uses rsh to connect to $dest.
>  #
> -proc standard_spawn { dest commandline } {
> +proc standard_spawn { dest commandline args } {
>      global board_info
> 
>      if ![board_info $dest exists rsh_prog] {
> @@ -798,7 +798,7 @@ proc standard_spawn { dest commandline }
>      if ![board_info $dest exists username] {
>          set rsh_useropts ""
>      } else {
> -        set rsh_useropts "-l $username"
> +        set rsh_useropts "-l [board_info $dest username]"
>      }
> 
>      if [board_info $dest exists hostname] {
> @@ -807,7 +807,7 @@ proc standard_spawn { dest commandline }
>         set remote $dest;
>      }
> 
> -    spawn $RSH $rsh_useropts $remote $commandline;
> +    spawn "/bin/sh" "-c" "$RSH $rsh_useropts $remote \"$commandline\"";
>      set board_info($dest,fileid) $spawn_id;
>      return $spawn_id;
>  }
> 
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]