[SSSD] [PATCH] TESTS: Make whitespace_test pass without whitespace

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Mon Oct 5 13:49:03 UTC 2015


On 10/05/2015 04:38 PM, Lukas Slebodnik wrote:
> On (05/10/15 15:59), Nikolai Kondrashov wrote:
>> Hi everyone,
>>
>> The attached patch fixes the issue of whitespace_test failing when no trailing
>> whitespace was detected at all.
>>
> I do not understand the explanation.

Sorry, if I wasn't clear.

> Trailing whitespaces are not detected with unchaged file po/ca.po either.

The trailing whitespace is there in the unchanged "po/ca.po" file. I.e. there
*is* trailing whitespace in the source tree. However, we chose to ignore it.
It is detected by "git grep" but suppressed by AWK, in whitespace_test.

With updated "po/ca.po" the trailing whitespace is removed. As a consequence,
there is no more trailing whitespace in the whole source tree and "git grep"
returns 1, as it hasn't found anything. That makes whitespace_test quit with
status 1, failing the test.

The patch makes whitespace_test ignore exit status 1 from "git grep" (but
still abort on other error codes), AWK happily processes empty output and all
is fine.

Hope this makes it clearer.

Nick


More information about the sssd-devel mailing list