diff mbox series

[RFA] skip gcc.target/arm/div64-unwinding.c on vxworks_kernel targets

Message ID 20200404011252.25459-1-brobecker@adacore.com
State New
Headers show
Series [RFA] skip gcc.target/arm/div64-unwinding.c on vxworks_kernel targets | expand

Commit Message

Joel Brobecker April 4, 2020, 1:12 a.m. UTC
Hello,

This test verifies, by using a weak reference to _Unwind_RaiseException,
that performing division by zero does not cause that symbol to get
indirectly pulled into our closure.

The testing methodology unfortunately does not work on VxWorks targets
when building in kernel mode. This is inherent to how kernel mode
on VxWorks works: The link is only partial and the remaining symbols
which have not been resolved already get automatically resolved by
the VxWorks loader at the moment the module is loaded onto the target,
prior to execution. The resolution includes weak symbols too, which
defeats the purpose of this test.

gcc/testsuite/

        * gcc.target/arm/div64-unwinding.c: Skip on vxworks_kernel targets.

Tested by running the test on ARM VxWorks 7 SR0640, both in kernel
mode as well as RTP mode (verifying it only gets disabled when in
kernel mode). Also run on ARM ELF to verify that this still runs on
non-VxWorks targets.

OK to push to master?

Thank you!

Comments

Richard Earnshaw April 6, 2020, 9:29 a.m. UTC | #1
On 04/04/2020 02:12, Joel Brobecker wrote:
> Hello,
> 
> This test verifies, by using a weak reference to _Unwind_RaiseException,
> that performing division by zero does not cause that symbol to get
> indirectly pulled into our closure.
> 
> The testing methodology unfortunately does not work on VxWorks targets
> when building in kernel mode. This is inherent to how kernel mode
> on VxWorks works: The link is only partial and the remaining symbols
> which have not been resolved already get automatically resolved by
> the VxWorks loader at the moment the module is loaded onto the target,
> prior to execution. The resolution includes weak symbols too, which
> defeats the purpose of this test.
> 
> gcc/testsuite/
> 
>         * gcc.target/arm/div64-unwinding.c: Skip on vxworks_kernel targets.
> 
> Tested by running the test on ARM VxWorks 7 SR0640, both in kernel
> mode as well as RTP mode (verifying it only gets disabled when in
> kernel mode). Also run on ARM ELF to verify that this still runs on
> non-VxWorks targets.
> 
> OK to push to master?
> 
> Thank you!
> 

OK.

R.
Joel Brobecker April 6, 2020, 7:08 p.m. UTC | #2
> > gcc/testsuite/
> > 
> >         * gcc.target/arm/div64-unwinding.c: Skip on vxworks_kernel targets.

> OK.

Thank you, Richard. Pushed to master.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/div64-unwinding.c b/gcc/testsuite/gcc.target/arm/div64-unwinding.c
index 09442811fb6..c10ac248354 100644
--- a/gcc/testsuite/gcc.target/arm/div64-unwinding.c
+++ b/gcc/testsuite/gcc.target/arm/div64-unwinding.c
@@ -1,6 +1,7 @@ 
 /* Performing a 64-bit division should not pull in the unwinder.  */
 
 /* { dg-do run { target { { ! *-*-linux* } && { ! *-*-uclinux* } } } } */
+/* { dg-skip-if "load causes weak symbol resolution" { vxworks_kernel } } */
 /* { dg-options "-O0" } */
 
 #include <stdlib.h>