[PATCH 3/3] env: mmc: rework mmc_env_partition_by_guid() to work with two separate partitions

Quentin Schulz quentin.schulz at cherry.de
Mon Sep 23 13:10:02 CEST 2024


  Hi Rasmus,

On 9/19/24 9:01 AM, Rasmus Villemoes wrote:
> Quentin Schulz <quentin.schulz at cherry.de> writes:
> 
>> Hi Rasmus,
>>
>> For this patch and the previous one, should we have test(s) to make
>> sure we don't regress?
>>
> 
> That's obviously a good idea. But I don't have any idea how I'd go about
> writing such tests. AFAICT, there is no existing tests of the "find env
> partition by GUID" logic that I could amend, or any tests of any of the
> "find the mmc partition containing the env" for that matter. Pointers
> appreciated.
> 

I have never written tests for U-Boot so wouldn't be able to provide 
pointers there, sorry :/

> FWIW, on my end, I think I'll enable CONFIG_PARTITION_TYPE_GUID on all
> our configs and stop defining the real values of the ENV_OFFSET, so that
> our boards will start depending on the guid logic to find the env
> partitions. Which will then at least eventually find a regression, but
> unfortunately we usually lag some months behind on upgrading, and very
> rarely have resources for checking -rcX, so we would only find it after
> a release.
> 

Relying on manual tests is better than none, but still bad :)

Could it be something that could be automated with labgrid somehow? 
Simon has posted some support for labgrid recently for testing U-Boot on 
real boards, maybe that's something you'd be interested in?

Cheers,
Quentin


More information about the U-Boot mailing list