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] [day] [month] [year] [list]
Date:   Thu, 17 Oct 2019 12:17:11 -0500
From:   Frank Rowand <frowand.list@...il.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Stephen Boyd <swboyd@...omium.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of: unittest: Use platform_get_irq_optional() for
 non-existing interrupt

On 10/17/2019 07:51, Rob Herring wrote:
> On Thu, Oct 17, 2019 at 1:59 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>
>> Hi Stephen,
>>
>> On Thu, Oct 17, 2019 at 1:23 AM Stephen Boyd <swboyd@...omium.org> wrote:
>>> Quoting Geert Uytterhoeven (2019-10-16 07:31:42)
>>>> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
>>>> index 9efae29722588a35..34da22f8b0660989 100644
>>>> --- a/drivers/of/unittest.c
>>>> +++ b/drivers/of/unittest.c
>>>> @@ -1121,7 +1121,7 @@ static void __init of_unittest_platform_populate(void)
>>>>                 np = of_find_node_by_path("/testcase-data/testcase-device2");
>>>>                 pdev = of_find_device_by_node(np);
>>>>                 unittest(pdev, "device 2 creation failed\n");
>>>> -               irq = platform_get_irq(pdev, 0);
>>>> +               irq = platform_get_irq_optional(pdev, 0);
>>>>                 unittest(irq < 0 && irq != -EPROBE_DEFER,
>>>
>>> This is a test to make sure that irq failure doesn't return probe defer.
>>> Do we want to silence the error message that we're expecting to see?

No, we do not want to silence an error message that we are expecting to see.


>>
>> I think so.  We're not interested in error messages for expected failures,
>> only in error messages for unittest() failures.

platform_get_irq() is precisely the function that we are trying to test here.


> 
> The unittests start with a warning that error messages will be seen.
> OTOH, we didn't get a message here before.
Getting error messages from places outside of unittest.c is just the
nature of the devicetree selftest beast.

-Frank

> 
> Rob
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ