From patchwork Wed Oct 10 11:41:35 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: 148548 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp744678lji; Wed, 10 Oct 2018 04:41:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV611GaZr7mvKEb5SeBioKd5UeFVYphrS5dZ2o+DdmIjRt7wGSUqjLc2z+5Nfxq+NDHQF4IQB X-Received: by 2002:a5d:4101:: with SMTP id l1-v6mr24889244wrp.45.1539171708097; Wed, 10 Oct 2018 04:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539171708; cv=none; d=google.com; s=arc-20160816; b=plOf+7h8HvFVy914Fv+KwYtsr+79S91L5MEPA+5VIjA91ZrM34S6S+kShgY22XcxmL 8OobmzVD/GVFQzF6N1PyHTb4s4y+YSaq6fDztazvQtMjm9w0kFGRGO88hV3yOL6elzWs B3P+/b3jsFvxCOEvqhyXi4au8yvgTF1batTXLf3IXtWY4GULaw2bpbh7MiBPiTPrGGvf 13WzoGzyRNLWVi5ktpaXWXXO2ifer4bTCy0YUI22FeT8O2TSF1my4YRPh4olXigCp2Zn j+yxoUCFsVhiNO5YCw1wRFotm9GHVCC5pgF8JETKIKt8MPu1SrFax/fDnXkrG/8bwd0J JbSA== 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 :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=4tjO2ob3WE1r8xWP0j/ESxv653r9J9lJHkrcbLm7obo=; b=YosCPGNB34/rK96/YqF4RkxGTkRZ/PL0ahymNAErzcQK28c96gg2NYUTXrw0cYDL8a F7kU3K8pi1Di7e1kVn3TEbyUSlsM/qBo+EbnXa8js9Ar3gvIcwPB+hLbPtgCWlUZFCsR Zxn7ZDWfkpiiWgiu44OrpntYHWymXhF4bwfMLVd6UaWINGYsmMivcFtNSF5KCGwkdCsS mlASrTnnjCT94kazlfEtA8vS0YrQ5LtdYqpZZH6cy4kSArHp33DrFbUiQTdxlFa18Lkk wkSwL/TO1v92mHatKJF9ymkWJghAu3rCSc+EE3cHGulDOX7bdXstE5LV72bwlD4efZGE CMXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CEss730k; 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 k9-v6si17421045wrm.210.2018.10.10.04.41.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 04:41:48 -0700 (PDT) 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=CEss730k; 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 A93723E70F2 for ; Wed, 10 Oct 2018 13:41:47 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 0617D3E7059 for ; Wed, 10 Oct 2018 13:41:43 +0200 (CEST) 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-3.smtp.seeweb.it (Postfix) with ESMTPS id D504D1A01152 for ; Wed, 10 Oct 2018 13:41:42 +0200 (CEST) Received: by mail-qt1-x842.google.com with SMTP id v19-v6so5205732qtg.2 for ; Wed, 10 Oct 2018 04:41:42 -0700 (PDT) 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=Ln/XRGzO0M2gF5MSszumz5MjwystesSzEiz/FjfuLf4=; b=CEss730kLG5a45ETgXWERrjPtWZHBm2EQibpjtQgY207Rwk4zkMTkLi5sqJJ71ak4p OqqTbTmpo/NkUrgJ9Y5El9+uo7FsOHqOxB1v2Z+sQuQA8g5u/pzrcDn39ptJ521C3kzn V6L9XdnYqbKus8TS5FHTtLxq3DMMirGJEE6hk= 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=Ln/XRGzO0M2gF5MSszumz5MjwystesSzEiz/FjfuLf4=; b=nlM1pLvD6Fxz8bSkrH9b0F62kMR/5e8ik1//J3G2V8xgQVDimBfqwzeWLGgaYb9vV5 +WQ+4bLlhdgWLIQPE6ATKAw68KA8a3Sh5AGe5xtiQ2AzcTG1M+3NBDK6A9XOCy9QGW8c Ercx81qUp8CSv7usUExQvrVxsCZvK40o4X+AnbMA4ZdpimJYiBy0/1/jNm2Gau4A/kLJ shYzPPG6KFEGlWjzh7KvTj9wXwzhEQ/ukW4+hxcr7xdhX/hAZqt0nvMpa0JFf7fMZgHU 6BjIKm5dyGryLvmPN2Iw0s94Moq23Zsqwut/IBVfcLJNqE9tQT4YVbHFXwXVGq4GBCW9 6MJg== X-Gm-Message-State: ABuFfoh8ufmM73kjXf42r3+nHb+nTHQLe3du+HNRSgba1W5MowkF4R7+ HhD+cUj5SJRXuenWilUabmolV9rBC8E= X-Received: by 2002:a0c:fc04:: with SMTP id z4mr1192987qvo.157.1539171701449; Wed, 10 Oct 2018 04:41:41 -0700 (PDT) Received: from workstation.celeiro.br ([138.204.25.12]) by smtp.gmail.com with ESMTPSA id m61-v6sm10846228qte.30.2018.10.10.04.41.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 04:41:40 -0700 (PDT) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Wed, 10 Oct 2018 08:41:35 -0300 Message-Id: <20181010114136.23957-1-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181010104317.GB1990@rei> References: <20181010104317.GB1990@rei> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.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-3.smtp.seeweb.it Cc: rafael.tinoco@linaro.org Subject: [LTP] [PATCH v2 1/2] futex/futex_wake04.c: fix hugepages setup for test 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" Test was changing number of hugepages during setup()/cleanup() phase, despite system having (or not) already configured hugepages. This was causing some overhead - of destroying (or creating) hugepages - during the test execution, and also changing amount of available hugepages to the rest of the system. Now, if system has > 0 hugepages available, the test doesn't touch it. Link: https://bugs.linaro.org/show_bug.cgi?id=3984 Signed-off-by: Rafael David Tinoco --- testcases/kernel/syscalls/futex/futex_wake04.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/futex/futex_wake04.c b/testcases/kernel/syscalls/futex/futex_wake04.c index 3c7038317..1ae9599ab 100644 --- a/testcases/kernel/syscalls/futex/futex_wake04.c +++ b/testcases/kernel/syscalls/futex/futex_wake04.c @@ -76,14 +76,17 @@ static void setup(void) tst_tmpdir(); SAFE_FILE_SCANF(NULL, PATH_NR_HUGEPAGES, "%ld", &orig_hugepages); - SAFE_FILE_PRINTF(NULL, PATH_NR_HUGEPAGES, "%d", 1); + + if (!orig_hugepages) + SAFE_FILE_PRINTF(NULL, PATH_NR_HUGEPAGES, "%d", 1); TEST_PAUSE; } static void cleanup(void) { - SAFE_FILE_PRINTF(NULL, PATH_NR_HUGEPAGES, "%ld", orig_hugepages); + if (!orig_hugepages) + SAFE_FILE_PRINTF(NULL, PATH_NR_HUGEPAGES, "%d", 0); tst_rmdir(); } From patchwork Wed Oct 10 11:41:36 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: 148549 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp744744lji; Wed, 10 Oct 2018 04:41:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Q++iMP+MulrpeP677RSqki6AksJlOmxlOLywqRWVRCVDgRpC60NZyNf3G8kWA3INEYEsC X-Received: by 2002:a1c:ca04:: with SMTP id a4-v6mr553968wmg.83.1539171712183; Wed, 10 Oct 2018 04:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539171712; cv=none; d=google.com; s=arc-20160816; b=JtlLaVt8P5ZHu8qC0+9b9a4CwV9D7kwInnK6YG6ZPpfoMXkZ7FjINjTH5kEttbMQy+ +wiMI5FbV2GNqznClxmDxBXtWwcCgLBoTyTmzZJQ14olzOa6PBVhH52TZAATRehuov+b 9g0u20ussDhdZosS6SNECG0wuwNwGgf2V5/HSwBTzkMopblmRmcErKMN1xkQSWdqd1fK VduUPNUbxzKgYG5Z9EhMqIqY/Lg1xW6qbFCDzTSpMqSuo3El6hAs9LZbvMfXghglEmHS BpAjG3OoZO8gKT53GMrlZJN2PhwTcXdYX8BquksheacJeJOA9o9aP5u4VJZz9mhGg7u/ 2Uiw== 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 :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=7IbQP/MdmQxWCZ/YlGjmlFqvnkwPlAkTcbtnBp2aWjQ=; b=xJkGnwKscdUdP0YqKaPwTG7x5Hz8gth5ca9kHADLRhgbC8oWHH9PvWqw3jqxTmE9Tq z4iTfqlW/3sU7XkeAddvXRYOteh9ORn9d9ueYEgkraD5zIkEOnJ+xbikpP7lLc2wiFTZ l+6uMbHIazIu15zziyBG5/5OEkPG9KS3uAH0FYPfB1yHPmZWTUvLyIDIPYpxYxZigw1W Xj/hn85wcR7fGMRYq6ypFlRJIPh8382Y6WSH3ZoLQXn77vL1g4YkD8iv9T9Oyu+rK2Ls INnISzPwyZjTqOmDqmWD+QSDKO00KnB4dHkYJKX72Cp4O8dwK2J391TUsLr+Lwm7bjVj DOXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=c7D4Guqx; 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 h16-v6si17890377wrq.337.2018.10.10.04.41.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 04:41:52 -0700 (PDT) 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=c7D4Guqx; 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 C27F13E708D for ; Wed, 10 Oct 2018 13:41:51 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id F29363E7092 for ; Wed, 10 Oct 2018 13:41:45 +0200 (CEST) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 36131600E53 for ; Wed, 10 Oct 2018 13:41:45 +0200 (CEST) Received: by mail-qk1-x742.google.com with SMTP id m8-v6so2896429qka.12 for ; Wed, 10 Oct 2018 04:41:45 -0700 (PDT) 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=a9TDz/O4cDhhw+mN8eXlivYYZrAAoA1ixLSoe3gaK30=; b=c7D4GuqxDpunQLEaFjw+tn4ypZbuWUSRRemBXY9mKDY/nYlE8o5nb50OVdRZo0yTe3 aS41YWnOJk8AlGq7IQDXileu5Zlc5loM5/ha7bw4h1zd0u4HqqH6x7pST+1rpMI5mjv6 XMprCf8/nfUK74+qBteqkutBAeKOtBSDECZlU= 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=a9TDz/O4cDhhw+mN8eXlivYYZrAAoA1ixLSoe3gaK30=; b=XWL5l5UQTE2uyTuvO9EBn8H01BqCjECGfI0QCurHO/73seg1AKyr6P6ATzfi3Ys2rB vsAbHwO949EWD/NVbC9iAYRA3qrE45qmJ3BUfOiCpvUqGMf7s1fOm+OvuI11aijL0Aij aK1AkfwCoI7BRUUOLfditxwg2b8sN8esco8rFRHLIi6ga9c736GiFCSfhqntvtQOfXk9 q2lCGKMCph/DcmjAZHR/LL3CtJZE6wLZ8WKYT4IS77K2PaCV+JCXYy+Yt8UoGoJzoyLc vleEhjCGLaKvfj/pko2qYPYj/AXnJ2wiqlvJODuXdJNN/OHjJxgEDtwOAQ1f7ZK9SfHa K2Ew== X-Gm-Message-State: ABuFfoiQpFehc0OXVd46HJDbboJt1Y4Cnh5jG23bpcYXc3y5lZ4r7z8h 7fFrrbAnLkfH0toYe8qRe0n0sOfSQXk= X-Received: by 2002:a37:1067:: with SMTP id a100-v6mr24888930qkh.150.1539171703860; Wed, 10 Oct 2018 04:41:43 -0700 (PDT) Received: from workstation.celeiro.br ([138.204.25.12]) by smtp.gmail.com with ESMTPSA id m61-v6sm10846228qte.30.2018.10.10.04.41.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 04:41:42 -0700 (PDT) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Wed, 10 Oct 2018 08:41:36 -0300 Message-Id: <20181010114136.23957-2-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181010114136.23957-1-rafael.tinoco@linaro.org> References: <20181010104317.GB1990@rei> <20181010114136.23957-1-rafael.tinoco@linaro.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.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-5.smtp.seeweb.it Cc: rafael.tinoco@linaro.org Subject: [LTP] [PATCH v2 2/2] futex/futex_wake04.c: raise delay waiting for threads 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" usleep() time was too small if test is being executed in slower terminal devices (specially embedded systems). Raising it to 0.001 seconds was enough to finish 10240 iterations in around 90 seconds in a 4 vcpu kvm guest (fully emulated serial being used as console). Link: https://bugs.linaro.org/show_bug.cgi?id=3984 Signed-off-by: Rafael David Tinoco --- testcases/kernel/syscalls/futex/futex_wake04.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/futex/futex_wake04.c b/testcases/kernel/syscalls/futex/futex_wake04.c index 1ae9599ab..bd10e56af 100644 --- a/testcases/kernel/syscalls/futex/futex_wake04.c +++ b/testcases/kernel/syscalls/futex/futex_wake04.c @@ -175,8 +175,9 @@ static void wakeup_thread2(void) tst_strerrno(res)); } + /* 0.001 seconds: less might cause lockups for slower terminals */ while (wait_for_threads(2)) - usleep(100); + usleep(1000); futex_wake(futex2, 1, 0);