From patchwork Wed Sep 30 14:50:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Palethorpe X-Patchwork-Id: 1374400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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=suse.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=Ayg8gFWP; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1fMN6Xf1z9sTh for ; Thu, 1 Oct 2020 00:50:41 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0EAB33C5F16 for ; Wed, 30 Sep 2020 16:50:39 +0200 (CEST) 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 36B283C12A0 for ; Wed, 30 Sep 2020 16:50:28 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id CA8901000A27 for ; Wed, 30 Sep 2020 16:50:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601477427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ciqkwu3aCaQoBTIBZInvhumH/9p3Bon7+dd2Wwmwlyg=; b=Ayg8gFWP0K7WW3luR6pVZ2KGsMflP4FZfr6rBhcM/nVYj43DCYn5hiR+Cgf7NKT4cp+zDb nBao1g4yH4qyQRzM3WblMF18ybJlaBFqwBoz5iCRv6w0poBNCyPnQYdsZXW2/DybQ5puH0 kLp7ABAC8u4BNv8ZuI0xXtJokmOiqfE= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1FD10AB92; Wed, 30 Sep 2020 14:50:27 +0000 (UTC) From: Richard Palethorpe To: ltp@lists.linux.it Date: Wed, 30 Sep 2020 15:50:07 +0100 Message-Id: <20200930145009.16260-1-rpalethorpe@suse.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 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,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Palethorpe Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Richard Palethorpe --- Here are 3 more tests modified to check for ENOSYS. There are other tests which still don't check, but they appear to be only listed under the AIO runtest files. testcases/kernel/syscalls/io_setup/io_setup01.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/kernel/syscalls/io_setup/io_setup01.c b/testcases/kernel/syscalls/io_setup/io_setup01.c index 4693f8fbb..28aee7831 100644 --- a/testcases/kernel/syscalls/io_setup/io_setup01.c +++ b/testcases/kernel/syscalls/io_setup/io_setup01.c @@ -53,6 +53,8 @@ static void verify_success(unsigned int nr, io_context_t *ctx, int init_val) memset(ctx, init_val, sizeof(*ctx)); TEST(io_setup(nr, ctx)); + if (TST_RET == -ENOSYS) + tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel"); if (TST_RET != 0) { tst_res(TFAIL, "io_setup() failed unexpectedly with %li (%s)", TST_RET, tst_strerrno(-TST_RET)); From patchwork Wed Sep 30 14:50:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Palethorpe X-Patchwork-Id: 1374398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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=suse.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=ogI+dgNw; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1fM03WDkz9sSs for ; Thu, 1 Oct 2020 00:50:33 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 6AC453C2A11 for ; Wed, 30 Sep 2020 16:50:30 +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 [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 394813C297B for ; Wed, 30 Sep 2020 16:50:28 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id D417B1A002E6 for ; Wed, 30 Sep 2020 16:50:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601477427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X6rYgcG4udaWwa/c/n3JgzKGuBde/RREZBYqQs7xy/I=; b=ogI+dgNw2BCxnUSsTOAEPKDv6+DHbD43wUvFXMuyoUJVmEL2fnwP6g/jwRP/qHgX6YD8U8 nu6ahahIgXsckYIDQh4FaTuN1MObdkFqR9G1kVR8czkkXtl8R7X7VKQbkkgBTSDsOVmmy7 RElEoiKyJjpHttqf4wE9riYYRTJWw8A= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 61156AB8F; Wed, 30 Sep 2020 14:50:27 +0000 (UTC) From: Richard Palethorpe To: ltp@lists.linux.it Date: Wed, 30 Sep 2020 15:50:08 +0100 Message-Id: <20200930145009.16260-2-rpalethorpe@suse.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930145009.16260-1-rpalethorpe@suse.com> References: <20200930145009.16260-1-rpalethorpe@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 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,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Palethorpe Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Richard Palethorpe --- testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c | 8 +++++--- testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c index 2a1aad8d9..a0b56d814 100644 --- a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c +++ b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c @@ -51,9 +51,11 @@ static void run(void) fd = SAFE_OPEN("io_pgetevents_file", O_RDWR | O_CREAT, 0644); io_prep_pwrite(&cb, fd, data, 4096, 0); - ret = io_setup(1, &ctx); - if (ret < 0) - tst_brk(TBROK | TERRNO, "io_setup() failed"); + TEST(io_setup(1, &ctx)); + if (TST_RET == -ENOSYS) + tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel"); + if (TST_RET < 0) + tst_brk(TBROK | TRERRNO, "io_setup() failed"); ret = io_submit(ctx, 1, cbs); if (ret != 1) diff --git a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c index 28afdb4a0..af71e17fe 100644 --- a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c +++ b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c @@ -65,9 +65,11 @@ static void setup(void) fd = SAFE_OPEN("io_pgetevents_file", O_RDWR | O_CREAT, 0644); io_prep_pwrite(&cb, fd, data, 4096, 0); - ret = io_setup(1, &ctx); - if (ret < 0) - tst_brk(TBROK | TERRNO, "io_setup() failed"); + TEST(io_setup(1, &ctx)); + if (TST_RET == -ENOSYS) + tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel"); + if (TST_RET < 0) + tst_brk(TBROK | TRERRNO, "io_setup() failed"); ctx_initialized = 1; From patchwork Wed Sep 30 14:50:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Palethorpe X-Patchwork-Id: 1374399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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=suse.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=pevOsSWh; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1fMP2lZSz9sTq for ; Thu, 1 Oct 2020 00:50:50 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C14123C2A1F for ; Wed, 30 Sep 2020 16:50:47 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 5C0163C2A08 for ; Wed, 30 Sep 2020 16:50:28 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 0CAF4200CF4 for ; Wed, 30 Sep 2020 16:50:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601477427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8kswxEXKJWBB9AhQknR+GXCD/3UeyrSeA3GcivBxyeU=; b=pevOsSWhzbnKPFTX3Unk2JqWFCksvZjljs9n8UJ/SCVQlYTxtSGaK1mu+3jcQwNi0k4PuS pr4DewMTYMXgGuGLAhjlT2SYrDxqafXWdeNaLt4bhQ20iSktCSfu+EDgCmrHv58vdIXirt WxOdE0lNXEjJiqDcrst1331vjYym/5Q= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ACFD0AF80; Wed, 30 Sep 2020 14:50:27 +0000 (UTC) From: Richard Palethorpe To: ltp@lists.linux.it Date: Wed, 30 Sep 2020 15:50:09 +0100 Message-Id: <20200930145009.16260-3-rpalethorpe@suse.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930145009.16260-1-rpalethorpe@suse.com> References: <20200930145009.16260-1-rpalethorpe@suse.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.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,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 3/3] eventfd01: Handle no AIO support X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Palethorpe Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Richard Palethorpe --- testcases/kernel/syscalls/eventfd/eventfd01.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c index e4f9c804a..4d888910b 100644 --- a/testcases/kernel/syscalls/eventfd/eventfd01.c +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c @@ -510,6 +510,11 @@ static int trigger_eventfd_overflow(int evfd, int *fd, io_context_t * ctx) ret = io_setup(16, ctx); if (ret < 0) { errno = -ret; + if (errno == ENOSYS) { + tst_brkm(TCONF | TERRNO, cleanup, + "io_setup(): AIO not supported by kernel"); + } + tst_resm(TINFO | TERRNO, "io_setup error"); return -1; }