Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3890064pxb; Mon, 21 Feb 2022 07:45:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5HD4yaJDYWzV5ejyB0gX5XyHQ0ikR6wImYTXQ8DCNP3CClhIrAH0pc5+D33SvWJI7WKcr X-Received: by 2002:a63:6785:0:b0:364:3dc6:27a8 with SMTP id b127-20020a636785000000b003643dc627a8mr16832583pgc.276.1645458301667; Mon, 21 Feb 2022 07:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645458301; cv=none; d=google.com; s=arc-20160816; b=KvWkrCwokna1bx+RBTeKjyoOBjCfWHk96OO2/Rp9mkcjsVcPTlFj8wCNmcsJsRv985 ygDy0SvKNEvE0mA+NP7vtJSv8L9iOX0/J6nSm1eN4VNUGoIj80z23Ow5cEeqjkYE2Olp dTuJoWmEoUVyjF5REj/Qn1ehFueaAQt3sayhqaVn7XG/A20Jy7UFAvs8LxDlG5ahkvnJ NqAqKPMD9Effd3sEhIZIcBxKb+lmzdxc3sVxDqwHHfE7C4NTGpsIpUL3vAHsUisI/+pB Xtn0WPy2gxOMwxqe5OQ29xcDDa20fPJ+1aUKsdJ/EaHElA1lh8TZxjAT4W7uzt6VWS3P zT5w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l5a48REikwBoG4xaz9R1qtjeOHwf7Hu0+Nf2FKNg/Vs=; b=vWuGXRszAg+/FiXQEUjCdC1L/zW9YBC6Bd9Ly0F9potxralu0rmnqqZzX8YYz3AISe LSHa/R7r1+FeCou9pJxkPUeLtet/ioZnZxnL7drfXEuTowdIYz0JIhLTV4eNuiWn/Pe/ BWR0Sy4n12m0Lbst8HI8oD8hz4IUaKjhnkPIJ2Y7CLxkVNyBXu0S76e7PxLOVrYuwNIK aK8jK8zXs3XttAMcy6DagZbKFCWxZXw5kRirJ/QpOimARUO5SaWb+tw24X/fLN2ghmQ5 OOl2HK7ifcB0FwI2ECnjZmzj+0zuw36hQMi28LoWFMMW00cjgto31qAIR0vXLPL3oDfd mf8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KdsuUpTT; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17si31265859plg.68.2022.02.21.07.44.46; Mon, 21 Feb 2022 07:45:01 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=KdsuUpTT; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351670AbiBUJw3 (ORCPT + 99 others); Mon, 21 Feb 2022 04:52:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352470AbiBUJra (ORCPT ); Mon, 21 Feb 2022 04:47:30 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78F9F31361; Mon, 21 Feb 2022 01:19:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id EA1F9CE0E7D; Mon, 21 Feb 2022 09:19:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD7ADC340EC; Mon, 21 Feb 2022 09:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435190; bh=oHwyv9i4nomRFDXyb1ov4PujWD+EPAnMLWxspRvR/Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdsuUpTTnPPcnRTBmRwY1zyaHBhl4wQkWrmSmm5qYsQo66PqkGOBy85dzM1WbPUDs ppzdx4VFuuTWt67555vnQ1vAx7Okj+7b6BJpa61IU2ss7xnB2alh8vezD1T3ntKOLI +xn5kKnBmAaQBF5TtVEe9+gPt8uzz3ZKsDg37fAI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aleksa Sarai , Cristian Marussi , Shuah Khan , Sasha Levin Subject: [PATCH 5.16 045/227] selftests: openat2: Skip testcases that fail with EOPNOTSUPP Date: Mon, 21 Feb 2022 09:47:44 +0100 Message-Id: <20220221084936.371762552@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Cristian Marussi [ Upstream commit ac9e0a250bb155078601a5b999aab05f2a04d1ab ] Skip testcases that fail since the requested valid flags combination is not supported by the underlying filesystem. Cc: Aleksa Sarai Signed-off-by: Cristian Marussi Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/openat2/openat2_test.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c index 1bddbe934204c..7fb902099de45 100644 --- a/tools/testing/selftests/openat2/openat2_test.c +++ b/tools/testing/selftests/openat2/openat2_test.c @@ -259,6 +259,16 @@ void test_openat2_flags(void) unlink(path); fd = sys_openat2(AT_FDCWD, path, &test->how); + if (fd < 0 && fd == -EOPNOTSUPP) { + /* + * Skip the testcase if it failed because not supported + * by FS. (e.g. a valid O_TMPFILE combination on NFS) + */ + ksft_test_result_skip("openat2 with %s fails with %d (%s)\n", + test->name, fd, strerror(-fd)); + goto next; + } + if (test->err >= 0) failed = (fd < 0); else @@ -303,7 +313,7 @@ void test_openat2_flags(void) else resultfn("openat2 with %s fails with %d (%s)\n", test->name, test->err, strerror(-test->err)); - +next: free(fdpath); fflush(stdout); } -- 2.34.1