From patchwork Tue Feb 19 22:03:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 158741 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4185236jaa; Tue, 19 Feb 2019 14:04:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IauavapMRIbqKJYDkCdJBoh0KBkApyCds/3RbHLWiwN6OYR5eVEcuQqDOUgEWJgub5t6lwi X-Received: by 2002:a50:adfa:: with SMTP id b55mr25393050edd.160.1550613853748; Tue, 19 Feb 2019 14:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550613853; cv=none; d=google.com; s=arc-20160816; b=V2aHFDK+e/ExLAG0u5wCvVp8NssVvZ363YnSd8IdelH/WI1nuFUNJoaIh/GFHem0MT oQk8xwUPJ/5Ao/kbjtK73HeIsnKrjW1vTfc0E1DFkMTbhmrCM0ZjBJgXDMY9y1sNy2TY DqyodmvDdtotXq54SkvOGHRGsrsESk3lUOxVUP6fdCjLH8gW6XBkXuXfkLdCUZqhaBDy tklGr966WD3UTxHJT3bH5pgpHOj+m0v4NvHmItmrImyhO0xhvyy24GipvfliRtNxTul/ m08UzJbTod28/MLytmOaVZRBdgc7gd7I1aPxrShlupvDqvmSTQGpJb5oaYVc8+7LS1Up /OFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=B/lfSn3F8GvO7P5hWpk5pQnq8X1ekKIRjV4VJZN97yA=; b=iFn+9gvdMTExV7uAK7lWyNwV2k56hN2gf68SvtOnMnniwvu3Px9O/UvH9NnVJWuhkc OP6y7IFvJoZOk/KstYyCjqqdod2ymOreT03GhrL6x73P4iKKfWfYMkmMX39+LrvnVchV PNd63m/bRTCbMkZKXDFpwsJZOr0z8SdpjuYczBM9e7NCEa+Kjz96RM6/UXpZg4VtjEYZ jTdOtxguJnCUvyrLEzR9LBIE+kIQ54wQ7Oe8hXGgZHzWeF5Sz0ZnpUYrZk9nQuoEZRkv IYjOefNOiYNpACbseEvtbUcl5FkKqmN+qdx4o458SrCjCE/x0LOWoFP/AbUrsG6zvJmK ck3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qQmZuJl7; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id b25si1188462ejv.131.2019.02.19.14.04.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 14:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qQmZuJl7; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4A0B3294AC7 for ; Tue, 19 Feb 2019 23:04:13 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id 371D23EA35F for ; Tue, 19 Feb 2019 23:04:06 +0100 (CET) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id C9D2F140013B for ; Tue, 19 Feb 2019 23:04:04 +0100 (CET) Received: by mail-qt1-x842.google.com with SMTP id 2so25082212qtb.5 for ; Tue, 19 Feb 2019 14:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iGd2QyQkSQE+01qJz1nJ1816VWkuyZ3Lc+i4MFYKxRg=; b=qQmZuJl7keTgrrtgezgkHS9ETCViwlnfD4dluKCGQx+yf4PCbcwQksgk3wdrhDlJbR 0uXqUma5gOzdtRfYgAu+gGA36RLCxM7A+e99KSklin/up3zjeGQVhLaxBHfFYzYZ7NaN YWr+n9QB5c502yn4NSUQMBV2biIvXCkp3Lzz+vCilI6ITxoboBA4myqX6j/cV9M90ANp x4lKm6wWVXnbHyhf9fsobnVDvQTEjRvAB19ZNnpWYfEq3qg3/jbAbayOyMCIU/ByNvXx v+FAJ22CSCUEt13gITfTl7Tx+mM31D8YNbOCWpbTQ8SkmD5lnTFe1rkwtu58n4MJ/hcK xK7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iGd2QyQkSQE+01qJz1nJ1816VWkuyZ3Lc+i4MFYKxRg=; b=D1VzFR060Fx3o7gs0VTNexRK2f1YTqKuRSdN/MSQCXNfrmDnRdO9NHF8d4m041psUm jwwjMkWxLrq27EO8t3xYiu6GoW08oD09s/v08PRHebLyJROxXvmyA+WAfDwOkaE8S94y xPsG89LvFV4DMVBOhdslRLFAKct7o+Xc74IKu0CIJCHWYn3vbS+Wotbf/cJxZUZferTL c2LG8naW4zbL7MQb2ZSWP0iiLdzhy+/AB8+VdhDtKAE15zV+OM9hK4F8BPpsgOs4ZtPd R5MqYIjprusMg5lPghywL+N4zFdA4VOGjZ+ZtowIPx+0mhNQfZBst8qqD6xF538jE7O4 S0jQ== X-Gm-Message-State: AHQUAubvVsohLWDZbtnQzXfuq6Fh2oWM48e5cw63ZwdYy/k7r2QZK5Ky tpHtWQ31Q7LDG+RKmlNHDPZmaUK1XoViAA== X-Received: by 2002:a0c:9dc6:: with SMTP id p6mr23849913qvf.217.1550613843231; Tue, 19 Feb 2019 14:04:03 -0800 (PST) Received: from workstation.celeiro.br. ([2804:14c:8782:8061:32b5:c2ff:fe04:ac0]) by smtp.gmail.com with ESMTPSA id p15sm11674177qta.81.2019.02.19.14.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 14:04:02 -0800 (PST) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Tue, 19 Feb 2019 19:03:55 -0300 Message-Id: <20190219220355.32593-2-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190219220355.32593-1-rafael.tinoco@linaro.org> References: <20190207123137.GA9277@rei> <20190219220355.32593-1-rafael.tinoco@linaro.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v3 2/2] timers/clock_gettime: remove clock_gettime tests X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" clock_gettime{01,02} syscall tests were created, using the new API, based on existing and older kernel/timers/clock_gettime{02,03} tests. This commit deletes older timers/clock_gettime/* tests. Signed-off-by: Rafael David Tinoco --- runtest/timers | 2 - .../kernel/timers/clock_gettime/.gitignore | 2 - .../kernel/timers/clock_gettime/Makefile | 27 --- .../timers/clock_gettime/clock_gettime02.c | 120 ------------ .../timers/clock_gettime/clock_gettime03.c | 173 ------------------ 5 files changed, 324 deletions(-) delete mode 100644 testcases/kernel/timers/clock_gettime/.gitignore delete mode 100644 testcases/kernel/timers/clock_gettime/Makefile delete mode 100644 testcases/kernel/timers/clock_gettime/clock_gettime02.c delete mode 100644 testcases/kernel/timers/clock_gettime/clock_gettime03.c diff --git a/runtest/timers b/runtest/timers index 618d2cb0c..5f5ecb6ee 100644 --- a/runtest/timers +++ b/runtest/timers @@ -1,6 +1,4 @@ #DESCRIPTION:Posix Timer Tests -clock_gettime02 clock_gettime02 -clock_gettime03 clock_gettime03 timer_create02 timer_create02 timer_create03 timer_create03 timer_create04 timer_create04 diff --git a/testcases/kernel/timers/clock_gettime/.gitignore b/testcases/kernel/timers/clock_gettime/.gitignore deleted file mode 100644 index 004e74214..000000000 --- a/testcases/kernel/timers/clock_gettime/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/clock_gettime02 -/clock_gettime03 diff --git a/testcases/kernel/timers/clock_gettime/Makefile b/testcases/kernel/timers/clock_gettime/Makefile deleted file mode 100644 index 8de247075..000000000 --- a/testcases/kernel/timers/clock_gettime/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) International Business Machines Corp., 2001 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -# the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -top_srcdir ?= ../../../.. - -include $(top_srcdir)/include/mk/testcases.mk - -CPPFLAGS += -D_GNU_SOURCE -I$(abs_srcdir)/../include - -LDLIBS += -lpthread -lrt - -include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime02.c b/testcases/kernel/timers/clock_gettime/clock_gettime02.c deleted file mode 100644 index e68a2070c..000000000 --- a/testcases/kernel/timers/clock_gettime/clock_gettime02.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Wipro Technologies Ltd, 2003. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -/************************************************************************** - * - * TEST IDENTIFIER : clock_gettime02 - * - * EXECUTED BY : anyone - * - * TEST TITLE : Basic test for clock_gettime(2) - * - * TEST CASE TOTAL : 2 - * - * AUTHOR : Aniruddha Marathe - * - * SIGNALS - * Uses SIGUSR1 to pause before test if option set. - * (See the parse_opts(3) man page). - * - * DESCRIPTION - * This is a Phase I test for the clock_gettime(2) system call. - * It is intended to provide a limited exposure of the system call. - * - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * - * Test: - * Loop if the proper options are given. - * Execute system call for each defined clock value - * Check return code, if system call failed (return=-1) - * Log the errno and Issue a FAIL message. - * Otherwise, Issue a PASS message. - * - * Cleanup: - * Print errno log and/or timing stats if options given - * - * USAGE: - * clock_gettime02 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-p] - * where: - * -c n : Run n copies simultaneously. - * -e : Turn on errno logging. - * -i n : Execute test n times. - * -I x : Execute test for x seconds. - * -p : Pause for SIGUSR1 before starting - * -P x : Pause for x seconds between iterations. - * -t : Turn on syscall timing. - * - *RESTRICTIONS: - * None - *****************************************************************************/ - -#include -#include -#include -#include - -#include "test.h" -#include "common_timers.h" - -void setup(void); -static clockid_t clocks[2] = { CLOCK_REALTIME, CLOCK_MONOTONIC }; - -char *TCID = "clock_gettime02"; -int TST_TOTAL = ARRAY_SIZE(clocks); - -int main(int ac, char **av) -{ - int lc, i; - struct timespec spec; - - tst_parse_opts(ac, av, NULL, NULL); - - setup(); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - tst_count = 0; - - for (i = 0; i < TST_TOTAL; i++) { - TEST(ltp_syscall(__NR_clock_gettime, clocks[i], &spec)); - tst_resm((TEST_RETURN < 0 ? TFAIL | TTERRNO : TPASS), - "%s", - (TEST_RETURN == 0 ? "passed" : "failed")); - } - } - - CLEANUP(); - tst_exit(); -} - -/* setup() - performs all ONE TIME setup for this test */ -void setup(void) -{ - - tst_sig(NOFORK, DEF_HANDLER, CLEANUP); - - TEST_PAUSE; -} - -/* - * CLEANUP() - Performs one time CLEANUP for this test at - * completion or premature exit - */ -void cleanup(void) -{ -} diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime03.c b/testcases/kernel/timers/clock_gettime/clock_gettime03.c deleted file mode 100644 index 2194d104a..000000000 --- a/testcases/kernel/timers/clock_gettime/clock_gettime03.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) Wipro Technologies Ltd, 2003. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -/************************************************************************** - * - * TEST IDENTIFIER : clock_gettime03 - * - * EXECUTED BY : anyone - * - * TEST TITLE : Test checking for basic error conditions for - * clock_gettime(2) - * - * TEST CASE TOTAL : 7 - * - * AUTHOR : Aniruddha Marathe - * - * SIGNALS - * Uses SIGUSR1 to pause before test if option set. - * (See the parse_opts(3) man page). - * - * DESCRIPTION - * This test case check whether clock_gettime(2) returns appropriate error - * value for invalid parameter - * - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * - * Test: - * Loop if the proper options are given. - * If it is the first test case - * make temp a bad pointer - * Otherwise pass defined struct timespec variable to temp - * Execute system call with invalid parameter - * Check return code, if system call fails with errno == expected errno - * Issue syscall passed with expected errno - * Otherwise, Issue syscall failed to produce expected errno - * - * Cleanup: - * Print errno log and/or timing stats if options given - * - * USAGE: - * clock_gettime03 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-p] - * where: - * -c n : run n copies simultaneously - * -e : Turn on errno logging. - * -i n : Execute test n times. - * -I x : Execute test for x seconds. - * -p : Pause for SIGUSR1 before starting - * -P x : Pause for x seconds between iterations. - * -t : Turn on syscall timing. - * - * RESTRICTIONS: - * None - *****************************************************************************/ - -#include -#include -#include -#include - -#include "test.h" -#include "common_timers.h" - -void setup(void); - -int testcase[6] = { - EFAULT, /* Bad timespec */ - EFAULT, /* Bad timespec */ - EINVAL, /* MAX_CLOCKS */ - EINVAL /* MAX_CLOCKS + 1 */ -}; - -char *TCID = "clock_gettime03"; /* Test program identifier. */ -int TST_TOTAL = ARRAY_SIZE(testcase); - -int main(int ac, char **av) -{ - int i, lc; - struct timespec spec, *temp; - - clockid_t clocks[] = { - CLOCK_REALTIME, - CLOCK_MONOTONIC, - MAX_CLOCKS, - MAX_CLOCKS + 1, - CLOCK_PROCESS_CPUTIME_ID, - CLOCK_THREAD_CPUTIME_ID - }; - - tst_parse_opts(ac, av, NULL, NULL); - - /* - * PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on - * kernel versions lower than 2.6.12 - */ - if ((tst_kvercmp(2, 6, 12)) < 0) { - testcase[4] = EINVAL; - testcase[5] = EINVAL; - } else { - testcase[4] = EFAULT; - testcase[5] = EFAULT; - } - - setup(); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - tst_count = 0; - - for (i = 0; i < TST_TOTAL; i++) { - temp = &spec; - - if (i == 0) { - temp = (struct timespec *)-1; - } else if (i == 1) { - temp = NULL; - } else if ((i >= 4) && (tst_kvercmp(2, 6, 12) >= 0)) { - temp = NULL; - } - - TEST(ltp_syscall(__NR_clock_gettime, clocks[i], temp)); - - /* check return code */ - if (TEST_RETURN == -1 && TEST_ERRNO == testcase[i]) { - tst_resm(TPASS | TTERRNO, - "got expected failure"); - } else { - tst_resm(TFAIL | TTERRNO, - "failed to produce expected error " - "[expected errno = %d (%s), " - "TEST_RETURN = %ld]", - testcase[i], strerror(testcase[i]), - TEST_RETURN); - } /* end of else */ - - } /*End of TEST CASE LOOPING */ - - } /*End for TEST_LOOPING */ - - cleanup(); - tst_exit(); -} - -/* setup() - performs all ONE TIME setup for this test */ -void setup(void) -{ - - tst_sig(NOFORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; -} - -/* - * cleanup() - Performs one time cleanup for this test at - * completion or premature exit - */ -void cleanup(void) -{ -}