-
Notifications
You must be signed in to change notification settings - Fork 44
Add mtl-s to v2.15.1 and a signing-key continuity check #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
716b6e8
26478f1
4967cf0
9ee9f46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
|
|
||
| name: key-continuity | ||
|
|
||
| # yamllint disable-line rule:truthy | ||
| on: [push, pull_request, workflow_dispatch] | ||
|
|
||
| jobs: | ||
| testjob: | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| - name: apt-get update | ||
| run: sudo apt-get update | ||
|
|
||
| - name: apt-get install | ||
| run: sudo apt-get -y install bats | ||
|
|
||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: run signing key continuity tests | ||
| run: bats tests/key_continuity.bats | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
|
|
||
| # https://bats-core.readthedocs.io/en/stable/tutorial.html | ||
|
|
||
| setup() | ||
| { | ||
| mkdir -p testruns/ | ||
| RUN_DIR=$(mktemp -d testruns/run-XXXXXX) | ||
| } | ||
|
|
||
| teardown() | ||
| { | ||
| test -d "$RUN_DIR"/ || return 1 | ||
| rm -rf "${RUN_DIR:?}"/ | ||
| } | ||
|
|
||
| # You MUST call popd at the end | ||
| test_init() | ||
| { | ||
| pushd "$RUN_DIR"/ || exit 1 | ||
| load 'common_helpers.bash'; set_constants | ||
| } | ||
|
|
||
| # Workaround for https://github.com/koalaman/shellcheck/issues/2431 | ||
| # shellcheck disable=SC2030 | ||
| @test "signing key continuity: sof-ipc4-v*" { | ||
| test_init | ||
|
|
||
| local pair | ||
| cd "$TOP_DIR" | ||
| while IFS= read -r pair; do | ||
| test -n "$pair" || continue | ||
| local prev="${pair%% *}" curr="${pair##* }" | ||
|
|
||
| run_compare_signing_keys "$prev" "$curr" | ||
|
|
||
| case "$prev $curr" in | ||
|
|
||
| # No mismatch expected | ||
| *) | ||
| assert_eq_signing_key $status 0;; | ||
| esac | ||
| done < <(discover_point_release_pairs 'sof-ipc4-v*') | ||
|
|
||
| popd || return 1 | ||
| } | ||
|
|
||
| # Workaround for https://github.com/koalaman/shellcheck/issues/2431 | ||
| # shellcheck disable=SC2030 | ||
| @test "signing key continuity: sof-ipc4-lib-v*" { | ||
| test_init | ||
|
|
||
| local pair | ||
| cd "$TOP_DIR" | ||
| while IFS= read -r pair; do | ||
| test -n "$pair" || continue | ||
| local prev="${pair%% *}" curr="${pair##* }" | ||
|
|
||
| run_compare_signing_keys "$prev" "$curr" | ||
|
|
||
| case "$prev $curr" in | ||
|
|
||
| # No mismatch expected | ||
| *) | ||
| assert_eq_signing_key $status 0;; | ||
| esac | ||
| done < <(discover_point_release_pairs 'sof-ipc4-lib-v*') | ||
|
|
||
| popd || return 1 | ||
| } | ||
|
|
||
| # For every vX.Y.x directory with 2+ matches of $1 (a glob like | ||
| # 'sof-ipc4-v*'), emit every consecutive (prev, curr) pair, one pair per | ||
| # line as "prev curr", sorted by version. | ||
| discover_point_release_pairs() | ||
| { | ||
| local glob_pattern="$1" | ||
| local vdir | ||
| for vdir in v*.x; do | ||
| test -d "$vdir" || continue | ||
|
|
||
| local matches=() | ||
| while IFS= read -r m; do | ||
| matches+=("$m") | ||
| done < <(find "$vdir" -maxdepth 1 -type d -name "$glob_pattern" | sort -V) | ||
|
|
||
| local n=${#matches[@]} | ||
| test "$n" -ge 2 || continue | ||
|
|
||
| local i | ||
| for ((i = 0; i < n - 1; i++)); do | ||
| printf '%s %s\n' "${matches[$i]}" "${matches[$((i + 1))]}" | ||
| done | ||
| done | ||
| } | ||
|
|
||
| run_compare_signing_keys() | ||
| { | ||
| local prev="$1" curr="$2" | ||
| local run_cmd=("$TOP_DIR"/validate_sof_install.py --compare-signing-keys "$prev" "$curr") | ||
|
|
||
| unset BATS_RUN_COMMAND | ||
| run "${run_cmd[@]}" | ||
| # BATS_RUN_COMMAND is not available in bats version 1.2.1 | ||
| test -n "$BATS_RUN_COMMAND" || BATS_RUN_COMMAND="${run_cmd[*]}" | ||
|
|
||
| # This is not modifying $output, shellcheck seems wrong | ||
| # shellcheck disable=SC2031 | ||
| printf '%s\n' "$output" | ||
| # This is not modifying $status, shellcheck seems wrong | ||
| # shellcheck disable=SC2031 | ||
| printf '\n --- %d returned by %s ---\n\n' \ | ||
| $status "$BATS_RUN_COMMAND" | ||
| } | ||
|
|
||
| assert_eq_signing_key() | ||
| { | ||
| local actual=$1 expected=$2 | ||
|
|
||
| test "$actual" -eq "$expected" || { | ||
| >&2 printf 'FAIL: expected %d, got %d from %s\n' \ | ||
| "$expected" "$actual" "$BATS_RUN_COMMAND" | ||
| false | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../mtl/community/sof-mtl.ri | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not 2.15.1 release! This is still binary for v2.15 SOF release. It is a point release of sof-bin-v2026.09.1 that has missing binaries. Btw: you should have your own signed-off as well in the commits |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../mtl-s/intel-signed/sof-mtl-s.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-arl-s.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../mtl/community/sof-mtl.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-lnl.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-mtl-s.ri | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have never released this firmware, all previous releases have "arl-s" only and none of our build scripts support sof-mtl-s.ri. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-mtl.ri | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is same as v2.15/mtl/intel-signed/sof-mtl.ri (not needed here) |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-nvl-s-openmodules.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-nvl-s.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-nvl-openmodules.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-nvl.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-ptl-openmodules.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-ptl.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-wcl-openmodules.ri |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| intel-signed/sof-wcl.ri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit old