Guido Günther
bba4560748
README: Document near-level property
...
Linux 5.6 added the near level property in 445b16fb6bdc2 which can
be used in DT based devices to give a default.
2021-12-21 17:00:43 +01:00
Bastien Nocera
0b1574d0eb
main: Check whether user is allowed to claim a sensor
...
Check whether a particular user/D-Bus client is allowed to claim a
sensor.
The ClaimCompass method on net.hadess.SensorProxy.Compass doesn't have a
check as only the geoclue user is allowed to access this interface, as
per the D-Bus configuration.
2021-09-29 12:06:55 +02:00
Bastien Nocera
abd16b5911
tests: Start mock polkitd in the tests
...
And allow all us to perform all the actions.
2021-09-29 11:54:26 +02:00
Bastien Nocera
63a84af6a2
data: Add polkit policy description
...
Describe and set defaults for claiming sensors.
2021-09-29 11:54:26 +02:00
Bastien Nocera
b68811417e
tests: Split the integration test into individual tests
...
unittest_inspector.py lists the tests in the integration-test.py script,
which are then added as individual tests.
2021-09-07 11:06:25 +02:00
Bastien Nocera
74b71d9a3b
tests: Rename integration test script
...
Add the python suffix.
2021-09-07 10:50:35 +02:00
Bastien Nocera
a7b603270f
main: Print version in debug output on startup
...
This will stop needing to ask users that read the README when reporting
bugs but don't include this info.
2021-08-19 20:35:46 +02:00
Bastien Nocera
860405323b
ci: Remove libgudev manual installation
...
The package is already available in repositories.
2021-08-19 20:35:46 +02:00
Bastien Nocera
83d963b345
3.3
2021-08-16 14:52:44 +02:00
Bastien Nocera
f42263d434
tests: Add tests for 0.0 IIO offsets
...
Test both parts of iioutils_get_param_float() for 0.0 readings.
2021-08-16 14:44:57 +02:00
Bastien Nocera
8980b8b74f
iio: Allow "0.0" as an offset
...
0.0 is a valid offset.
https://bugzilla.redhat.com/show_bug.cgi?id=1978419#c11
2021-08-16 14:26:04 +02:00
Bastien Nocera
b6c4c7ccb7
3.2
2021-08-15 00:30:39 +02:00
Bastien Nocera
93a10cd84d
tests: Another test for misparsed scale in some locales
...
Polling accelerometer drivers read the accelerometer scales using
libgudev. Check that libgudev is new enough and this bug is fixed:
https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/17
2021-08-15 00:18:43 +02:00
Bastien Nocera
7559d9b652
build: Require a newer libgudev to fix scale parsing errors
2021-08-15 00:18:43 +02:00
Bastien Nocera
4a0033c8dd
ci: Install newer libgudev
2021-08-15 00:18:35 +02:00
Bastien Nocera
2f94e4981f
iio: Error out when scale is parsed as 0.0
2021-08-14 22:48:54 +02:00
Bastien Nocera
cb8b8c3282
tests: Test for misparsed scale in some locales
...
Check that the scale is correctly parsed in the French locale.
2021-08-14 22:48:54 +02:00
Bastien Nocera
a0d058eeb1
iio: Fix iioutils_get_param_float() in some locales
...
Reimplement iioutils_get_param_float() to parse float data like it would
in the C locale. This fixes the scale being '0' for every axis on some
systems and in some locales.
This is used to get the scale and offset parameters from buffer IIO drivers.
Fixes: 9f49caaf17
Closes : #331
2021-08-14 22:48:54 +02:00
Bastien Nocera
06b72df254
tests: Test for unparseable mount matrix in some locales
2021-08-14 22:48:54 +02:00
Bastien Nocera
55377329a2
mount-matrix: Fix parsing of mount matrix in some locales
...
Fix parsing of mount matrix in locales that use a comma as a decimal
separator.
Fixes: 9f49caaf17
Closes : #330
2021-08-14 22:48:54 +02:00
Bastien Nocera
38c1b4d5c1
ci: Add French locale to CI
2021-08-14 22:48:54 +02:00
Bastien Nocera
c5aea53101
tests: Initialise i18n in tests
2021-08-14 22:48:54 +02:00
Bastien Nocera
61a44175ca
mount-matrix: Fix deprecation warning
...
src/accel-mount-matrix.c: In function ‘parse_mount_matrix’:
src/accel-mount-matrix.c:121:17: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations]
121 | *vecs = g_memdup (id_matrix, sizeof(id_matrix));
| ^
2021-08-14 22:48:54 +02:00
Bastien Nocera
eb38ddb0d2
ci: Remove python-dbusmock hacks
2021-08-14 10:42:19 +02:00
Bastien Nocera
96c0b33191
mount-matrix: Fix stringop-overflow warnings
...
iio-sensor-proxy/src/accel-mount-matrix.c:77:21: warning: ‘parse_mount_matrix’ accessing 24 bytes in a region of size 8 [-Wstringop-overflow=]
77 | if (parse_mount_matrix (mount_matrix, &ret))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iio-sensor-proxy/src/accel-mount-matrix.c:77:21: note: referencing argument 2 of type ‘AccelVec3 **’
iio-sensor-proxy/src/accel-mount-matrix.c:91:1: note: in a call to function ‘parse_mount_matrix’
91 | parse_mount_matrix (const char *mtx,
| ^~~~~~~~~~~~~~~~~~
2021-07-25 00:38:23 +02:00
Bastien Nocera
49d3771716
3.1
2021-06-14 13:40:32 +02:00
Bastien Nocera
f9f4976582
ci: Export the created dist
2021-06-14 13:40:32 +02:00
Bastien Nocera
9300c064bd
build: Update version
...
meson port was started before 3.0 was released, and we haven't had a
meson release yet, so this slipped.
2021-06-14 13:40:32 +02:00
Bastien Nocera
5c6fa19b17
ci: Work-around uninstallable python-dbusmock in rawhide
2021-06-14 13:30:46 +02:00
Bastien Nocera
99a3737418
tests: Add integration test for "label" accel location
...
Make sure that accelerometers with a "accel-base" label get ignored.
2021-06-11 12:54:54 +02:00
Bastien Nocera
27a325b2f5
accel: Add support for the new "accel-*" IIO labels
...
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a6df4b1ab0e467f23ccdcbb82700cfb3eaf44a3
2021-06-11 12:54:48 +02:00
Bastien Nocera
a1eb647c88
drivers: Remove unused declarations
2021-01-22 15:10:02 +01:00
Bastien Nocera
72bee8bbdb
tests: Add test for property leaking to every listener
...
Add test that shows that even if a sensor is unclaimed by a client, that
client will still receive sensor updates because GDBusProxy is still
listening to signals from it.
See https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/210
2021-01-22 14:33:18 +01:00
Bastien Nocera
8225c4458a
main: Only send properties to registered clients
...
Only send PropertiesChanged signals to clients that have registered
their interest by claiming a particular type of sensor.
2021-01-22 14:33:18 +01:00
Bastien Nocera
3059969313
monitor-sensor: Add options to only monitor specific sensors
...
Should make testing and debugging easier.
2021-01-22 14:33:18 +01:00
Bastien Nocera
203d6508dc
tests: Fix test_input_accel() leaking a daemon
...
test_input_accel() uses umockdev-run, and killing umockdev-run doesn't
kill the child iio-sensor-proxy daemon we make it spawn, making any test
running after this one fail. As the tests are run alphabetically, we
were lucky that this test was the last one, but we can't rely on that.
Instead, use psutil to list all the children processes and kill those
before killing umockdev-run.
2021-01-22 11:05:42 +01:00
Bastien Nocera
2449acac70
tests: Fix umockdev device name in some tests
...
Which didn't correspond to the type of device being added.
2021-01-22 10:48:31 +01:00
Bastien Nocera
cd66a299cb
main: Add debug in early exit paths for Claim/Release calls
...
Show some debug when Claim is being called for an already claimed
sensor, and Release is called for an unclaimed sensor.
2021-01-22 10:47:08 +01:00
Bastien Nocera
cc112408df
fake-input-accelerometer: Simplify error paths
2021-01-21 16:15:46 +01:00
Bastien Nocera
39af04fc48
drivers: Use new g_auto* to simplify IIOSensorData handling
2021-01-21 16:15:46 +01:00
Bastien Nocera
7ab8378cdb
iio: Add g_auto() helpers for IIOSensorData
2021-01-21 16:15:46 +01:00
Bastien Nocera
fbb67da3a7
utils: Fix get_device_file() retval
...
Possible use-after-free.
2021-01-21 16:15:46 +01:00
Bastien Nocera
e3594b879c
main: Use new g_auto* to close file descriptors
2021-01-21 16:15:46 +01:00
Bastien Nocera
b60d9d3556
utils: Add a g_auto() types to close file descriptors
2021-01-21 16:15:46 +01:00
Bastien Nocera
303d106698
tests: Add iio-buffer-accel test
2021-01-20 18:30:58 +01:00
Bastien Nocera
793ecb7dee
accel: Add support for mocking data read from device node
2021-01-20 18:30:42 +01:00
Bastien Nocera
fb00652028
accel: Use g_autofree to free the trigger name
2021-01-20 18:28:47 +01:00
Bastien Nocera
132b30a337
drivers: Print some debug when we can't find the trigger
2021-01-20 18:28:47 +01:00
Bastien Nocera
7591a2a76e
hwmon: Lower poll timeout during tests
...
Makes the tests last about 8 seconds less.
2021-01-20 18:28:47 +01:00
Bastien Nocera
e8d22fe304
main: Add helper for mocking device node
2021-01-20 18:28:47 +01:00