# Re: \[PATCH net-next v2 07/10\] lib: packing: add additional KUnit tests

- From: Vladimir Oltean \<vladimir.oltean@nxp.com\>
- Date: 2024-10-03 15:21:11 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/10/11307352
- Thread: https://ratatoskr.run/netdev/2024/10/11307241/t.md

```text
On Wed, Oct 02, 2024 at 02:51:56PM -0700, Jacob Keller wrote:
> While reviewing the initial KUnit tests for lib/packing, Przemek pointed
> out that the test values have duplicate bytes in the input sequence.
> 
> In addition, I noticed that the unit tests pack and unpack on a byte
> boundary, instead of crossing bytes. Thus, we lack good coverage of the
> corner cases of the API.
> 
> Add additional unit tests to cover packing and unpacking byte buffers which
> do not have duplicate bytes in the unpacked value, and which pack and
> unpack to an unaligned offset.
> 
> A careful reviewer may note the lack tests for QUIRK_MSB_ON_THE_RIGHT. This
> is because I found issues with that quirk during test implementation. This
> quirk will be fixed and the tests will be included in a future change.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
```
