Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751800AbdIUTme (ORCPT ); Thu, 21 Sep 2017 15:42:34 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:34633 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751706AbdIUTmc (ORCPT ); Thu, 21 Sep 2017 15:42:32 -0400 Subject: Re: [tip:timers/core] kselftests: timers: set-timer-lat: Tweak reporting when timer fires early To: Greg Hackmann , Prarit Bhargava , John Stultz , Shuah Khan Cc: lkml , Richard Cochran , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Stephen Boyd , Miroslav Lichvar , linux-tip-commits@vger.kernel.org, Josef Bacik , Shuah Khan , Shuah Khan References: <04d5e9e4-ef81-a9e7-8180-2c668e3af9d0@kernel.org> <36087647-31b1-95a1-fd74-b22f7d931010@redhat.com> From: Shuah Khan Message-ID: <28d7cdfc-7ed3-70b1-77e3-9b9a10373361@osg.samsung.com> Date: Thu, 21 Sep 2017 13:42:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3634 Lines: 85 On 09/21/2017 01:40 PM, Greg Hackmann wrote: > On 09/20/2017 04:38 PM, Shuah Khan wrote: >> On 09/20/2017 06:31 AM, Prarit Bhargava wrote: >>> On 09/19/2017 11:36 PM, John Stultz wrote: >>>> On Tue, Sep 19, 2017 at 6:02 PM, Shuah Khan wrote: >>>>> Hi Greg, >>>>> >>>>> On 08/20/2017 03:56 AM, tip-bot for Greg Hackmann wrote: >>>>>> Commit-ID: a524b1184b8e86141d689fa78ad150fbf2db9b4c >>>>>> Gitweb: http://git.kernel.org/tip/a524b1184b8e86141d689fa78ad150fbf2db9b4c >>>>>> Author: Greg Hackmann >>>>>> AuthorDate: Tue, 25 Jul 2017 14:36:25 -0700 >>>>>> Committer: John Stultz >>>>>> CommitDate: Thu, 17 Aug 2017 12:14:54 -0700 >>>>>> >>>>>> kselftests: timers: set-timer-lat: Tweak reporting when timer fires early >>>>>> >>>>>> Rather than printing an error inside the alarm signal handler, set a >>>>>> flag that we check later. This keeps the test from spamming the console >>>>>> every time the alarm fires early. It also fixes the test exiting with >>>>>> error code 0 if this was the only test failure. >>>>>> >>>>>> Cc: Thomas Gleixner >>>>>> Cc: Ingo Molnar >>>>>> Cc: Miroslav Lichvar >>>>>> Cc: Richard Cochran >>>>>> Cc: Prarit Bhargava >>>>>> Cc: Stephen Boyd >>>>>> Cc: Shuah Khan >>>>>> Cc: linux-kselftest@vger.kernel.org >>>>>> Signed-off-by: Greg Hackmann >>>>>> Signed-off-by: John Stultz >>>>> >>>>> This commit is making the set-timer-lat hang. I reverted this commit >>>>> and there is no hang. Could you please take a look and see if this >>>>> commit should be reverted. >>>>> >>>>> make kselftest as well as make -C tools/testing/selftests/timers run_tests >>>>> hang. >>>> >>>> Do you have any specific details as to how the test hangs? (ie: Log >>>> data, as in where it might be when it hangs? Any details about the >>>> machine?) >>>> >>>> I'm not seeing it so far in my testing. >>>> >>> >>> I just ran it here and don't see any issues. I'll try on a few other boxes >>> to make sure. >>> >>> # make -C tools/testing/selftests/timers run_tests >> >> John/Prarit, >> >> Thanks for getting back to me. I isolated the problem to redirecting >> test output. If I redirect the output it hangs. >> >> ./set-timer-lat > /tmp/set-timer-lat 2>&1 >> >> it hangs. The reason I am seeing this is because there is a patch >> that came in recently to redirect individual test output to a separate >> file to make it easier to understand the test results. >> >> Looks like Commits 28be3f8f48cfb3cf024860f042d424cd4824f5f7 and/or >> a524b1184b8e86141d689fa78ad150fbf2db9b4c add dependency on stdin/out/err >> to the test. >> >> Anyway just an update. It can be reproduced easily. If we have tests >> that can't tolerate redirecting output, I might end up dropping the >> patch that is in linux-kselftest fixes >> >> fbcab13d2e2511a858590846ac2e2d7cbd830591 >> >> So fat set-timer-lat is the only one I found. >> >> thanks, >> -- Shuah >> > I'm able to reproduce this locally, though I'm not sure it's a redirection issue. 28be3f8f48cf ("kselftests: timers: set-timer-lat: Add one-shot timer test cases") appears to have a regression where if timer_create() fails due to missing CAP_WAKE_ALARM, do_timer() will still try to run the test anyway. Yeah I found two problems - patches on their way. The first one returning 0 for unsupported alarm cases and a second in select. Just about to send patches. Will cc on those. thanks, -- Shuah