LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1370 - Make generic CodeGen tests truly generic
Summary: Make generic CodeGen tests truly generic
Status: RESOLVED FIXED
Alias: None
Product: Test Suite
Classification: Unclassified
Component: DejaGNU (show other bugs)
Version: 1.0
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-29 22:31 PDT by Reid Spencer
Modified: 2010-03-06 14:00 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Spencer 2007-04-29 22:31:47 PDT
The DejaGnu tests will now avoid running tests for targets that are not
configured. Unfortunately, the Generic test suite contains test cases for
specific targets. This causes false FAIL in test/CodeGen/Generic because the
target specific options are not supported by llc. For example, the -march=ppc32
option is not supported in a test case if PowerPC is not configured to be built. 

This should be rectified by moving or copying the tests that use the -march
option from Generic to the appropriate target directories.
Comment 1 Tanya Lattner 2007-04-30 00:02:19 PDT

*** This bug has been marked as a duplicate of 556 ***
Comment 2 Reid Spencer 2007-04-30 00:09:13 PDT
This is not a duplicate of 556. bug 556 had to do with the mechanism to detect
that only certain targets are built and to not execute target specific tests if
the target hasn't been built. That functionality was implemented a week ago so I
just closed 556.

This bug is about getting tests in the right directory, a wholly different problem. 
Comment 3 Chris Lattner 2007-04-30 00:14:10 PDT
Why do we even care about this?  People shouldn't be running tests unless they have everything built.  
Obviously, if they don't, they can cause regressions in the stuff they don't test.
Comment 4 Reid Spencer 2007-04-30 00:18:02 PDT
You're missing the point, Chris.

Regardless of the targets they have specified as being built, if they run the
"Generic" tests, they should reasonably expect them to succeed. But, if those
"generic" tests require a specific target then they fail. Generic tests should
be generic, i.e. not target specific.  This bug just asks that situation
actually be true.

BTW, I would expect that *most* users (not developers) would select to only
build the target for one machine. I certainly expect to do that with HLVM and
XPS. Its a waste to build targets that won't be used. It bloats executables
needlessly.
Comment 6 Chris Lattner 2007-04-30 00:23:24 PDT
> BTW, I would expect that *most* users (not developers) would select to only
> build the target for one machine. I certainly expect to do that with HLVM and
> XPS. Its a waste to build targets that won't be used. It bloats executables
> needlessly.

You're confusing many different issues here reid.

1. Users vs developers.  We care most about developers who want to test their stuff to ensure they are 
not causing regressions.
2. "It bloats executables needlessly." only if you link them in.

There are tests that run multiple different targets.  This is by design and not something that should 
change.

-Chris
Comment 7 Reid Spencer 2007-04-30 05:37:32 PDT
> You're confusing many different issues here reid.

There's no confusion. 

> 1. Users vs developers.  We care most about developers who want to test 
> their stuff to ensure they are not causing regressions.

So, package managers for operating system distros just "don't count" in your
view? Developers of language front ends who want to check for regressions, don't
count? C'mon, I don't believe you actually believe this ridiculous statement.
Users count too.

> 2. "It bloats executables needlessly." only if you link them in.

Huh? The default is to link in every target configured to be built. The entire
POINT of this is that *users* are not likely to build *all* targets because they
don't want the bloat in the executables. That being the case, they *will* get
false regressions in the test suite, simply because their llc can't handle the
-march options that specify targets that they didn't build. This is not the
user's fault, it is the fault of the test suite which needs to make "generic"
tests truly target independent. All this bug is about is correcting this situation.

> There are tests that run multiple different targets.  This is by design and
> not something that should change.

The only thing that is changing is that such tests are being replicated so that
they run on a per-target basis. This allows un-built targets to be excluded
instead of generating a false test failure because of -march=<unbuilt-target> in
the test script.  There's no loss of functionality here, just a rearrangement of
where the tests live to avoid false positives in the regression test regardless
of which targets were built.
Comment 8 Chris Lattner 2007-04-30 18:37:41 PDT
Fine, go for it.
Comment 9 Reid Spencer 2007-05-17 12:55:52 PDT
This has been implemented. Only target-independent test cases should go in
CodeGen. All test cases that had a -march= option have been moved or duplicated
into the target-specific subdirectories of test/CodeGen. From now on, please do
not use the -march option in the test/CodeGen/Generic directory.