On (11/02/16 12:43), Pavel Březina wrote:
On 02/10/2016 01:14 PM, Pavel Reichl wrote:
>On 02/10/2016 12:50 PM, Pavel Březina wrote:
>>On 02/10/2016 12:44 PM, Pavel Reichl wrote:
>>>
>>>
>>>On 02/10/2016 11:38 AM, Pavel Březina wrote:
>>>
>>>>
>>>>You can still use assertions in fixtures (I just checked with asn to
>>>>be sure) and that is the way we should lean to. So forget error codes
>>>>and debug messages here, use assertions to make it cleaner and shorter.
>>>>
>>>>>
>>>
>>>Thanks Pavel, can you please check if first version of the patch would
>>>work for you?
>>
>>Yes, it works for me.
>
>Hello, I added types and made constants local to functions that use them
>as Lukas and Pavel wished for. I also fixed the trailing '{' it the
>function definition as Lukas pointed out.
My intend was to keep TEST_2922_MIN/MAX_ID as a macro and the const's should
be also declared as static, but let's not postpone this patch any longer.
It's just a unit test anyway so it doesn't really matter.
Ack from me.
master:
* 9d17f436795a36b1b1126f444923aa847fd0f93a
sssd-1-13:
* 8c1f3b27d8e20b271dfea0c41fd864e9af5476f5
BTW I found a candidate for our coding style guide.
Or maybe for contributing guide
Patches should not contain unrelated changes.
They should contain only what is described in commit message.
Example from this patch. (Coding style changes in unrelated/untouched part
of code)
@@ -152,7 +200,8 @@ static int test_sss_idmap_setup_with_domains_sec_slices(void **state)
{
return 0;
}
-static int test_sss_idmap_setup_with_external_mappings(void **state) {
+static int test_sss_idmap_setup_with_external_mappings(void **state)
+{
struct test_ctx *test_ctx;
test_sss_idmap_setup(state);
@@ -164,7 +213,8 @@ static int test_sss_idmap_setup_with_external_mappings(void **state)
{
return 0;
}
-static int test_sss_idmap_setup_with_both(void **state) {
+static int test_sss_idmap_setup_with_both(void **state)
+{
LS