android_kernel_oneplus_msm8998/tools
Luis R. Rodriguez 6daa32b6cb test_firmware: fix setting old custom fw path back on exit
[ Upstream commit 65c79230576873b312c3599479c1e42355c9f349 ]

The file /sys/module/firmware_class/parameters/path can be used
to set a custom firmware path. The fw_filesystem.sh script creates
a temporary directory to add a test firmware file to be used during
testing, in order for this to work it uses the custom path syfs file
and it was supposed to reset back the file on execution exit. The
script failed to do this due to a typo, it was using OLD_PATH instead
of OLD_FWPATH, since its inception since v3.17.

Its not as easy to just keep the old setting, it turns out that
resetting an empty setting won't actually do what we want, we need
to check if it was empty and set an empty space.

Without this we end up having the temporary path always set after
we run these tests.

Fixes: 0a8adf5847 ("test: add firmware_class loader test")
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 09:23:27 +01:00
..
arch tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
build tools build: Add tools tree support for 'make -s' 2018-02-25 11:03:43 +01:00
cgroup
firewire
hv hv: kvp: Avoid reading past allocated blocks from KVP file 2017-12-16 10:33:48 +01:00
iio iio: generic_buffer: be helpful about enabling channels 2015-08-16 10:51:26 +01:00
include tools include: Add a __fallthrough statement 2017-07-15 11:57:47 +02:00
laptop/freefall Move freefall program from Documentation/ to tools/ 2015-06-08 16:42:07 -06:00
lguest tools/lguest: Clean up include dir 2015-08-26 06:12:35 +02:00
lib tools lib traceevent: Fix prev/next_prio for deadline tasks 2017-08-06 19:19:46 -07:00
net tools/net: Use include/uapi with __EXPORTED_HEADERS__ 2015-11-15 17:24:33 -05:00
nfsd
perf perf session: Don't rely on evlist in pipe mode 2018-03-22 09:23:26 +01:00
power cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores 2017-05-14 13:32:54 +02:00
scripts tools build: Add tools tree support for 'make -s' 2018-02-25 11:03:43 +01:00
testing test_firmware: fix setting old custom fw path back on exit 2018-03-22 09:23:27 +01:00
thermal/tmon tools/thermal: tmon: use pkg-config also for CFLAGS 2015-10-10 11:32:31 +08:00
time
usb usbip: list: don't list devices attached to vhci_hcd 2018-02-03 17:04:30 +01:00
virtio tools/virtio: fix byteswap logic 2015-12-07 17:28:10 +02:00
vm tools/vm/slabinfo: fix an unintentional printf 2016-10-07 15:23:41 +02:00
Makefile tools: Add a "make all" rule 2015-11-12 18:58:10 -03:00