From patchwork Thu Oct 24 18:24:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 13849563 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12FEA1FAF10 for ; Thu, 24 Oct 2024 18:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794271; cv=none; b=ks+h1K8UXpBu3hOq7qUNhRNt7c9CwwhfAc8PP9sOuNvwjZPRQcWTaoNolFmrmjEizTDzcgD/owgIRrmb7ETI/xueYUtJkRbAyIVkfS3O09EPj1B3nyDvyySHNeGiVN0oc8S8afbxstjg4JEcg0dDhW0h92Xh6xkmF47dNzh1Xmg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794271; c=relaxed/simple; bh=M9QxGTV7VT6bHq601Eei0bwU4zdH1xECC7gaaWFRF8Y=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=RGB+jfvPiD5721ea3wGBZjWIZpI2pBug44IvW7Yz9z/5596zzAaEdVjfs1CcCVwOYgoyK2RW5rhBzOdIy4Pq06/CnekTt+3ho1haUn3mBQNmPyjf92cXdzX3OSuntT386rfFBeX89yWn21AH1NgnYOu41yEKXC9KJTra4wGecU8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=ESFJvZTJ; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="ESFJvZTJ" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-7b153047b29so80740085a.3 for ; Thu, 24 Oct 2024 11:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1729794266; x=1730399066; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=qP9TPe1+2v/YXjw/8ZCJNYcN5tXynTk98mC/yDx5Ot0=; b=ESFJvZTJQcGYN88YJJhyAhU4Mh5IZwBnUt/fSsiKOjPOeUfG0h/UgC0hVG0lVyFQsu bwSRNxrG92HiPmHygYNKa/rSnyq/WQXgkfGkx7D9oeezDVHHQgb8/anfmADM/3ea6zA1 PRJ3zc2V1y3AjcTejbiWU2Oenc8FtrzomuarCoW4vBL1J1aZU0B55hQR4rrKtP1Ysds2 S6jjj+eiuBdn+LDrdfDB4lfQ0iSMuVail4hFrrpy4fQn1z1UFHYkFn5JTK2DCN9QUfpg ksRkChXQQ9VRGG/S2P4cGf9F2wwaNB51rAMy4sbP0LcvoZPeqALm5J1V1J8elYfi3J3O +vUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729794266; x=1730399066; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qP9TPe1+2v/YXjw/8ZCJNYcN5tXynTk98mC/yDx5Ot0=; b=qTxT9COdhHVOAtQ46mnP62BuVtOuDxVgaepc/Od3IH+1t7HqnPOKh7gCMwKXutN0Ym lcw+Le6mDqBGmCB5RmcF5Oys7od8XeWzut32E0zTt4cfs7+gX1IxxC8l5JB90/dtIM3z L5JLyhNRGBRIO/CbD5nRP/a0OSApH6TCSvI7xScMUrpPVscqn8zE2bsNL5K+Kx4jLrCO 9+aVlc8gpj+uv9Y0RQu+8tsipf7qi/rtm0lGfahDEOkwHiaeQ/frme2TzcXb79o89/UV sNDUHofDpZ8HoRerbmlHSmMZTayE48gxhHri5+48sNmINxDMNnHAAYOvQETGd+w5qngK LqUQ== X-Gm-Message-State: AOJu0YyloCHZ/s2XqYuA/9kWtJYLqi+Eh6ElW5eXpWdHOpP4werid3Yo J5ecLIT70nxiC7CxEe/dEkUO/8pTmeTTHI9oWgN09R/fTkBGne3GoFz2TA2hTWJnf1TbGTGVhmM = X-Google-Smtp-Source: AGHT+IEgOcUbHLJLQfjZQC5E/9xZU09GoNrjmOwabRY9xWSkNeuhwQL0knI3rdmHlGpA7MjnRQSP6Q== X-Received: by 2002:a05:6214:390c:b0:6cb:2456:537 with SMTP id 6a1803df08f44-6d08f7827d2mr28910876d6.29.1729794265691; Thu, 24 Oct 2024 11:24:25 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6ce009ecb61sm52368186d6.127.2024.10.24.11.24.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 11:24:25 -0700 (PDT) From: Paul Moore To: selinux@vger.kernel.org Subject: [PATCH 1/3] check-syntax: update arguments for astyle v3.2 (possibly earlier) Date: Thu, 24 Oct 2024 14:24:22 -0400 Message-ID: <20241024182424.138616-1-paul@paul-moore.com> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: selinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update the astyle arguments in tools/check-syntax to work with modern version of astyle. It is worth mentioning that astyle v3.6.3 appears to have a problem with aligning/indenting continuation lines, preferring blind indentation over alignment. Signed-off-by: Paul Moore --- tools/check-syntax | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/check-syntax b/tools/check-syntax index 2115a7960dd5..2775eb46c6c4 100755 --- a/tools/check-syntax +++ b/tools/check-syntax @@ -57,10 +57,9 @@ function tool_c_style() { astyle --options=none --lineend=linux --mode=c \ --style=linux \ --indent=force-tab=8 \ - --indent-preprocessor \ --indent-col1-comments \ --min-conditional-indent=0 \ - --max-instatement-indent=80 \ + --max-continuation-indent=80 \ --pad-oper \ --align-pointer=name \ --align-reference=name \ From patchwork Thu Oct 24 18:24:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 13849562 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAA881FF7D1 for ; Thu, 24 Oct 2024 18:24:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794270; cv=none; b=asvkiYSb+cUppLNM53XgUSzqN/j7tX9NR3MDVhmaHno/970NZDllsR+ARo0j+/Zv8QoggHH0aYD7bVOK9r96uOp32sk4D7+mImltv8EXvGHV5SC+tK05WsDa2AqgPRVb9VgQqvtXz0a4YghbjutzHRktI/kF//DWDcD4UJwmJec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794270; c=relaxed/simple; bh=vIDGqfMAAfj1VQn2Ig3cIrxvNnivxIf/xxBwfcDd8NQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dUZPQBpaj5Fnae5np9e7hPccT9b05btj5iXQGhMOJFXKZ4oqphbN7rsz4MeuthD54uB2tHeBQBrEU/AWh5VBYv4D32oKBniM8USAOL3SW9V87hyuD8XXpHUShbSQ9kP98j3nx8ti7bAR8lWZKRLKcEfHr76Q1MgBU8nKI2azoSk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=SvwP8sin; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="SvwP8sin" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-27ce4f37afeso899713fac.0 for ; Thu, 24 Oct 2024 11:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1729794266; x=1730399066; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ErjSAAO0nliopgGm/OgPwfgSrxeukRY7S9V2/lFbhvY=; b=SvwP8sinLDMcdzG6yH0RKFKUT5hjRa7D2tfRuXCHDEw+hzr7SJ0KP3ohtOfsYZnPAv tZrate5dw/HKREgGNbrddlNcq+kVzsuTTrk88QVuoMT4s1SCZ18lJXMzNWZsHPXmj+om +xkTl7UOG3+OAFPC5O1tJ15CnUENPFj8odjrRdh1TIqju9cSBcC3cACVaRlhzbemnEiB U395p9Mfi6jWM9wLLWcChqiaN6VX/WxSDG362DAJYYi1w9WNIwjgJ07vHq20fTBuqK9E QxkZVBoh/HncDnbMHmupr7l6PEsIVpem19GkUVuXab1HcCU2jX0FcpUB7Imu9tLGwzUd 3Bug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729794266; x=1730399066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ErjSAAO0nliopgGm/OgPwfgSrxeukRY7S9V2/lFbhvY=; b=EpjQcluxV3bqvLYB4/SaKKC8lhiTXUsjPL958i36epdF8iNGFkjEQvHo+vS72eUYcB lWbwgqWY4fCzmAvGZCV8PwlShZ+16IW+cRvS4zk1qWdgpLhbDr6F5U3T9qo9B1XbcvWc D7W7IUloK4t4aazGRc57FBMDt+kJWPJzUuGtINuFNbsH3wnA9LGST48Vu3+mBtaW+Yvd FjsGg1NDNCPBvVI1IEKEeU0gdJOV9U8zw9akTawdarA+L1lbOXQrq679joar6/K6CyLo FoiaEQ7trUYFGb8DfWJI+eDI/gQ3jyNv5h8dz409JgNLKnVLOCKlMFms6omcdncnKECb 21eA== X-Gm-Message-State: AOJu0YxvJBtB8U27Vduadn9jIQsL6y6Vz+aKn2SP6wSBPzB6FKLB757Q 0f4T6PVGnIpMnxSBhoKPw3nrzCXMrujy+oF/UQfzt458xzqmPTdeTlIZMi7yqRysvKm2+yuWRMs = X-Google-Smtp-Source: AGHT+IEvA8o7FWqKrb9UpDU8f7Oo6+2y6qWunB5goxSfT8at5q0wOBqbAayARkqTDRFQsl9wNJDQGQ== X-Received: by 2002:a05:6870:819d:b0:261:1f7d:cf71 with SMTP id 586e51a60fabf-28ccb98558amr7523916fac.34.1729794266524; Thu, 24 Oct 2024 11:24:26 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b1659e69bbsm504025985a.50.2024.10.24.11.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 11:24:26 -0700 (PDT) From: Paul Moore To: selinux@vger.kernel.org Subject: [PATCH 2/3] check-syntax: ignore "bad" astyle versions Date: Thu, 24 Oct 2024 14:24:23 -0400 Message-ID: <20241024182424.138616-2-paul@paul-moore.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241024182424.138616-1-paul@paul-moore.com> References: <20241024182424.138616-1-paul@paul-moore.com> Precedence: bulk X-Mailing-List: selinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Create a list of known bad versions of astyle and ignore them. Signed-off-by: Paul Moore --- tools/check-syntax | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/tools/check-syntax b/tools/check-syntax index 2775eb46c6c4..c55c51420142 100755 --- a/tools/check-syntax +++ b/tools/check-syntax @@ -54,17 +54,26 @@ EOF # 1 Source file # function tool_c_style() { - astyle --options=none --lineend=linux --mode=c \ - --style=linux \ - --indent=force-tab=8 \ - --indent-col1-comments \ - --min-conditional-indent=0 \ - --max-continuation-indent=80 \ - --pad-oper \ - --align-pointer=name \ - --align-reference=name \ - --max-code-length=80 \ - --break-after-logical < "$1" + # filter on astyle version + case "$(astyle -V)" in + "Artistic Style Version 3.6.3") + # continuation lines indented vs aligned + cat "$1" + ;; + *) + astyle --options=none --lineend=linux --mode=c \ + --style=linux \ + --indent=force-tab=8 \ + --indent-col1-comments \ + --min-conditional-indent=0 \ + --max-continuation-indent=80 \ + --pad-oper \ + --align-pointer=name \ + --align-reference=name \ + --max-code-length=80 \ + --break-after-logical < "$1" + ;; + esac } # From patchwork Thu Oct 24 18:24:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 13849564 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C75F3B658 for ; Thu, 24 Oct 2024 18:24:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794271; cv=none; b=tplAj0zxBvTZm2qs+/x74HDvLBVSaUR9eXEHrO0glgBdvxhT7gm1MU1NUYi1JqbBRxQxBtBOO22dq0vzfqht/gEoScawqtSD+Y3QbaTumJnX11699vPd2kjYv9bZ4Jz3314OMqhJ1cVo2TpWA/BtKKWUJNvDof0Pc5X7muGbm48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729794271; c=relaxed/simple; bh=4WY+Crd4ctLH/evbytkENDeSBU1Hcee4d6vGUvE2mPk=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VIFjXYHmAG78XhtfXeWIAHnUoCHT6V4Gsz920KcTr/aAZTAdKwhypV0EYa8SPNWPAdbd8pDMAiSOUK8FBOxwTUkTeRrGs+tvzNCKT3yH0HGgPCRK/ewsF2NKfHhBaxha9P9jl3z/tT1VNgRlqvX7+jJD3iw2i8L1o5Uah2UnGzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=NXFNZJlP; arc=none smtp.client-ip=209.85.222.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="NXFNZJlP" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-7b155cca097so107340785a.1 for ; Thu, 24 Oct 2024 11:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1729794267; x=1730399067; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Fcgw3BRt2p/ZMd3wc0BL8XqRi6+ZF+u0IMHy0+u5E5g=; b=NXFNZJlPHhl7E58Z/gYaMTrrbX2q1oDK0HRUGiXvKpF8dXxw0LxVAECJOSSGK5L4Fd E5Aw3kdfAKjlz6rBvBbhcueP6N0nQrL855MxUVp+vixGKVG7g4J+zI/6jphz1HIy70iP kxVSAX6GtgUYHQBKW3xzz/DFs5suvNwiQlsehCbIG2hLH1zB75WQ9qD1MHRzNf81ykXy y1wr1o2pjLaGZFu5FVuG95uo08BNvGTawMmrJa6vIo14Szf//Ne22cxOTZdBL7RZtG6y gLECaa2ALRREDmJ47z3jGnubwLZsFLrA/FrD8KSS1Hz0uCyRZog/aT+DM8fBtNcZ9KqB jKwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729794267; x=1730399067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fcgw3BRt2p/ZMd3wc0BL8XqRi6+ZF+u0IMHy0+u5E5g=; b=XeKWll8z1SD15j+BKNOSVe0ib7MluXluqBED75qd+ODqP3jGLW+zaIKRA5kdK/ZHyw UdvERmTG7HrpEzbEpbDJj14LF7KWo7L15cbIoUZ0C6iz4QGK0p8hyBjY93ckxdFWy+Um TPvzNxlRu1EJ/vlzgQx/73qA+lZiVORNK8D5kJAacTOduo/wps6MbklpdWgf6qDo9mVy 0fK/7vLCrfZvwpp8TxWeBW+XF65g1Eqa7q6c4eDecpioKrBIkcwzqCSvDXKeQ80LxcxK X7qEIyyM7VIwi5ou92BmAPS6P5x51wK65YhKPQvMboJA+Fs5K//vGkxphntPyMX1QrpA 7rug== X-Gm-Message-State: AOJu0YxCij/LCqJmKdO2hFjT2IiP4/MVc92qn7zcSkdlomJHTn5oaweb d0MyxZab+9AKbcPiRNorbyWP9qO50h2MOdPxpy8wzozCsUWEFNuIgCwLsO9ycBkEpikzaDh/q8k = X-Google-Smtp-Source: AGHT+IGpNve0SU6bq/5rhJ1/JXoNZ98aFUbMpNHyyX5I0XMw8Zw/22C6K3R+NUZGsX7ZhIFoex8fKA== X-Received: by 2002:a05:620a:44c2:b0:7b1:36b7:3fad with SMTP id af79cd13be357-7b1865d3721mr551562085a.13.1729794267465; Thu, 24 Oct 2024 11:24:27 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b165a06daasm509380185a.70.2024.10.24.11.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 11:24:27 -0700 (PDT) From: Paul Moore To: selinux@vger.kernel.org Subject: [PATCH 3/3] all: coding style fixes Date: Thu, 24 Oct 2024 14:24:24 -0400 Message-ID: <20241024182424.138616-3-paul@paul-moore.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241024182424.138616-1-paul@paul-moore.com> References: <20241024182424.138616-1-paul@paul-moore.com> Precedence: bulk X-Mailing-List: selinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixed using astyle v3.6.2. Signed-off-by: Paul Moore --- tests/file/test_sigiotask.c | 2 +- tests/ioctl/test_noioctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/file/test_sigiotask.c b/tests/file/test_sigiotask.c index 1a8f8f51d438..97d343b71d6a 100644 --- a/tests/file/test_sigiotask.c +++ b/tests/file/test_sigiotask.c @@ -58,7 +58,7 @@ int main(int argc, char **argv) /* * Spawn off the child process to handle the information protocol. */ - if( (pid = fork()) < 0 ) { + if((pid = fork()) < 0 ) { perror("test_sigiotask:fork"); exit(2); } diff --git a/tests/ioctl/test_noioctl.c b/tests/ioctl/test_noioctl.c index 4b67e9a23640..319d90fa2ee3 100644 --- a/tests/ioctl/test_noioctl.c +++ b/tests/ioctl/test_noioctl.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) * < 2.6.27 or >= 2.6.39: Should only check FD__USE and succeed. */ rc = ioctl(fd, FIONBIO, &val); - if( !rc == !useaccessmode ) { + if(!rc == !useaccessmode ) { printf("test_noioctl:FIONBIO"); exit(1); } @@ -74,7 +74,7 @@ int main(int argc, char **argv) * Old: Should hit the FILE__GETATTR test and fail. */ rc = ioctl(fd, FS_IOC_GETVERSION, &val); - if( (useaccessmode && rc == 0) || + if((useaccessmode && rc == 0) || (!useaccessmode && rc < 0 && errno != ENOTTY) ) { perror("test_noioctl:FS_IOC_GETVERSION"); exit(1);