Re: [PATCH] tests: add test_response_start_auth_session_no_sessions_2
Jarkko Sakkinen <[email protected]> Tue, 2 Sep 2025 12:15:34 +0300
| Newsgroups | dev.linux.lists.tpm-protocol |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Sep 02, 2025 at 04:26:20AM +0300, Jarkko Sakkinen wrote: > Add a test taken from tpm2sh trace output, which reveals a bug in the > response parser not catched by previous tests. > > Signed-off-by: Jarkko Sakkinen <[email protected]> > --- > This is a embarrassing critical bug and damage from refactorization > where `tpm_response!` macro was removed which was a compilicated task. > The bright side is that the quality of test suite also leveled up > as consequence and missing something as critical as this will become > factors more difficult. > > Luckily response parsing it not too complicated, and this can be fixed > quite easily. Dispatcher must be internally updated to pass the runtime > parsed tag forward (just like it does for cc). I.e. a few macro updates > should do. What happened here basically was that I was so focused on command parsing, which felt more complicated (given e.g. how authorization area is located) that I made some really unconsidered change on response parser. It's easy to fix, and in the end better than having this other way around. BR, Jarkko