8000 test(iio-sensor-proxy): add test for repeated ClaimAccelerometer by DeXtroTip · Pull Request #12 · fstanis/chuwi-minibook · GitHub
[go: up one dir, main page]

Skip to content

test(iio-sensor-proxy): add test for repeated ClaimAccelerometer - #12

Merged
fstanis merged 1 commit into
fstanis:mainfrom
DeXtroTip:fix/mxc6655-claim
Sep 6, 2026
Merged

fstanis merged 1 commit into
fstanis:mainfrom
DeXtroTip:fix/mxc6655-claim

Conversation

@DeXtroTip
@DeXtroTip DeXtroTip commented Jul 14, 2026 •
Copy link
Copy Markdown
Contributor

The driver fix from #13 is already upstream, so this PR now only adds a regression test.

Repeated ClaimAccelerometer calls used to hang when want_polling was already TRUE, because no reading was emitted. The test covers both a known orientation and cur_orient == -1, which falls back to MXC_ORIENT_RIGHT.

The changes to drv-mxc6655-accel.c were reverted as requested.

@fstanis
fstanis commented Aug 18, 2026
Copy link
Copy Markdown
Owner

H 8000 ey, really sorry, I completely missed your PR - I meanwhile added a fix for this in #13 with an early return in mxc6655_set_polling:

/* Without --lazy the timer already runs (want_polling == state), yet the
* proxy holds each Claim reply until a reading is emitted -- so always send
* one, not just on a state change. */
if (state)
send_current_reading (sensor_device);

However, I like that you'd written a test - I think this repo really needs them. I'm more than happy to merge that if you revert the changes to drv-mxc6655-accel.c since they're no longer needed.

Regression test for fstanis#13: repeated ClaimAccelerometer must still emit a reading when want_polling is already TRUE.
@DeXtroTip DeXtroTip changed the title fix(iio-sensor-proxy): reply to repeated sensor claims test(iio-sensor-proxy): add test for repeated ClaimAccelerometer Aug 31, 2026
@DeXtroTip
Copy link
Copy Markdown
Contributor Author

Thanks for catching this and for fixing it in #13. I reverted the changes to drv-mxc6655-accel.c, and kept the regression test. The PR is now test-only.

@fstanis
fstanis merged commit 153524f into fstanis:main Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0