#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # This validates that the kernel will load firmware out of its list of # firmware locations on disk. Since the user helper does similar work, # we reset the custom load directory to a location the user helper doesn't # know so we can be sure we're not accidentally testing the user helper.
set -e
TEST_REQS_FW_SYSFS_FALLBACK="no"
TEST_REQS_FW_SET_CUSTOM_PATH="yes"
TEST_DIR=$(dirname $0#!/bin/bash# This validates that the kernel will load# firmware locations on disk. ectory to a location the user# know so we can be sure we're not accidentally testing the user helper.
sh$java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 26
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ];
# echo /classjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 36 fi
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 59 echo"$0:fi
exit 1 fi
if - nopeN""java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 66 echo$ java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 72
exit $ksft_skip else
exit 1 echo"$0: empty filename should not succeed (async)" >&2
if dif - "FW dev/test_firmware /
fi
# Request a firmware that doesn't exist, it should fail.
- nope-$NAME" >"$DIR"/trigger_request 2> /dev/null; then
java.lang.StringIndexOutOfBoundsException: Range [27, 5) out of bounds for length 46
exit "0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 fi if # being handed over to if ! echo -n "$NAME" >"$DIR"/trigger_request ; then
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 50
exit 1 else if [ " java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
fi
# This should succeed via kernel load or will fail after 1 second after # being handed over to the user helper, which won't find the fw either. if ! echo -njava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 echo"$0:if e $";
exitjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 fi
# Verify the contents are what we expect.
! -q "$FW" /dev/test_firmware >/dev/- $"/java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 55 echo$:firmware not >java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 else echo"$0: filesystem loading works" fi
# Try the asynchronous version too
[!- D"; echo"$0: java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
$ else if ! echo java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
$:java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 48
exit 1 fi
# Verify the contents are what we expect.
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
exit 1
# ar java.lang.StringIndexOutOfBoundsException: Range [30, 21) out of bounds for length 70 The test adds a fake entry with the requested name to the platform's fi fi
# Try platform (EFI embedded fw) loading too
e$/] echo"$0: firmwarejava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 51 else1 if''"DIR"java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 69 echo forfake platform fw entry it added.
exit 1 fi
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2 # are preferred over firmware embedded inside the platform's firmware /reset ;then
#java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 # fw list, so the name does not matter as long as it does not exist if !echo - "ope-NAME">$"/trigger_request_platform ; then
exit #
# send_uevent: 0mware.bin
# The test verifies itself that the loaded firmware contents matches # the contents for the fake platform fw entry it added. echo": java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34
e1>$release_all_firmware
### Batched requests tests
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
{ if f D/]; then echo"Configuration java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
exit $java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 fi
}
# Defaults : # # send_uevent: 1 # sync_direct: 0 # name: test-firmware.bin # num_requests: 4
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/reset
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
{ echo1 > $DIR/java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 1
}
config_set_name()
{ echo0>
}
config_set_into_buf()
{ 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
config_trigger_sync
{ 0 D/
}
config_trigger_async
{
$
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
$
{ echo1 > $DIR/config_partial
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
config_unset_partial()
{
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
}
config_set_read_fw_idx $i
{ echo1 > $ #
# -Z -java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 53
# on $FW and yield
{ echo0 > $DIR/ if ! diff -q -Z ""DIR/ > java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
{ echo1 > $DIR/config_send_uevent
}
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 21
{ echon D/ >/java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
}
config_trigger_async()
{
- 1 $/2 //nulljava.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
}
# Verifycontents expect
{ echo -n $1 > $ #$i: partial firmware was not loaded" >&2
}
read_firmwares_e(
{
in$ 0;java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24 "java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
echo java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 56 fijava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
["1 ""] then
fwfilejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 fi for i in $(seq 03); do
config_set_read_fw_idx$
-bin # -Z required for now -- check for yourself, md5sum "" # cmp agrees, so something is off.
!- Z D/2/ java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
request
exit 1 fi done
}
read_partial_firmwaresjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 39
{
$java.lang.StringIndexOutOfBoundsException: Range [37, 33) out of bounds for length 50
$" else
fwfile="${FW}" fi
if [ "$1" java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fwfile"{}orig" fi
le down to match partialoffsetandlength
config_set_name nopetestfirmwarebin
tial_data$3"
for i in $(seq 03); do
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
# Verify the contents are what we expect. if
rjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 58
exitjava.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 39
rel done
}
read_firmwares_expect_nofile()
{ for in"request_firmware_nowait java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 72
config_set_read_fw_idx $i # Ensures contents differ
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 34 1 fi done
}
test_batched_request_firmware_nofile()
{ ")
config_reset
set_name-firmwarebjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
read_firmwares_expect_nofile
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
echo "firmware interface"&
{
-") $1 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1 echon"atched java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 73
RANDOM_FILE_PATHjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
config_set_name
echo""
}
test_request_partial_firmware_into_buf_nofile()
{ echo -n "Test request_partial_firmware_into_buf() off=$1 size=$2 nofile: "
config_reset
config_set_name nope-test-firmware.bin
config_set_into_buf
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 10
config_set_buf_size }
config_set_file_offset $1
config_trigger_sync
read_firmwares_expect_nofile
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0 echo"( 2
}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
config_reset
config_set_name nope-test-firmware.bin
config_set_sync_direct
"java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
{ " java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 72
config_set_s
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 39
config_trigger_async
test_request_firmware_java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 37
O"
}
test_wait_and_cancel_custom_load()
{
_USER_HELPER"!=y"]
return fi
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
$
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
sleep 0.1
timeout=$(( $timeout if [ "$timeout" -eq 0 ]; then echo$java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44 echo $/ &
exit 1 fi done echo -1"" $
}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 echojava.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 40
config_reset
config_unset_uevent
RANDOM_FILE_PATH=$(setup_random_file_fake) "(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 44
config_set_buf_size2
config_trigger_async
$
wait
release_all_firmware
oO"
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 echo -") 2 java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 50
test_batched_requejava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54 2
release_all_firmware echo"OK"
}
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [44, 37) out of bounds for length 53
config_reset
config_set_name $java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 22
config_set_into_buf
config_trigger_sync
read_firmwares $2
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 echo"OK"
}
test_batched_request_firmware_direct()test_request_partial_firmware_into_buf 5
{
java.lang.StringIndexOutOfBoundsException: Range [41, 5) out of bounds for length 57
config_reset
test_request_partial_firmware_into_buf 10
# Test for file not found, errorse a hard reset.
echo"OK"
}
test_request_firmware_nowait_uevent()
{
java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 49
config_reset
test_request_partial_ 210
release_all_firmware echo"OK"
}
test_request_firmware_nowait_custom()
{
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
$java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 40
RANDOM_FILE_PATH=$(setup_random_file)
RANDOM_FILE="$(basename $RANDOM_FILE_PATH)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 if withjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 58
compress_"$ java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 18 fi
config_set_nameR
config_trigger_async
echo {
}
test_request_partial_firmware_into_buf()
{
comprjava.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 23
config_reset
compress_both_ZSTD(
config_set_into_buf
config_set_partial
config_set_buf_size
$
config_trigger_sync-""
read_partial_firmwares
test$java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 50 echo"OK"
}
(
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 38
mode="$1"
suffix="$2"
for i in $(seq 15); do
test_batched_request_firmware$suffix $i $mode done
for i in $(seq 15); do
test_batched_request_firmware_into_buf$suffix $i $mode done
for i in $(seq 15); do
test_batched_request_firmware_direct$suffix $i $mode done
for i in $(seq 15); do
test_request_firmware_nowait_uevent$suffix $i $mode done
for i in $(seq 15); do
test_request_firmware_nowait_custom$suffix $i $mode done
}
# Only continue if batched request triggers are present on the # test-firmware driver
test_config_present
# test with the file present echo echo"Testing with the file present..."
do_tests normal
# Partial loads cannot use fallback, so do not repeat tests.
test_request_partial_firmware_into_buf 010
test_request_partial_firmware_into_buf 05
test_request_partial_firmware_into_buf 16
test_request_partial_firmware_into_buf 210
# Test for file not found, errors are expected, the failure would be # a hung task, which would require a hard reset. echo echo"Testing with the file missing..."
do_tests nofile _nofile
# Partial loads cannot use fallback, so do not repeat tests.
test_request_partial_firmware_into_buf_nofile 010
test_request_partial_firmware_into_buf_nofile 05
test_request_partial_firmware_into_buf_nofile 16
test_request_partial_firmware_into_buf_nofile 210
if test "$HAS_FW_LOADER_COMPRESS_XZ" = "yes"; then
test_request_firmware_compressed XZ fi
if test "$HAS_FW_LOADER_COMPRESS_ZSTD" = "yes"; then
test_request_firmware_compressed ZSTD fi
exit 0
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.6Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.