<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/firmware, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-11-27T21:20:36Z</updated>
<entry>
<title>selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config</title>
<updated>2018-11-27T21:20:36Z</updated>
<author>
<name>Dan Rue</name>
<email>dan.rue@linaro.org</email>
</author>
<published>2018-11-27T03:12:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7492902e8d22b568463897fa967c0886764cf034'/>
<id>urn:sha1:7492902e8d22b568463897fa967c0886764cf034</id>
<content type='text'>
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y is required for fw_fallback.sh.
Without it, fw_fallback.sh fails with 'usermode helper disabled so
ignoring test'. Enable the config in selftest so that it gets built by
default.

Signed-off-by: Dan Rue &lt;dan.rue@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: firmware: remove use of non-standard diff -Z option</title>
<updated>2018-11-27T21:19:46Z</updated>
<author>
<name>Dan Rue</name>
<email>dan.rue@linaro.org</email>
</author>
<published>2018-11-27T03:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f70b472e937bb659a7b7a14e64f07308e230888c'/>
<id>urn:sha1:f70b472e937bb659a7b7a14e64f07308e230888c</id>
<content type='text'>
"diff -Z" is used to trim the trailing whitespace when comparing the
loaded firmware file with the source firmware file. However, per the
comment in the source code, -Z should not be necessary. In testing, the
input and output files are identical.

Additionally, -Z is not a standard option and is not available in
environments such as busybox. When -Z is not supported, diff fails with
a usage error, which is suppressed, but then causes read_firmwares() to
exit with a false failure message.

Signed-off-by: Dan Rue &lt;dan.rue@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: firmware: return Kselftest Skip code for skipped tests</title>
<updated>2018-05-30T21:21:52Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-05-03T22:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6a9be9270c871b22725c34de35a21d918867672'/>
<id>urn:sha1:a6a9be9270c871b22725c34de35a21d918867672</id>
<content type='text'>
When firmware test(s) get skipped because of unmet dependencies and/or
unsupported configuration, it returns 0 which is treated as a pass
by the Kselftest framework. This leads to false positive result even
when the test could not be run.

Change it to return kselftest skip code when a test gets skipped to
clearly report that the test could not be run.

Kselftest framework SKIP code is 4 and the framework prints appropriate
messages to indicate that the test is skipped.

Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
Reviewed-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests:firmware: fixes a call to a wrong function name</title>
<updated>2018-04-25T15:27:09Z</updated>
<author>
<name>Jeffrin Jose T</name>
<email>ahiliation@yahoo.co.in</email>
</author>
<published>2018-04-23T14:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0183df0baf7912b9fae16b5281f1eabbb4572b3d'/>
<id>urn:sha1:0183df0baf7912b9fae16b5281f1eabbb4572b3d</id>
<content type='text'>
 This is a patch to the tools/testing/selftests/firmware/fw_run_tests.sh
 file which fixes a bug which calls to a wrong function name,which in turn
 blocks the execution of certain tests.

Signed-off-by: Jeffrin Jose T &lt;jeffrin@rajagiritech.edu.in&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: fix setting old custom fw path back on exit, second try</title>
<updated>2018-04-23T11:03:25Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-04-04T20:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e538409257d0217a9bc715686100a5328db75a15'/>
<id>urn:sha1:e538409257d0217a9bc715686100a5328db75a15</id>
<content type='text'>
Commit 65c79230576 tried to clear the custom firmware path on exit by
writing a single space to the firmware_class.path parameter.  This
doesn't work because nothing strips this space from the value stored
and fw_get_filesystem_firmware() only ignores zero-length paths.

Instead, write a null byte.

Fixes: 0a8adf58475 ("test: add firmware_class loader test")
Fixes: 65c79230576 ("test_firmware: fix setting old custom fw path back on exit")
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Acked-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: Install all scripts</title>
<updated>2018-04-23T11:03:25Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-04-04T20:37:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ecb160199c3c289c660bdb852a9269e243009a8'/>
<id>urn:sha1:1ecb160199c3c289c660bdb852a9269e243009a8</id>
<content type='text'>
List all the scripts invoked by fw_run_tests.sh, so that
"make TARGETS=firmware install" keeps working.

Fixes: 29a1c00ce1df8 ("test_firmware: add simple firmware firmware test ...")
Fixes: b3cf21fae1fe0 ("test_firmware: test three firmware kernel configs ...")
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Acked-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: modify custom fallback tests to use unique files</title>
<updated>2018-03-20T08:28:47Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2018-03-10T14:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9952db75e0659d9db62d76d9a351fdae06898642'/>
<id>urn:sha1:9952db75e0659d9db62d76d9a351fdae06898642</id>
<content type='text'>
Users of the custom firmware fallback interface is are not supposed to
use the firmware cache interface, this can happen if for instance the
one of the APIs which use the firmware cache is used first with one
firmware file and then the request_firmware_nowait(uevent=false) API
is used with the same file.

We'll soon become strict about this on the firmware interface to reject
such calls later, so correct the test scripts to avoid such uses as well.
We address this on the tests scripts by simply using unique names when
testing the custom fallback interface.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: test three firmware kernel configs using a proc knob</title>
<updated>2018-03-20T08:28:47Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2018-03-10T14:14:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b3cf21fae1fe0b3a3e8ada0a60d3fb6217ebce5b'/>
<id>urn:sha1:b3cf21fae1fe0b3a3e8ada0a60d3fb6217ebce5b</id>
<content type='text'>
Since we now have knobs to twiddle what used to be set on kernel
configurations we can build one base kernel configuration and modify
behaviour to mimic such kernel configurations to test them.

Provided you build a kernel with:

CONFIG_TEST_FIRMWARE=y
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y

We should now be able test all possible kernel configurations
when FW_LOADER=y. Note that when FW_LOADER=m we just don't provide
the built-in functionality of the built-in firmware.

If you're on an old kernel and either don't have /proc/config.gz
(CONFIG_IKCONFIG_PROC) or haven't enabled CONFIG_FW_LOADER_USER_HELPER
we cannot run these dynamic tests, so just run both scripts just
as we used to before making blunt assumptions about your setup
and requirements exactly as we did before.

Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: expand on library with shared helpers</title>
<updated>2018-03-20T08:28:47Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2018-03-10T14:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5a614519e67b429faf01ca36db90030976449cc'/>
<id>urn:sha1:f5a614519e67b429faf01ca36db90030976449cc</id>
<content type='text'>
This expands our library with as many things we could find which
both scripts we use share.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: replace syfs fallback check with kconfig_has helper</title>
<updated>2018-03-14T18:49:24Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2018-03-10T14:14:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9cc853203c3bf4d3b0c466c5525750c071624b05'/>
<id>urn:sha1:9cc853203c3bf4d3b0c466c5525750c071624b05</id>
<content type='text'>
Now that we have a kconfig checker just use that instead of relying
on testing a sysfs directory being present, since our requirements
are spelled out.

Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
