<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libevdev.git/test/test-kernel.c, branch libevdev-1.9.0</title>
<subtitle>gitlab.freedesktop.org: libevdev/libevdev.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/'/>
<entry>
<title>config.h is a local include path</title>
<updated>2020-02-14T02:03:23+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2020-02-14T00:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=4c8a7a265d9e3f134329b2b79a754a682e60e147'/>
<id>4c8a7a265d9e3f134329b2b79a754a682e60e147</id>
<content type='text'>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: split the tests into one test case each</title>
<updated>2020-02-11T10:57:42+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2020-02-11T10:37:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=1014acedfc9f8889d38467b811d7360914204517'/>
<id>1014acedfc9f8889d38467b811d7360914204517</id>
<content type='text'>
For debugging it's more important to be able to quickly run a single test
rather than grouping them together, we don't have thousands of tests here
anyway. So let's add a macro to put every test func into its own TCase,
allowing for test selection via the environment variable CK_RUN_CASE.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For debugging it's more important to be able to quickly run a single test
rather than grouping them together, we don't have thousands of tests here
anyway. So let's add a macro to put every test func into its own TCase,
allowing for test selection via the environment variable CK_RUN_CASE.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't read events unless required</title>
<updated>2019-03-19T01:02:52+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2019-01-16T03:55:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=76662deeff46090d1009d76dda06767af4d45511'/>
<id>76662deeff46090d1009d76dda06767af4d45511</id>
<content type='text'>
With the previous approach, every libevdev_next_event() invocation triggered a
read() on the device fd. This is not efficient, the kernel provides whole
event frames at a time so we're guaranteed to have more events waiting unless
the current event is a SYN_REPORT.

Assuming a fast-enough client and e.g. a touchpad device with multiple axes
per frame, we'd thus trigger several unnecessary read() calls per event frame.

Drop this behavior, instead only trigger the read when our internal queue is
empty and we need more events.

Fallout:
- we don't have any warning about a too-slow sync, i.e. if a SYN_DROPPED
  arrives while we're syncing, we don't get a warning in the log anymore.
  the test for this was removed.
- the tests that required the specific behavior were rewritten accordingly
- a revoke on a kernel device doesn't return ENODEV until already-received
  events have been processed

The above shouldn't be an issue for existing real-world clients.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the previous approach, every libevdev_next_event() invocation triggered a
read() on the device fd. This is not efficient, the kernel provides whole
event frames at a time so we're guaranteed to have more events waiting unless
the current event is a SYN_REPORT.

Assuming a fast-enough client and e.g. a touchpad device with multiple axes
per frame, we'd thus trigger several unnecessary read() calls per event frame.

Drop this behavior, instead only trigger the read when our internal queue is
empty and we need more events.

Fallout:
- we don't have any warning about a too-slow sync, i.e. if a SYN_DROPPED
  arrives while we're syncing, we don't get a warning in the log anymore.
  the test for this was removed.
- the tests that required the specific behavior were rewritten accordingly
- a revoke on a kernel device doesn't return ENODEV until already-received
  events have been processed

The above shouldn't be an issue for existing real-world clients.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: move the kernel test to the same infrastructure</title>
<updated>2018-06-15T05:19:05+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2018-06-15T05:18:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=c4cfd7668a279f80877707b97417850e4670a587'/>
<id>c4cfd7668a279f80877707b97417850e4670a587</id>
<content type='text'>
We previously had this separate because it tested separate things. Now the
setup is generic enough that we should just re-use it.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We previously had this separate because it tested separate things. Now the
setup is generic enough that we should just re-use it.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: skip tests when we're not root</title>
<updated>2018-02-26T07:12:08+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2018-02-26T07:09:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=fbeeef9cde22659c1fefbce2ad8c789f3828cabd'/>
<id>fbeeef9cde22659c1fefbce2ad8c789f3828cabd</id>
<content type='text'>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix EVIOCREVOKE test on non-supporting kernels</title>
<updated>2014-08-25T00:28:09+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2014-08-25T00:28:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=69b77b896ab3d8be2396fea0e8d124f907d54064'/>
<id>69b77b896ab3d8be2396fea0e8d124f907d54064</id>
<content type='text'>
The ioctl-returned errno is positive.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ioctl-returned errno is positive.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: remove checks for test device creation failure</title>
<updated>2014-04-02T01:35:56+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2014-04-02T01:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=c97839a81ebbc6e41cf5937cd9762a8de59270a0'/>
<id>c97839a81ebbc6e41cf5937cd9762a8de59270a0</id>
<content type='text'>
test_create_... fails on a non-zero return code anyway

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test_create_... fails on a non-zero return code anyway

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix kernel test for revoke after</title>
<updated>2014-04-02T01:35:12+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2014-04-02T01:31:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=f90c038a2db1caba84fce5857bd2ea33600d7af2'/>
<id>f90c038a2db1caba84fce5857bd2ea33600d7af2</id>
<content type='text'>
dev2 by definition doesn't initialize, we expect it to fail. Freeing it after
is a bad idea. Also initialize it to NULL so this is a bit more obvious now.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dev2 by definition doesn't initialize, we expect it to fail. Freeing it after
is a bad idea. Also initialize it to NULL so this is a bit more obvious now.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test for EVIOCREVOKE</title>
<updated>2014-02-25T21:22:04+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-10-08T05:43:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=061927dd76b2e128185e6fd32dc5470204fc7ead'/>
<id>061927dd76b2e128185e6fd32dc5470204fc7ead</id>
<content type='text'>
New in 3.12, EVIOCREVOKE revokes access to an evdev device. This is unlikely
to be used by a libevdev user, see.
http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html

This patch adds a new test-kernel binary that tests the kernel API directly.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New in 3.12, EVIOCREVOKE revokes access to an evdev device. This is unlikely
to be used by a libevdev user, see.
http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html

This patch adds a new test-kernel binary that tests the kernel API directly.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
