From patchwork Tue Jan 29 17:36:52 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: 157001 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4935144jaa; Tue, 29 Jan 2019 09:37:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN5+IHGLR6vUr5XVJTEDAFOXorBciDHSkZZps3VBbuNQIvlWzSQxM2eMAqex2Jgc1fC2nIhF X-Received: by 2002:a17:906:3105:: with SMTP id 5-v6mr23529491ejx.122.1548783431222; Tue, 29 Jan 2019 09:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548783431; cv=none; d=google.com; s=arc-20160816; b=ousralmiMxWdHZZlM6MNnvqEctkDyDsM3UfLva4IlmaiegDTXqPPFJj9FbgNY0Gtw3 k/8VD/GH+FXNAqOJfVltSEaMET3MzTi3sa3wx5gGB9RR7LsqgVnTqDitk72G8eRIirRB UIDrqF/WcN3cxpcCI8awwEq+K2e1Ey+WghKhAALnX3LFQY5B5/l17b7IklnNsN3O/llY YtVU54ibRa/K6aNthRX3CKbQjsre4RwkyoM8SK1TizbWKhgpl2LkvJWXNGegitaOwXqF +TpkVi8GZvVtRPs/Djb3gOgv5XVqy4TF3fdwG9+d7BxE997C5Sfk1KCnGSqOD+Qt2beu 9mlA== 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=/W8q7wtpBgkGwvykbI08MJ7lvoOZePXucEoD41PzcHI=; b=ivtkMZx2uqmNST0+SRY52/CKx6r8S0OxfTfAOzNPhW+S2rdaHiXMsya2qXaimb0O/i F9gc+jjWErurWQrKGxrdmhmjgWoaqshgNXSLNAcJtq1pFr7w295KANOpvx5zFRGI8Ml+ qOgQbY8rdL6eKt2lXTylfOHPZPGU61LW4GUHB2qmeGmjQqcHPo81PMNNlSFyaIh4nVSO 1hb7tTLPPjwXtVOTPbgI1q6O8xIpghqpNLRhfy/xOnMgDQzdCML9rY2jwEyvcUUWf3Wj d0M2+eECe0hNtk3ELArcBY7056IRqaYbLU5Jdr2n+dq+CdP9wuGIxTVMlcwZ1oQhYL6u gsrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IyRQ2CTE; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 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. [2001:1418:10:5::2]) by mx.google.com with ESMTPS id z31si2351946ede.13.2019.01.29.09.37.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 09:37:11 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) client-ip=2001:1418:10:5::2; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IyRQ2CTE; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 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 C51B73EAD13 for ; Tue, 29 Jan 2019 18:37:10 +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 8F5543EA022 for ; Tue, 29 Jan 2019 18:37:05 +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 639E21401143 for ; Tue, 29 Jan 2019 18:37:04 +0100 (CET) Received: by mail-qt1-x842.google.com with SMTP id t13so23167034qtn.3 for ; Tue, 29 Jan 2019 09:37: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=8eZWFlZjo2a2QlPx6EwjutYpOVDtflVFqk4ndPqEq38=; b=IyRQ2CTEDKfoJkWGguhaL+Vaj+K1uf2Gy3LLXNQ9wJT9FQzrk3loznuYn6j0KLHMHJ aOqN2osYwcP1rqNmznYmjR8QNFqgkNpo1kPCKe8XCPSbGhE6N8oG0oUDS9O7NfPXPlC5 8VK8JbEAlP8C8EqyUGWPkuxr1WZT9JliDncJU= 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=8eZWFlZjo2a2QlPx6EwjutYpOVDtflVFqk4ndPqEq38=; b=YacDP35LBowS5ssyixfpsG6IRDaCOZPlGXAHE48rr4kyqdNX9tC8YTIw5cHiRiCsbq uFF/yNMmhs7Hg6e/ARbw9z1Zax4vq4JJv8Ma97sioRLt10+kqcIvM8G5O9N6FxPFkqun eAzCPqsJ2ZXrUtRwIqx3Ere9Fxo38793tNzEqO8EarvB3PzWQhpVg32h3HXQoXn+3nT6 4BhGn9i47eaSrzzHtNgbF/r0if/qiXK+MWnGRDE5WFOpCR3wshh5INEkHcCpPfhSPZmJ mTotI4Y6b2jliomAeSXZHi1WLcO0EXKEABXgTSu9CSFjSsMnZ6dnPCTYkOzUKqm/A9in n/8Q== X-Gm-Message-State: AJcUukfAdwrvySzlsP4MkPeKRYZN+Xm7StptDIWmycglik/cPPxwvJSR usVZ8kh3a9EBhEcX4Zek7inWmPXBd9E= X-Received: by 2002:a0c:b6c3:: with SMTP id h3mr26164344qve.128.1548783422941; Tue, 29 Jan 2019 09:37:02 -0800 (PST) Received: from workstation.celeiro.br. ([168.194.163.64]) by smtp.gmail.com with ESMTPSA id a20sm56890855qkj.28.2019.01.29.09.37.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 09:37:02 -0800 (PST) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Tue, 29 Jan 2019 15:36:52 -0200 Message-Id: <20190129173659.27901-1-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124161159.GC16804@rei.lan> References: <20190124161159.GC16804@rei.lan> 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 v4 1/8] lib: add tst_clock_settime() to tst_clocks.h 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" Adds tst_clock_settime() function to the lib. Signed-off-by: Rafael David Tinoco --- include/tst_clocks.h | 2 ++ lib/tst_clocks.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/tst_clocks.h b/include/tst_clocks.h index ee2f645c7..90784a3fd 100644 --- a/include/tst_clocks.h +++ b/include/tst_clocks.h @@ -26,4 +26,6 @@ int tst_clock_getres(clockid_t clk_id, struct timespec *res); int tst_clock_gettime(clockid_t clk_id, struct timespec *ts); +int tst_clock_settime(clockid_t clk_id, struct timespec *ts); + #endif /* TST_CLOCKS__ */ diff --git a/lib/tst_clocks.c b/lib/tst_clocks.c index 87413a339..35798a4aa 100644 --- a/lib/tst_clocks.c +++ b/lib/tst_clocks.c @@ -35,3 +35,8 @@ int tst_clock_gettime(clockid_t clk_id, struct timespec *ts) { return syscall(SYS_clock_gettime, clk_id, ts); } + +int tst_clock_settime(clockid_t clk_id, struct timespec *ts) +{ + return syscall(SYS_clock_settime, clk_id, ts); +}