Repository navigation
omamobile-modem-sit 0.3.35: its tests no longer read the phone's own network devices - #677
Conversation
…network devices deactivate() refuses while the bearer's network device is up, and reads that from /sys/class/net and from the device omamobile-sit-data recorded in /run. The tests left both at the host's: on a build machine there is no rmnet0, but on a phone with the modem up there is, and it is up, so test_attach_bearer failed there and tools/phone-install-package could not build the package (the Pixel 9a, 2026-11-11, "remove host data configuration first"). The two paths get names in data_call (NET, DATA_INTERFACE), the tests point them and the modem-owned record at their own directory, the two tests that patched Path.read_text for rmnet0's flags write the file instead, and a new test holds the refusal itself: a device that is up, by its CID's name or by the recorded name, stops the release with nothing sent.
|
Thank you, this is a real fix and a tidy one. A test that reads the build machine's own I checked three things. The library change is only two names for the two paths the function already built, with I'm merging this as 0.3.35, ahead of the others that claim that number, since they need it to build on a phone. Nothing for you to change here. For your chain afterwards: #376, #378 and #380 will conflict with this in One thought for later, not for this PR: |
…network devices (derekross#677) `deactivate()` refuses while the bearer's network device is up, and reads that from `/sys/class/net` and from the device `omamobile-sit-data` recorded in `/run`. The tests left both at the host's, so on a phone with the modem up `test_attach_bearer` failed and `tools/phone-install-package` could not build the package (the Pixel 9a, 2026-11-11). The two paths get names in `data_call` (`NET`, `DATA_INTERFACE`), the tests point them at their own directory, and a new test holds the refusal itself. The library reads the same paths as before.
packages/omamobile-modem-sit/test/allfails on a phone whose modem is up, sotools/phone-install-package packages/omamobile-modem-sitcan't build the package there.data_call.deactivate()refuses while the bearer's network device is up. It reads that from/sys/class/net/<device>/flags, forrmnet<CID-1>and for the deviceomamobile-sit-datarecorded in/run/omamobile-sit/data-interface.test_attach_bearer.pyleft both at the host's ("no rmnet device exists on the host, so none is up"). On the Pixel 9a today, with the modem up,rmnet0read0x1091and the recorded device wasrmnet0:The change:
data_call.py: the two paths get names,NETandDATA_INTERFACE. Nothing else changes in the library.test_attach_bearer.pyandtest_data_call.pypoint both, and in the second the modem-owned record too, at the test's own directory. The two tests that patchedPath.read_textforrmnet0's flags write the file in that directory instead.Tested:
packages/omamobile-modem-sit/test/allon the laptop, and on the palmtop with the modem up (the package directory copied to/tmpand the tests run as the palmtop's user, nothing installed):ok - unit tests, where main's fails as above.tools/pr-check origin/mainpasses.The version is one above main's; #374's chain and others claim the same number, so it is yours to set.