[systemd-devel] tests

Thomas H.P. Andersen phomes at gmail.com
Wed Jan 30 23:35:56 PST 2013


Hi Zbigniew,

_cleanup_free_ only cleans up when the variable goes out of scope
right? So just using it on "r" here would leak all but the last use of
it?

Using individual variables for each test case like r1, r2, r3, etc
could be a solution. Or using something like your recent "#define
expect" would work as well. But for a case as simple as this I think
the code might be more readable as it is.

What do you suggest?

On Thu, Jan 31, 2013 at 5:48 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Wed, Jan 30, 2013 at 10:18:46PM +0100, Daniel Buch wrote:
>> I did some improvements on strv-test.c and added additional test, more is
>> on its way.
>>
>> Patch files is attached.
>>
>> What do you think?
> Hi,
> more tests are usually good ;) Applied.
>
> In the future, try using _cleanup_free_, and please send patches as
> separate e-mails.  If you can use git format-patch and git send-email,
> that would be best.
>
> Zbyszek
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list