On Fri, Mar 01, 2019 at 06:07:57PM +0100, Jakub Jelinek wrote: > On Fri, Mar 01, 2019 at 05:02:58PM +0000, Segher Boessenkool wrote: > > This adds an option -mdejagnu-cpu=. This option simply overrides what > > is given in -mcpu=. The reason for this is that with older versions > > of DejaGnu the value given in the RUNTESTFLAGS will override the value > > a testcase wants to have. > > Ugh, that is ugly.
Hey, it's a nice improvement over what we have had for years already. > Can't we just detect the old dejagnu and override > whatever tcl method is responsible for that? Not sure. We probably could. But are the new semantics actually better? Sometimes you want the testcase flags to override the RUNTESTFLAGS, but just as often you don't. So now older dejagnu versions have one behaviour (and we will see those for very many years still, certainly on Power, where we mostly use slow^Wold^Wenterprise distros), and newer dejagnu versions have another behaviour, some things break with the old, some things break with the new, and it's all a big mess. Having separate flags for the testcases that say "override the RUNTESTFLAGS" gives the best of both worlds. Even with with new dejagnu, where normally the RUNTESTFLAGS always wins. > Or just document higher minimum dejagnu version requirement? Maybe in ten years time? Or *maybe* in five. Some systems still ship with 1.5.1... (On powerpc we can get away with this because testcases do not (well, should not) use -m32/-m64, and we only use -mcpu in the RUNTESTFLAGS otherwise). Segher