Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSP coverage tests fail to build on the MCP750/VxWorks 6.9 target #204

Closed
jphickey opened this issue Oct 7, 2020 · 1 comment · Fixed by #206
Closed

PSP coverage tests fail to build on the MCP750/VxWorks 6.9 target #204

jphickey opened this issue Oct 7, 2020 · 1 comment · Fixed by #206
Assignees
Labels
bug Something isn't working unit-test
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Oct 7, 2020

Describe the bug
When building for MCP750 with all unit/coverage tests enabled, an error occurs:

In file included from /home/jphickey/cfecfs/github/psp/fsw/mcp750-vxworks/src/cfe_psp_exception.c:46:
/home/jphickey/cfecfs/github/psp/unit-test-coverage/ut-stubs/override_inc/arch/ppc/vxPpcLib.h:32:1: error: "_PPC_FPSCR_UE" redefined
In file included from /opt/WindRiver/vxworks-6.9/target/h/types/vxArch.h:148,
                 from /opt/WindRiver/vxworks-6.9/target/h/types/vxANSI.h:65,
                 from /opt/WindRiver/vxworks-6.9/target/h/limits.h:42,
                 from /opt/WindRiver/gnu/4.3.3-vxworks-6.9/x86-linux2/bin/../../lib/gcc/powerpc-wrs-vxworks/4.3.3/include-fixed/limits.h:122,
                 from /opt/WindRiver/gnu/4.3.3-vxworks-6.9/x86-linux2/bin/../../lib/gcc/powerpc-wrs-vxworks/4.3.3/include-fixed/syslimits.h:7,
                 from /opt/WindRiver/gnu/4.3.3-vxworks-6.9/x86-linux2/bin/../../lib/gcc/powerpc-wrs-vxworks/4.3.3/include-fixed/limits.h:11,
                 from /home/jphickey/cfecfs/github/psp/unit-test-coverage/ut-stubs/inc/PCS_basetypes.h:26,
                 from /home/jphickey/cfecfs/github/psp/unit-test-coverage/ut-stubs/inc/PCS_stdio.h:5,
                 from /home/jphickey/cfecfs/github/psp/unit-test-coverage/ut-stubs/override_inc/stdio.h:15,
                 from /home/jphickey/cfecfs/github/psp/fsw/mcp750-vxworks/src/cfe_psp_exception.c:39:
/opt/WindRiver/vxworks-6.9/target/h/arch/ppc/archPpc.h:187:1: error: this is the location of the previous definition

To Reproduce
Prepare using make SIMULATION=ppc-vxworks6.9 ENABLE_UNIT_TESTS=true prep and sample_defs config
Then run make

Expected behavior
Build should succeed

System observed on:
gs582w-cfelnx build machine with MCP750 target

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the bug Something isn't working label Oct 7, 2020
@jphickey jphickey self-assigned this Oct 7, 2020
@jphickey
Copy link
Contributor Author

jphickey commented Oct 7, 2020

Dug into this - cause is that there is a conflict/duplication between system-provided macro definitions and the macro definitions that are being intentionally overridden by the coverage test environment.

  • Coverage test environment overrides most system headers, but intentionally does _not_override limits.h or stdint.h because limit macros and fixed-width types need to be correct for the machine actually executing the coverage tests.
  • But the VxWorks limit.h header implicitly - through a network of nested includes - includes a whole bunch of CPU-specific definitions, including e.g. _PPC_FPSCR_UE in this case.

jphickey added a commit that referenced this issue Oct 7, 2020
Resolves build error regarding redefinition of PPC macros in the
coverage test, when building on the actual ppc/vxworks target.

This is due to the fact that the system limits.h file implicitly
provides these PPC symbols.  It does not appear that there are
any current test cases that depend on values of these symbols.
@astrogeco astrogeco modified the milestones: 2.0.0, 1.6.0 Oct 13, 2020
astrogeco added a commit that referenced this issue Oct 13, 2020
Fix #204, redefinition of macros in PPC vxworks unit test build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unit-test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants