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

Combine "pc-linux" and "pc-linux-ut" OSAL BSPs #81

Closed
skliper opened this issue Sep 30, 2019 · 7 comments
Closed

Combine "pc-linux" and "pc-linux-ut" OSAL BSPs #81

skliper opened this issue Sep 30, 2019 · 7 comments
Labels
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

There is a separate BSP called {{{pc-linux-ut}}} that is used for unit testing. This differs slightly from the normal {{{pc-linux}}} BSP:

  • It does not block signals
  • It does not have an idle wait at the end of {{{main()}}}

Having a different BSP violates the "fly what you test, test what you fly" philosophy.

The unit tests driven by timers do not work with signals blocked, because these rely on signals working during {{{OS_Application_Startup()}}} in order to function. This is probably the reason for the alternate BSP.

However, these tests can and should be fixed to operate using the normal BSP with signals blocked, as this will be more representative of what happens in a normal system. To fix these tests just requires creating a child thread to handle the test logic and allowing {{{OS_Application_Startup}}} to complete normally.

@skliper skliper added this to the osal-4.2 milestone Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 58. Created by jphickey on 2015-06-17T10:58:59, last modified: 2015-11-20T16:22:16

@skliper skliper self-assigned this Sep 30, 2019
@skliper skliper added the bug label Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by jphickey on 2015-06-17 11:02:09:

This was originally done as part of #40, but cherry-picking this modification out of that change set since it is required to make unit tests work in the current integration candidate ({{{ic-2015-0616}}} branch).

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by jphickey on 2015-06-17 17:51:01:

Pushed [changeset:7f36448] for review. This is also merged into the {{{ic-2015-0616}}} branch and the unit tests build/run successfully as part for that merge.

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by jwilmot on 2015-06-30 10:51:40:

It makes sense to have only one BSP if possible. Recommend accept.

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by glimes on 2015-06-30 10:56:58:

Recommend accept.

From a design standpoint, I like this change as it
encourages "test what you fly, fly what you test."

NB: I did have to go look at the real source for
the bin-sem-timeout-test as the diff left me unsure
about exactly what code moved where. Looks good.

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by acudmore on 2015-06-30 12:29:37:

recommend accept

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by glimes on 2015-06-30 14:45:40:

CCB approved.

@skliper skliper closed this as completed Sep 30, 2019
@skliper skliper removed their assignment Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant