Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967AbaJCPhJ (ORCPT ); Fri, 3 Oct 2014 11:37:09 -0400 Received: from resqmta-ch2-05v.sys.comcast.net ([69.252.207.37]:56949 "EHLO resqmta-ch2-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512AbaJCPgn (ORCPT ); Fri, 3 Oct 2014 11:36:43 -0400 From: Shuah Khan To: akpm@linux-foundation.org, gregkh@linuxfoundation.org, colin.king@canonical.com, dbueso@suse.de, luto@amacapital.net Cc: Shuah Khan , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/5] selftests/timers: change test to use ksft framework Date: Fri, 3 Oct 2014 09:36:20 -0600 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change timers test to use kselftest framework to report test results. Signed-off-by: Shuah Khan --- tools/testing/selftests/timers/posix_timers.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c index 41bd855..f87d970 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -15,6 +15,8 @@ #include #include +#include "../kselftest.h" + #define DELAY 2 #define USECS_PER_SEC 1000000 @@ -194,16 +196,16 @@ int main(int argc, char **argv) printf("based timers if other threads run on the CPU...\n"); if (check_itimer(ITIMER_VIRTUAL) < 0) - return -1; + return ksft_exit_fail(); if (check_itimer(ITIMER_PROF) < 0) - return -1; + return ksft_exit_fail(); if (check_itimer(ITIMER_REAL) < 0) - return -1; + return ksft_exit_fail(); if (check_timer_create(CLOCK_THREAD_CPUTIME_ID) < 0) - return -1; + return ksft_exit_fail(); /* * It's unfortunately hard to reliably test a timer expiration @@ -215,7 +217,7 @@ int main(int argc, char **argv) * find a better solution. */ if (check_timer_create(CLOCK_PROCESS_CPUTIME_ID) < 0) - return -1; + return ksft_exit_fail(); - return 0; + return ksft_exit_pass(); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/