From patchwork Mon Oct 25 13:25:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Stancek X-Patchwork-Id: 1545771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N2eYdQ+8; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HdG1x4N7mz9t1r for ; Tue, 26 Oct 2021 00:26:29 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id E51083C65AA for ; Mon, 25 Oct 2021 15:26:26 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 176A93C0958 for ; Mon, 25 Oct 2021 15:26:24 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id CA98F6019A6 for ; Mon, 25 Oct 2021 15:26:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635168382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eiBSYmXQRu7x2VYjMjsAZWoNDOf4PPHULplW8aaODng=; b=N2eYdQ+8DsjS5UjKF9OUP7CkmAgNQT2jfaNi+KH1XOArY1sTSxZudV1D9HJ2WyNKSu/YP7 LBNjw6dfsVbM3HhhDG0J6zW8782lmEhqIZEqyg4HA0Vt6C2D2bfUEZvXdOwvK19J0tcMz1 Ed3GWhypqV5cXOCMthskU8dwL97fPdw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-SkznIOpFOPKGBXjhQSqnqQ-1; Mon, 25 Oct 2021 09:26:20 -0400 X-MC-Unique: SkznIOpFOPKGBXjhQSqnqQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E7D78026AD for ; Mon, 25 Oct 2021 13:26:19 +0000 (UTC) Received: from janakin.usersys.redhat.com (unknown [10.40.192.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BED660FB8 for ; Mon, 25 Oct 2021 13:26:17 +0000 (UTC) From: Jan Stancek To: ltp@lists.linux.it Date: Mon, 25 Oct 2021 15:25:42 +0200 Message-Id: <04692b4000ee415add41128173e395f830ea3e56.1635168255.git.jstancek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jstancek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Virus-Scanned: clamav-milter 0.102.4 at in-2.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-2.smtp.seeweb.it Subject: [LTP] [PATCH] finit_module02: fix exp. errno for O_WRONLY testcase 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" commit 032146cda855 ("vfs: check fd has read access in kernel_read_file_from_fd()") changed errno back to EBADF, which is correct value according to man page, so tweak the test to expect it for kernels >= 5.15. Signed-off-by: Jan Stancek --- testcases/kernel/syscalls/finit_module/finit_module02.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/finit_module/finit_module02.c b/testcases/kernel/syscalls/finit_module/finit_module02.c index 0d2bf917ea64..9b5d3563b74e 100644 --- a/testcases/kernel/syscalls/finit_module/finit_module02.c +++ b/testcases/kernel/syscalls/finit_module/finit_module02.c @@ -52,7 +52,7 @@ static void bad_fd_setup(struct tcase *tc) static void wo_file_setup(struct tcase *tc) { - if (tst_kvercmp(4, 6, 0) < 0) + if (tst_kvercmp(4, 6, 0) < 0 || tst_kvercmp(5, 15, 0) >= 0) tc->exp_errno = EBADF; else tc->exp_errno = ETXTBSY;