bug in call_remote with multilibs

Brendan Conoboy <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.bugs
Message-ID <[email protected]>
Hiya,

Attached is a patch that removes /.* from $dest in the call_remote 
function of lib/remote.exp.  This is necessary for running tests on 
actual hardware when multilibs are at play.  Consider the following:

Say we're running a test where we've passed to runtest the following flags:

  --target_board fnurp9/-EL/-mwinky

The board description for fnurp9 looks something like this:

load_base_board_description "fnurp"
set board_info($board,netport) "fnurp9.domain.com:9000"
set_board_info rsh_prog ssh
set_board_info hostname resetmaster.domain.com
proc standard_reboot { args } {
         rsh_exec fnurp9 "boardcommand reset fnurp9"
         sleep 15
         return 1;
}

When standard_reboot gets called, dejagnu goes down a maze of twisty 
passages where it eventually lands in call_remote of lib/remote.exp. 
The first thing remote.exp does is rewrite "dest" to the value of 
"name".  Unforunately, "name" is "fnurp9/-EL/-mwinky" instead of just 
fnurp9.  This wreaks havic because things like "rsh_prog" and "hostname" 
are stored under "fnurp9", not "fnurp9/-EL/-mwinky".  My patch strips 
multilib names off the board name, allowing normal execution to proceed.
I've been using this patch for quite a while (as the ChangeLog 
suggests), so it seems rather stable.

Tue Feb 25 05:19:57 UTC 2003  Brendan Conoboy  <blc@@redhat.com>

         * lib/remote.exp (call_remote): Remove multlibs from the board
         name when rebooting a board.

-Brendan ([email protected])

_______________________________________________
Bug-dejagnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-dejagnu
remote.exp.patch (text/x-patch, 645 B)
diff -u -r1.124 -r1.124.2.1
--- remote.exp	24 Nov 2002 12:54:47 -0000	1.124
+++ remote.exp	5 Mar 2003 05:02:49 -0000	1.124.2.1
@@ -447,6 +447,11 @@
 	set dest [board_info $dest name];
     }
 
+    if { $proc == "reboot" } {
+	regsub {/.*} "$dest" "" dest
+	verbose "Changed dest to $dest"
+    }
+
     if { $dest != "host" && $dest != "build" && $dest != "target" } {
 	if { ![board_info $dest exists name] } {
 	    global board;
@@ -455,6 +460,10 @@
 		blooie
 	    }
 	    load_board_description $dest;
+    	    if { $proc == "reboot" } {
+	    	regsub {/.*} "$dest" "" dest
+	    	verbose "Changed dest to $dest"
+    	    }
 	}
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.