From: Shuah Khan <skhan@linuxfoundation.org>
To: Takashi Iwai <tiwai@suse.de>, Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Nick Terrell <terrelln@fb.com>, Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 2/5] selftests: firmware: Use smaller dictionary for XZ compression
Date: Mon, 25 Apr 2022 13:43:42 -0600 [thread overview]
Message-ID: <156bafb7-19e2-ed2f-63aa-64236d28a06e@linuxfoundation.org> (raw)
In-Reply-To: <20220421152908.4718-3-tiwai@suse.de>
On 4/21/22 9:29 AM, Takashi Iwai wrote:
> The xz -9 option leads to an unnecessarily too large dictionary that
> isn't really suitable for the kernel firmware loader. Pass the
> dictionary size explicitly, instead.
>
> While we're at it, make the xz command call defined in $RUN_XZ for
> simplicity.
>
> Fixes: 108ae07c5036 ("selftests: firmware: Add compressed firmware tests")
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> tools/testing/selftests/firmware/fw_filesystem.sh | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
> index c2a2a100114b..731f011def78 100755
> --- a/tools/testing/selftests/firmware/fw_filesystem.sh
> +++ b/tools/testing/selftests/firmware/fw_filesystem.sh
> @@ -11,6 +11,8 @@ TEST_REQS_FW_SET_CUSTOM_PATH="yes"
> TEST_DIR=$(dirname $0)
> source $TEST_DIR/fw_lib.sh
>
> +RUN_XZ="xz -C crc32 --lzma2=dict=2MiB"
> +
> check_mods
> check_setup
> verify_reqs
> @@ -410,9 +412,9 @@ test_request_firmware_nowait_custom()
> RANDOM_FILE_PATH=$(setup_random_file)
> RANDOM_FILE="$(basename $RANDOM_FILE_PATH)"
> if [ "$2" = "both" ]; then
> - xz -9 -C crc32 -k $RANDOM_FILE_PATH
> + $RUN_XZ -k $RANDOM_FILE_PATH
> elif [ "$2" = "xzonly" ]; then
> - xz -9 -C crc32 $RANDOM_FILE_PATH
> + $RUN_XZ $RANDOM_FILE_PATH
> fi
> config_set_name $RANDOM_FILE
> config_trigger_async
> @@ -501,7 +503,7 @@ test_request_partial_firmware_into_buf_nofile 2 10
> test "$HAS_FW_LOADER_COMPRESS" != "yes" && exit 0
>
> # test with both files present
> -xz -9 -C crc32 -k $FW
> +$RUN_XZ -k $FW
> config_set_name $NAME
> echo
> echo "Testing with both plain and xz files present..."
>
Thank you. Looks good to me.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
next prev parent reply other threads:[~2022-04-25 19:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 15:29 [PATCH 0/5] Firmware loader support for ZSTD-compressed files Takashi Iwai
2022-04-21 15:29 ` [PATCH 1/5] firmware: Add the support for ZSTD-compressed firmware files Takashi Iwai
2022-04-21 15:29 ` [PATCH 2/5] selftests: firmware: Use smaller dictionary for XZ compression Takashi Iwai
2022-04-25 19:43 ` Shuah Khan [this message]
2022-04-21 15:29 ` [PATCH 3/5] selftests: firmware: Fix the request_firmware_into_buf() test for XZ format Takashi Iwai
2022-04-25 19:45 ` Shuah Khan
2022-04-21 15:29 ` [PATCH 4/5] selftests: firmware: Simplify test patterns Takashi Iwai
2022-04-25 19:48 ` Shuah Khan
2022-04-21 15:29 ` [PATCH 5/5] selftests: firmware: Add ZSTD compressed file tests Takashi Iwai
2022-04-25 19:50 ` Shuah Khan
2022-04-21 16:48 ` [PATCH 0/5] Firmware loader support for ZSTD-compressed files Luis Chamberlain
2022-04-22 6:38 ` Takashi Iwai
2022-04-22 6:50 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=156bafb7-19e2-ed2f-63aa-64236d28a06e@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=shuah@kernel.org \
--cc=terrelln@fb.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox