From patchwork Wed Dec 12 20:37:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 153592 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp26436ljp; Wed, 12 Dec 2018 12:37:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/XEZONK4zyO6fZvswZCnoPYxBe4iFpjSOmtlFDt540oLiLes/qHjfuDBkAgC5qJ2YCSWsMh X-Received: by 2002:aa7:d749:: with SMTP id a9mr19555519eds.223.1544647063230; Wed, 12 Dec 2018 12:37:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544647063; cv=none; d=google.com; s=arc-20160816; b=FfAckwrrauSu1vsO/jGaNPY0+tfLAyw0WHl33u3OY3d+f3HPjR7krdrWpppxMbnHo+ D21gCFLk9AsxhYjGPE5UKwSfuF5+0zt/WnYB5PNBFvkM/WEEn4CygpAzpDcnQ2euQ11v 25HJ73DM9KJVWMg+iv5VyZNqkEq4eI9p3seZs+NQX/JFo0G0tpUm74JuG44EwhySdjrp +078KdBaPnaBqPjngUw5OEW7TJHCcH3jKvJ1d9hozDi5l+0UAJxinwRiIXJ6rvWbqy1V VVPXXIsoDu7zFMTINoKAf8aYKe+3FwHok9jT603urd1JnaWONOIlIH5xUD8jfgjdrQsP wp9g== 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=xltuR8puqscTG4AIdW5ISqgfTISOsLcgT7dI4tGps84=; b=IxrwjCFOeVjXyf2ePx7Aqxfxm3R6e5WgWcqtTwxMvevyJ3Gdss4X5itpn6CZGjvoZv TR+HcoMuemxNqKASJgqaudgzgDkkV6HzABqF9H68D2pn5ws2Nh2H4cmdK1G/Dx9/Po+e ZjkRo9aBFriuJp2ZqKCq4el04xKVr4Y3wjNTpDZ8ILW2A+VLv1DQLX7213J+ymKK0xAR ca5Ty9YxMgLEVNPiyqb6nlaLZWonLTmgP2WIiCzfboUA5cf69AS7Eb9dctnY9yYd5LpP d8u3bd4MCbgWzyX6MAOwEZLXmdJkd6hTi0oFU3NacT0fH4/1o01jOf/yBnklDwzgVfoa w9yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ga2vZ71i; 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 i55si66552eda.23.2018.12.12.12.37.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 12:37:43 -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=ga2vZ71i; 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 D7F533E6FC0 for ; Wed, 12 Dec 2018 21:37:42 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) by picard.linux.it (Postfix) with ESMTP id 380403E6F4E for ; Wed, 12 Dec 2018 21:37:31 +0100 (CET) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 45C171000B0C for ; Wed, 12 Dec 2018 21:37:31 +0100 (CET) Received: by mail-qk1-x741.google.com with SMTP id w204so11636691qka.2 for ; Wed, 12 Dec 2018 12:37:31 -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=1A6j/gZ1FjXSqF0s2MJ3kl/zk8KC6YigsZgnDt+zkvY=; b=ga2vZ71iRUFcKOtMu8/P+V3lrgzOEQUX1/7CGPSlHnc46ZeSitR7m3/LAjiyt40GqD CrvEutgfq2QztE/UxQCZQiwBwWh9tL5OvLWvKtiC7/dJS+CqRS14QNH/SysfzLLfzFMf 6QRykdAGxpjLldnKUHQNl5ovNBMv4bVOur9xY= 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=1A6j/gZ1FjXSqF0s2MJ3kl/zk8KC6YigsZgnDt+zkvY=; b=tHvP9p6Xj9o3EcQVlEc4X4FYKDRpLNhfsDJYeCPviPXkf9Ox7aX3oQGabK1IL6boGF jYrmWhAIN90pd3sHUbnAVv80uLDb8VPTnlDSQAyXlywA7kXpehdbM+HXWpADd4v+pwwd qRpqI/DO0E1s+PDPaK8YRkNsBRfokRaYBE2hEYsDlMQ5GFSZ2Ii+58VxZ6tpJbPElfJE bPaGUGyIHetCu1BIftKt8p7YhaA6iMwSMSdXmT4N5pz0xOJ6eM9ZpWPSi9XEx2WR+3ua 456/NyegK2vYmc5ayb8BD1dV//EvCocuo1WjUW6oRQTudCjdsQZMBXekvsXqJG/H9PoL xgPg== X-Gm-Message-State: AA+aEWZdN3CYbt/GUvY2NnbNk9bpuwsb56byriHYHhRzYXrdbYiqmwwM 3nxn3QiVLcrHq10sBT5W4ODSgo3SxFsh7g== X-Received: by 2002:a37:59c4:: with SMTP id n187mr20390873qkb.156.1544647049980; Wed, 12 Dec 2018 12:37:29 -0800 (PST) Received: from workstation.celeiro.br ([138.204.25.7]) by smtp.gmail.com with ESMTPSA id n3sm11846872qtc.81.2018.12.12.12.37.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 12:37:29 -0800 (PST) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Wed, 12 Dec 2018 18:37:19 -0200 Message-Id: <20181212203723.18810-2-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.20.0.rc1 In-Reply-To: <20181212203723.18810-1-rafael.tinoco@linaro.org> References: <20181211142750.GA27159@rei> <20181212203723.18810-1-rafael.tinoco@linaro.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-4.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-4.smtp.seeweb.it Subject: [LTP] [PATCH v3 2/6] 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); +}