[llvm] r209155 - Fix testers by removing dubious testcase for r209154.

Lang Hames lhames at gmail.com
Mon May 19 13:53:28 PDT 2014


The RuntimeDyld layer doesn't have great testing infrastructure yet. I
could write an MCJIT test that produced the right relocation on x86-64, but
that doesn't really help much: It would run on all testers, but only test
the desired behavior on x86-64. Moreover if there were any changes to
CodeGen, MCJIT might end producing different relocations and so quietly
cease testing what we wanted.

The ideal way to test this would be to teach llvm-rtdyld how to dump the
relocated sections. Then we'd need a utility to hoover up the interesting
bytes (representing GOT entries) from a byte stream, reconstruct addresses,
then run some expressions on them to verify that things are laid out as
expected. That would be awesome, but it would (will?) also take some work.

Despite the lack of tests, this change should stay in tree: the previous
behavior was wrong, and reverting to known broken behavior isn't the answer
to missing tests.

- Lang.



On Mon, May 19, 2014 at 12:51 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Mon, May 19, 2014 at 12:38 PM, Lang Hames <lhames at gmail.com> wrote:
> > Author: lhames
> > Date: Mon May 19 14:38:48 2014
> > New Revision: 209155
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=209155&view=rev
> > Log:
> > Fix testers by removing dubious testcase for r209154.
> >
> > It turns out that not all the world is x86-64. Who knew?
> >
> > I'll get to work on a more appropriate test case for this patch.
>
> Reverting/removing test cases while leaving functionality untested
> in-tree isn't usually ideal.
>
> I /think/ we usually just revert the whole patch, fix the tests, then
> recommit. (also makes it a bit easier to understand when spelunking
> back through the history later - the test goes with the code that it
> verifies)
>
> >
> >
> > Removed:
> >
> llvm/trunk/test/ExecutionEngine/RuntimeDyld/Inputs/x86_64_macho_pic_globals_GOT.o
> > Modified:
> >     llvm/trunk/test/ExecutionEngine/RuntimeDyld/macho_relocations.test
> >
> > Removed:
> llvm/trunk/test/ExecutionEngine/RuntimeDyld/Inputs/x86_64_macho_pic_globals_GOT.o
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/RuntimeDyld/Inputs/x86_64_macho_pic_globals_GOT.o?rev=209154&view=auto
> >
> ==============================================================================
> > Binary file - no diff available.
> >
> > Modified:
> llvm/trunk/test/ExecutionEngine/RuntimeDyld/macho_relocations.test
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/RuntimeDyld/macho_relocations.test?rev=209155&r1=209154&r2=209155&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/ExecutionEngine/RuntimeDyld/macho_relocations.test
> (original)
> > +++ llvm/trunk/test/ExecutionEngine/RuntimeDyld/macho_relocations.test
> Mon May 19 14:38:48 2014
> > @@ -1,2 +1 @@
> >  RUN: llvm-rtdyld -printline %p/Inputs/arm_secdiff_reloc.o
> > -RUN: llvm-rtdyld %p/Inputs/x86_64_macho_pic_globals_GOT.o
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140519/8f04aa60/attachment.html>


More information about the llvm-commits mailing list