Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbdHQDbT (ORCPT ); Wed, 16 Aug 2017 23:31:19 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:36916 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbdHQDbR (ORCPT ); Wed, 16 Aug 2017 23:31:17 -0400 MIME-Version: 1.0 In-Reply-To: References: <1502744496-17863-1-git-send-email-john.stultz@linaro.org> <1502744496-17863-2-git-send-email-john.stultz@linaro.org> <20170815121120.GB8800@localhost> <782f658d-6a32-8f6f-8757-d03f1ee29da3@osg.samsung.com> From: John Stultz Date: Wed, 16 Aug 2017 20:31:15 -0700 Message-ID: Subject: Re: [RFC][PATCH 2/2] selftests: timers: freq-step: Fix build warning To: Shuah Khan Cc: Miroslav Lichvar , lkml , Thomas Gleixner , Stephen Boyd , linux-kselftest@vger.kernel.org, Shuah Khan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7H3VPo5001855 Content-Length: 1478 Lines: 42 On Wed, Aug 16, 2017 at 4:10 PM, John Stultz wrote: > On Wed, Aug 16, 2017 at 4:01 PM, Shuah Khan wrote: >> Hi John, >> >> On 08/15/2017 06:11 AM, Miroslav Lichvar wrote: >>> On Mon, Aug 14, 2017 at 02:01:36PM -0700, John Stultz wrote: >>>> Fixes the following build warning: >>>> freq-step.c: In function ‘main’: >>>> freq-step.c:271:1: warning: control reaches end of non-void function [-Wreturn-type] >>> >>>> @@ -268,4 +268,6 @@ int main(int argc, char **argv) >>>> ksft_exit_fail(); >> >> This needs to be changes as well to return ksft_exit_fail(); >>>> >>>> ksft_exit_pass(); >>>> + >>>> + return 0; >>>> } >>> >>> It seems most tests use "return ksft_exit_pass();". Would that be >>> preferred over separate return? I don't have a preference. >> >> Let's go with "return ksft_exit_pass();" > > Thanks for the review, I've made both changes and I'll send these out > shortly with the rest of my 4.14 focused queue. Shuah, One more question here. I'm noticing that running "make run_destructive_tests" in the timers dir, the freq-step test returns ksft_exit_skip, which results in the test returning an exit code of 4, which causes make to think it failed, halting the testing. I'm guessing there is some extra logic for how to properly run extended tests such that the various error codes are handled and a skip doesn't result in the test stopping? Any suggestions/pointers? thanks -john