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

OpenPinDefaultsModeToLastMode test gives different results on different hardware #1581

Open
pgrawehr opened this issue Jul 1, 2021 · 1 comment
Labels
area-infrastructure area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins area-tests Everything related to the testing of our library bug Something isn't working Priority:2 Work that is important, but not critical for the release

Comments

@pgrawehr
Copy link
Contributor

pgrawehr commented Jul 1, 2021

The test OpenPinDefaultsModeToLastMode behaves differently on our build servers than when testing on local Raspberry Pi3 and 4. The changes in PR #1520 only changed the expectation on this test, which made it fail on the build servers but pass locally.

The current theory is that a recent update of the sysfs library causes this difference (the servers have not been patched in quite a while).

The test is currently disabled for SysFs.

@pgrawehr pgrawehr added area-infrastructure area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins os-linux area-tests Everything related to the testing of our library labels Jul 1, 2021
@ghost ghost added the untriaged label Jul 1, 2021
pgrawehr added a commit to pgrawehr/iot that referenced this issue Jul 1, 2021
krwq pushed a commit that referenced this issue Jul 9, 2021
* Do not disable test

* Open/Close shall not change pin modes or states

* LibGpiodDriver shall correctly grab the current pin mode when opening a pin

* Try with updated test cases

* Support reading back the initial mode on Raspberry Pi

* Bugfix Raspi driver

Bug

* Update documentation on SysFsDriver

The SysFsDriver does not support setting the
value before changing a pin to output. It will
always be low.

* Disable test for SysFs

* Do not touch output pin

We just want to test its last state here.

* Test whether a sleep fixes the test on Pi3's

* Use a really large delay

* Update src/System.Device.Gpio.Tests/GpioControllerTestBase.cs

* Disable test for SysFs, see #1581

* Address PR feedback

* Throw exception if driver is disposed

Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
@krwq krwq added the Priority:2 Work that is important, but not critical for the release label Sep 29, 2022
@krwq krwq added the bug Something isn't working label Feb 9, 2023
@krwq
Copy link
Member

krwq commented Feb 9, 2023

marking as bug since it's unclear if it's a product or test issue

@krwq krwq removed os-linux labels Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins area-tests Everything related to the testing of our library bug Something isn't working Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

3 participants