Skip to content

verify-firmware-load: add SOF_VERSION_CHECK variable - #853

Closed
plbossart wants to merge 1 commit into
thesofproject:mainfrom
plbossart:fix/skip-firmware-load
Closed

verify-firmware-load: add SOF_VERSION_CHECK variable#853
plbossart wants to merge 1 commit into
thesofproject:mainfrom
plbossart:fix/skip-firmware-load

Conversation

@plbossart

Copy link
Copy Markdown
Member

when using SOF_VERSION_CHECK=none, the verify-sof-version-check.sh
script is skipped.

This enables us to pass the kmod load/unload tests with IPC4, e.g with

SOF_VERSION_CHECK=none SOF_LOGGING=none TPLG=/lib/firmware/intel/avs-tplg/sof-hda-generic.tplg ~/sof-test/test-case/check-kmod-load-unload-after-playback.sh

Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com

when using SOF_VERSION_CHECK=none, the verify-sof-version-check.sh
script is skipped.

This enables us to pass the kmod load/unload tests with IPC4, e.g with

SOF_VERSION_CHECK=none SOF_LOGGING=none TPLG=/lib/firmware/intel/avs-tplg/sof-hda-generic.tplg ~/sof-test/test-case/check-kmod-load-unload-after-playback.sh

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

setup_kernel_check_point

( set +x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over debug code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i copy-pasted it from your SOF_LOGGING work :-)

I have no idea what this does.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set -x enables tracing/"logging". This is useful to log complex commands (with many parameters) without copy/paste.

set +x turns it off, see help set and https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html

The ( set +x ... ) subshell makes the set +x change local to it, not affecting the current / parent shell. Similar to { int i; ... } in C.

( set +x
if [ "$SOF_VERSION_CHECK" = 'none' ]; then
printf '$''SOF_VERSION_CHECK=none, skipping verify-sof-firmware-load.sh\n'
exit 2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a much more readable skip_test function now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what you had in mind?

if [ "$SOF_VERSION_CHECK" = 'none' ]; then
        skip_test ''SOF_VERSION_CHECK=none"
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this should work and be equivalent.

dlogi "checking if firmware is loaded successfully"
"$(dirname "${BASH_SOURCE[0]}")"/verify-sof-firmware-load.sh ||
die "Failed to load firmware after module insertion"
( set +x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over debug code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, you tell me...

( set +x
if [ "$SOF_VERSION_CHECK" = 'none' ]; then
printf '$''SOF_VERSION_CHECK=none, skipping verify-sof-firmware-load.sh\n'
dlogi "==== firmware boot check skipped: $idx of $loop_cnt ===="

@marc-hb marc-hb Feb 9, 2022

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency:

Suggested change
dlogi "==== firmware boot check skipped: $idx of $loop_cnt ===="
dlogi "==== firmware load check skipped: $idx of $loop_cnt ===="

(and again below)

@marc-hb

marc-hb commented Feb 9, 2022

Copy link
Copy Markdown
Collaborator

Rather than adding yet another variable I'd rather make this test simply pass with IPC4. This test was buggy anyway!!! See fix submitted in #855

@marc-hb marc-hb added the IPC4 label Feb 10, 2022
@plbossart plbossart closed this Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants