Re: [RFC PATCH] lib/asn1_decoder: add KUnit test suite

From: Jarkko Sakkinen

Date: Mon Nov 16 2026 - 20:32:16 EST


On Tue, Nov 17, 2026 at 12:17:17AM +0000, William Chuang wrote:
> Add a KUnit test suite for the ASN.1 BER/DER decoder in
> lib/asn1_decoder.c. A tiny two-field grammar (SEQUENCE { INTEGER,
> OCTET STRING }) drives asn1_ber_decoder() with well-formed and
> malformed byte strings and checks that valid input is parsed and each
> class of malformed input is rejected with the documented error code
> rather than over-read.

1. I'm not convinced. Why overall?
2. Why KUnit?
3. Why host the test in kernel?

Br, Jarkko