bug-dejagnu
[Top][All Lists]
Advanced

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

[Bug-dejagnu] bug in call_remote with multilibs


From: Brendan Conoboy
Subject: [Bug-dejagnu] bug in call_remote with multilibs
Date: Wed, 02 Jun 2004 14:16:23 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

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 (address@hidden)
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"
+           }
        }
     }
 

reply via email to

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