[PATCH v3 28/29] test: serial: Add test for putc/puts

Sean Anderson sean.anderson at seco.com
Mon Mar 28 17:37:13 CEST 2022



On 3/28/22 2:35 AM, Simon Glass wrote:
> Hi Sean,
> 
> On Tue, 22 Mar 2022 at 15:00, Sean Anderson <sean.anderson at seco.com> wrote:
>>
>> This adds a test to ensure that puts is equivalent to putc called in a
>> loop. We don't verify the contents of the message to avoid having to
>> record console output a second time (though that could be added in the
>> future). The globals are initialized to non-zero values to avoid a
>> warning; in particular, the character count is off-by-one (but we always
>> make relative measurements).
>>
>> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
>> ---
>>
>> Changes in v3:
>> - New
>>
>>  arch/sandbox/include/asm/serial.h |  6 ++++++
>>  drivers/serial/sandbox.c          | 23 +++++++++++++++++++----
>>  test/dm/serial.c                  | 19 +++++++++++++++++++
>>  3 files changed, 44 insertions(+), 4 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> But please can you add functions to change sandbox_serial_enabled (and
> read from sandbox_serial_written) to asm/test.h since that is how
> these sorts of things are done in other drivers.
> 

Sure.

--Sean


More information about the U-Boot mailing list