From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by sourceware.org (Postfix) with ESMTP id 5B54D398541A for ; Mon, 16 Nov 2020 21:00:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5B54D398541A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ldv@altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id C216572C8B0 for ; Tue, 17 Nov 2020 00:00:41 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id B88947CC819; Tue, 17 Nov 2020 00:00:41 +0300 (MSK) Date: Tue, 17 Nov 2020 00:00:41 +0300 From: "Dmitry V. Levin" To: libc-stable@sourceware.org Subject: [2.27 COMMITTED] misc/test-errno-linux: Handle EINVAL from quotactl Message-ID: <20201116210040.GC28063@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2020 21:00:43 -0000 From: Florian Weimer In commit 3dd4d40b420846dd35869ccc8f8627feef2cff32 ("xfs: Sanity check flags of Q_XQUOTARM call"), Linux 5.4 added checking for the flags argument, causing the test to fail due to too restrictive test expectations. Reviewed-by: Adhemerval Zanella (cherry picked from commit 1f7525d924b608a3e43b10fcfb3d46b8a6e9e4f9) --- sysdeps/unix/sysv/linux/test-errno-linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/test-errno-linux.c b/sysdeps/unix/sysv/linux/test-errno-linux.c index be1135351d..073e2fba64 100644 --- a/sysdeps/unix/sysv/linux/test-errno-linux.c +++ b/sysdeps/unix/sysv/linux/test-errno-linux.c @@ -160,8 +160,9 @@ do_test (void) fails |= test_wrp (EINVAL, poll, &pollfd, -1, 0); /* quotactl returns ENOSYS for kernels not configured with CONFIG_QUOTA, and may return EPERM if called within certain types - of containers. */ - fails |= test_wrp2 (LIST (ENODEV, ENOSYS, EPERM), + of containers. Linux 5.4 added additional argument validation + and can return EINVAL. */ + fails |= test_wrp2 (LIST (ENODEV, ENOSYS, EPERM, EINVAL), quotactl, Q_GETINFO, NULL, -1, (caddr_t) &dqblk); fails |= test_wrp (EINVAL, sched_getparam, -1, &sch_param); fails |= test_wrp (EINVAL, sched_getscheduler, -1); -- ldv