lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Aug 2023 10:32:28 +0100
From:   Richard Fitzgerald <rf@...nsource.cirrus.com>
To:     David Gow <davidgow@...gle.com>
CC:     <brendan.higgins@...ux.dev>, <rmoar@...gle.com>,
        <linux-kselftest@...r.kernel.org>, <kunit-dev@...glegroups.com>,
        <linux-kernel@...r.kernel.org>, <patches@...nsource.cirrus.com>
Subject: Re: [PATCH v5 02/10] kunit: string-stream: Improve testing of
 string_stream

On 25/08/2023 07:49, David Gow wrote:
> On Thu, 24 Aug 2023 at 22:33, Richard Fitzgerald
> <rf@...nsource.cirrus.com> wrote:
>>
>> Replace the minimal tests with more-thorough testing.
>>
>> string_stream_init_test() tests that struct string_stream is
>> initialized correctly.
>>
>> string_stream_line_add_test() adds a series of numbered lines and
>> checks that the resulting string contains all the lines.
>>
>> string_stream_variable_length_line_test() adds a large number of
>> lines of varying length to create many fragments, then tests that all
>> lines are present.
>>
>> string_stream_append_test() tests various cases of using
>> string_stream_append() to append the content of one stream to another.
>>
>> Adds string_stream_append_empty_string_test() to test that adding an
>> empty string to a string_stream doesn't create a new empty fragment.
>>
>> Signed-off-by: Richard Fitzgerald <rf@...nsource.cirrus.com>
>> ---
>> Changes since V4:
>> - Test cases for appending empty strings have been squashed into this
>>    patch.
>> - Call to string_stream_get_string() is wrapped in a local function
>>    get_concatenated_string(). This is to avoid a lot of code churn later
>>    when string_stream_get_string() is changed to return an unmanaged buffer.
>> ---
> 
> This looks good to me. I'm not 100% sold on the
> 'get_concatenated_string()' function long-term (despite its obvious
> benefits during the refactoring), but that's just personal taste. This
> version is fine regardless.
> 

Yes, we can remove it later. I just wanted to avoid having one enormous
patch that changes everything all over the place.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ