|
From: | Jacob Bachmeyer |
Subject: | bug#66984: target_alias variable set incorrectly |
Date: | Tue, 07 Nov 2023 21:15:47 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0 |
Eugene Sharygin wrote:
[...]The reason being the `target_alias` variable, which is initially assigned [1] to an empty string in `runtest.exp`, and which is then supposed to be defaultedto the value of `target_triplet`, with the following code:if {![info exists target_alias]} { set target_alias $target_triplet }
I suspect that this bug went unnoticed for so long because site.exp is supposed to set target_alias, but site.exp can now be optional in some cases.
Of course, `info exists` returns 1 on a variable set to an empty string.My proposed change is simply to omit the initial assignment of `target_alias`, [...]
The main problem I have with that change is that existing code might (incorrectly) depend on target_alias being set to an empty string and I have a better way to fix the problem that avoids that risk of causing breakage: fix the tests to check that target_alias is non-empty instead of merely being set. I have pushed commit a877b418a00dcc3c5b4d7584e0d85949c843c4ed to branch PR66984 on Savannah; please confirm that it solves your problem so I can merge it to master and close the bug report.
-- Jacob
[Prev in Thread] | Current Thread | [Next in Thread] |