Age | Commit message (Collapse) | Author |
|
Signed-off-by: Andi Shyti <andi@etezian.org>
|
|
Signed-off-by: Andi Shyti <andi.shyti@nokia.com>
|
|
A sysfs file is a special file which prints an EOF at any
reading. Therefore it's not possible to open it once, read it
whenever is needed (since an EOF is received after the first
reading) and then close it.
The sequence
fd = open(pathname, flags);
while (1)
read(fd, buf, count);
close(fd);
should be
while (1) {
fd = open(pathname, flags);
read(fd, buf, count);
close(fd);
}
Signed-off-by: Andi Shyti <andi.shyti@nokia.com>
|
|
This patch fixes one of the most common errors about errno usage:
if (somecall() == -1) {
printf("somecall() failed\n");
if (errno == ...) { ... }
}
printf may change the value of errno, so that the errno value in
the if statement is not anymore referring to 'somecall()'
function.
The correct usage should be:
if (somecall() == -1) {
int errsv = errno;
printf("somecall() failed\n");
if (errsv == ...) { ... }
}
Signed-off-by: Andi Shyti <andi.shyti@nokia.com>
|
|
Files are in
/sys/class/i2c-adapter/i2c-12/12-0039/
instead of
/sys/class/i2c-adapter/i2c-0012/12-0039/
^^
The above '0's are a typo
Signed-off-by: Andi Shyti <andi.shyti@nokia.com>
|
|
The bh1770glc is a combined proximity/als sensor. The module in
this patch tests the proximity part of the device. At the current
status the test steps are:
- power on the bh1770 sensor
- enable proximity leds
- read proximity
- disable proximity
- power off the sensor
Signed-off-by: Andi Shyti <andi@etezian.org>
|
|
apds990x is a combined proximity/als sensor. The test provides a
basic test for the als part.
The following are the testing steps:
- power on the sensor
- read 10 times the lux value on 1 second interval
Signed-off-by: Andi Shyti <andi@etezian.org>
|
|
apds990x is a combined proximity/als sensor. The test provides a
basic test for the proximity part.
The following are the testing steps:
- power on the sensor
- enable the proximity
- read 10 times with 1 second interval
Signed-off-by: Andi Shyti <andi@etezian.org>
|
|
KTest is meant to be a generic testing framework for the Linux
Kernel.
Initially it will collect a series of singular system test for
each device driver.
KTest is distributed under GPLv2 license transcripted in the
COPYING file. The GPLv2 is published by the Free Software
Foundation and is downloadable from
http://www.gnu.org/licenses/gpl-2.0.html
Signed-off-by: Andi Shyti <andi@etezian.org>
|