From patchwork Tue Apr 9 12:02:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 1082195 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="eoptRxbW"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44dm7n0bj1z9sRw for ; Tue, 9 Apr 2019 22:00:18 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 55BA63EA468 for ; Tue, 9 Apr 2019 14:00:13 +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 [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id 739733EA2DA for ; Tue, 9 Apr 2019 14:00:11 +0200 (CEST) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id A4EE76013C8 for ; Tue, 9 Apr 2019 14:00:11 +0200 (CEST) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x39BwnZ0179282 for ; Tue, 9 Apr 2019 12:00:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=S/zl42rOPkoMwaPL0lCgp1PjP4OdHSfnFZUMu3RiFKo=; b=eoptRxbW366Mg37JVKiUTOEmKPCydjDqBcOW/rDui4Vw0KHOrVOs7QNNY/kQzzJ70/es iHMOvQ6e+8w9Ojf+SXMAnFeVB1LArYM7N++PbhZVcQENwS9H6ujRNNMcWhYce6owEbSX u6sf+Z+503rzUxKj8NizDqIi1fMguimFvKUbJIebCRzicfTbQdcyrawgF7Nbm3YS69Ve Rj7SG8MBZg2oK+lkRRHpq3J3BGQFd+0DPSq5m/hzlFnAQ8EhAH5THc/vriPgreuyDJsx 9SetFlD/noNhrM0qEpjeEnFmb7suM+6TsuoW1kezkOz+lTB2OqcQ/zLRUYGf+DHrKi9V TA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2rpmrq4cg6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 09 Apr 2019 12:00:06 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x39BxrIS190375 for ; Tue, 9 Apr 2019 12:00:06 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2rpkej7x7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 09 Apr 2019 12:00:06 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x39C05Ff020732 for ; Tue, 9 Apr 2019 12:00:05 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Apr 2019 05:00:04 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Tue, 9 Apr 2019 15:02:01 +0300 Message-Id: <1554811321-19337-1-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9221 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090078 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9221 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090078 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_HELO_PASS, 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 Subject: [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again 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: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The previous fix commit 7703cb3e10ea ("syscall/fcntl33.c: fix test on FUSE fs") moved open() (can sleep on fuse fs) before fork()/do_child(). But the fix was removed by commit e5c990c5c55b ("Convert fcntl33 to newlib"). In this patch, instead of moving open(), use LTP checkpoints: wake the child only after setting the lease in a parent process. Signed-off-by: Alexey Kodanev --- testcases/kernel/syscalls/fcntl/fcntl33.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/fcntl/fcntl33.c b/testcases/kernel/syscalls/fcntl/fcntl33.c index 35eebb5..43dc5a2 100644 --- a/testcases/kernel/syscalls/fcntl/fcntl33.c +++ b/testcases/kernel/syscalls/fcntl/fcntl33.c @@ -124,6 +124,7 @@ static void do_test(unsigned int i) goto exit; } + TST_CHECKPOINT_WAKE(0); /* Wait for SIGIO caused by lease breaker. */ TEST(sigtimedwait(&newset, NULL, &timeout)); if (TST_RET == -1) { @@ -174,7 +175,7 @@ static void do_child(unsigned int i) { long long elapsed_ms; - TST_PROCESS_STATE_WAIT(getppid(), 'S'); + TST_CHECKPOINT_WAIT(0); tst_timer_start(CLOCK_MONOTONIC); @@ -225,6 +226,7 @@ static struct tst_test test = { .forks_child = 1, .needs_root = 1, .needs_tmpdir = 1, + .needs_checkpoints = 1, .tcnt = ARRAY_SIZE(test_cases), .setup = setup, .test = do_test,