Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36745421rwd; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlG17wHSZE6ExyA6RY54bTnQs7Z9aPlnkRVUCKTERKGl3EJ0cA6gE0Y96vTuhQ/FYU2jKVlM X-Received: by 2002:a17:90a:bf01:b0:263:5376:b952 with SMTP id c1-20020a17090abf0100b002635376b952mr22917838pjs.9.1689077963335; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689077963; cv=none; d=google.com; s=arc-20160816; b=I06LHYjjV63Vdy5ChRl4qYBCgMlmMeU9qV10jTOtIMC5mGWIMK4wgWGf+lknFR42ov VIMgeU6Omk03qCPej3Em3qHhTIN4q3Az/i/Hfdi2cKVYsl5yV+dNyO69+ktbhgjvJdlv EHMh6qdnbJSbStTjWecbe0bx/CqGiNOW544Yv/vSA6n5iO6cm31+BxRPg2yw300Y/6LH 60GgBgYTPa1U1KAuelaVRcXG83eusmHfMXIPgAz+nad92nNv8m+lMTn5T2ljNnQ9gRZN L15YuvjGVtpdkj3sAYnyeM1wqwhD8Ad/VfRBCa+C+7RCRKFRcBBpSE9VuEAV4YwMS/sl RftA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=jciyvh7bPAJKrnb358k+MOZYCgue2kVbXpRfHdO7VwM=; fh=MUHOeT5dfx7Bwpp1FAWK3yHmm1XysciUIh5ne6DqweU=; b=fhhNpC/bcC7uTOqzqNBKL0RkojDKV3oGBcttcl5BBEurAJxL3nggCyL0TKzO+7RA0s dM/PjwlMa5wq8InMY7HQnzSySqbTkEHtsl51KT4NEb3g0M9gX9UEmDlIWIF+tEMxg9xI crca/gUlBB9f/2V1EywTK19/ccDMsHqDzlgAYU1zqI31zpsTXWBciWA5tFroxZaHUdlU 7909uSCcnOnncYw/+YhuksbB4n0cncWQfLceWS2B/4VkBIPw80RMVewc6bmDL7HgQYvu VjNTbJXbOnp49M/nEKqDMl6xEb4eNJCIRI0urtDZCgcXTpDhxaPGwc4dZwDHQlSQdSjz xp3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Oc/6Nn1y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a17090ac58b00b00262e81f612esi1550081pjt.139.2023.07.11.05.19.09; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Oc/6Nn1y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjGKMMM (ORCPT + 99 others); Tue, 11 Jul 2023 08:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbjGKMMF (ORCPT ); Tue, 11 Jul 2023 08:12:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12BB21733 for ; Tue, 11 Jul 2023 05:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689077477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jciyvh7bPAJKrnb358k+MOZYCgue2kVbXpRfHdO7VwM=; b=Oc/6Nn1y9AeOJ4QZG+kRddbD/PvZJtdfnlQ/T68QG3oHcZJIRQnTmaPzTv6YHIbZwcTndf PLj08jbv9C80rEXnekvukv+mKKotL9o49PYQGLx9NkWVgzEpCNllqQOp9ZC/zT0s+xY2Kx BYSy2y1VkQZSBOhM8GU6yTz2bY+iW3k= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-673-8WB8DNSZP4ajrQIethBppg-1; Tue, 11 Jul 2023 08:11:11 -0400 X-MC-Unique: 8WB8DNSZP4ajrQIethBppg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E72A1C47661; Tue, 11 Jul 2023 12:11:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA8111401C2E; Tue, 11 Jul 2023 12:10:59 +0000 (UTC) From: Florian Weimer To: Alexey Gladkov Cc: LKML , Arnd Bergmann , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, James.Bottomley@HansenPartnership.com, acme@kernel.org, alexander.shishkin@linux.intel.com, axboe@kernel.dk, benh@kernel.crashing.org, borntraeger@de.ibm.com, bp@alien8.de, catalin.marinas@arm.com, christian@brauner.io, dalias@libc.org, davem@davemloft.net, deepa.kernel@gmail.com, deller@gmx.de, dhowells@redhat.com, fenghua.yu@intel.com, firoz.khan@linaro.org, geert@linux-m68k.org, glebfm@altlinux.org, gor@linux.ibm.com, hare@suse.com, heiko.carstens@de.ibm.com, hpa@zytor.com, ink@jurassic.park.msu.ru, jhogan@kernel.org, kim.phillips@arm.com, ldv@altlinux.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux@armlinux.org.uk, linuxppc-dev@lists.ozlabs.org, luto@kernel.org, mattst88@gmail.com, mingo@redhat.com, monstr@monstr.eu, mpe@ellerman.id.au, namhyung@kernel.org, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, peterz@infradead.org, ralf@linux-mips.org, rth@twiddle.net, schwidefsky@de.ibm.com, sparclinux@vger.kernel.org, stefan@agner.ch, tglx@linutronix.de, tony.luck@intel.com, tycho@tycho.ws, will@kernel.org, x86@kernel.org, ysato@users.sourceforge.jp Subject: Re: [PATCH v3 5/5] selftests: add fchmodat4(2) selftest References: <87o8pscpny.fsf@oldenburg2.str.redhat.com> Date: Tue, 11 Jul 2023 14:10:58 +0200 In-Reply-To: (Alexey Gladkov's message of "Tue, 11 Jul 2023 13:25:46 +0200") Message-ID: <87pm4ybqct.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Alexey Gladkov: > The test marks as skipped if a syscall with the AT_SYMLINK_NOFOLLOW flag > fails. This is because not all filesystems support changing the mode > bits of symlinks properly. These filesystems return an error but change > the mode bits: > > newfstatat(4, "regfile", {st_mode=3DS_IFREG|0640, st_size=3D0, ...}, AT_S= YMLINK_NOFOLLOW) =3D 0 > newfstatat(4, "symlink", {st_mode=3DS_IFLNK|0777, st_size=3D7, ...}, AT_S= YMLINK_NOFOLLOW) =3D 0 > syscall_0x1c3(0x4, 0x55fa1f244396, 0x180, 0x100, 0x55fa1f24438e, 0x34) = =3D -1 EOPNOTSUPP (Operation not supported) > newfstatat(4, "regfile", {st_mode=3DS_IFREG|0640, st_size=3D0, ...}, AT_S= YMLINK_NOFOLLOW) =3D 0 > > This happens with btrfs and xfs: > > $ /kernel/tools/testing/selftests/fchmodat4/fchmodat4_test > TAP version 13 > 1..1 > ok 1 # SKIP fchmodat4(symlink) > # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0 > > $ stat /tmp/ksft-fchmodat4.*/symlink > File: /tmp/ksft-fchmodat4.3NCqlE/symlink -> regfile > Size: 7 Blocks: 0 IO Block: 4096 symbolic link > Device: 7,0 Inode: 133 Links: 1 > Access: (0600/lrw-------) Uid: ( 0/ root) Gid: ( 0/ root) > > Signed-off-by: Alexey Gladkov This looks like a bug in those file systems? As an extra test, =E2=80=9Cecho 3 > /proc/sys/vm/drop_caches=E2=80=9D somet= imes has strange effects in such cases because the bits are not actually stored on disk, only in the dentry cache. Thanks, Florian