canonical / canonical/secboot

Refactor testing for tpm2 package

Open
#330 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
23
Forks
29
Avg merge
2d 8h
Merged PRs (30d)
2

Description

I want to refactor the testing to be more in line with one of the recently added packages, eg, plainkey:

1. For New* functions, test the returned private values against statically compiled values.
2. For serialization tests, test the serialization against a statically contained value, such as a JSON string or sequence of bytes
3. For deserialization tests, test the deserialization against statically contained values to detect for backwards compatibility issues
4. Add unit tests for other features as usual.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the tpm2 package tests with the recently added plainkey package. Locate tests for New* functions, serialization, and deserialization, then identify other features that lack unit coverage. Done means tests use statically contained values for private outputs and serialized data, detect backward-compatibility changes, and cover the remaining features.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.