From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 28E843491EB for ; Fri, 5 Dec 2025 17:12:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954758; cv=none; b=rbFdsQsAWQqEQE3Ka53OgKP17NfCP4kCfElz8Tf7AwaIQXDayon/teh5Mld7audwMuswnlohpUUt/++GtX4xcGhGZZjddNnB9cFsmjs0KkmyAV4/QqyvDYaH1auUcfL40MFXItiqLCZnqAfc3iopKZEX6YWk0ZuyHWsBH8jkTmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954758; c=relaxed/simple; bh=7b04OUSp5PPbHF012Af7Jd1Z5TcnkOHwaX4bsLzbOSE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dN73NitmSW7Fyx/MkGYfZg7USE3ixeFlgyKLcHFHGOkW6f+DYPLm4kFIESodtGG4CiXWfFiDtUk/k296AMQ8VdZMcUmulTatJYp9Emr1lzv/cZ4VBx/L0iOkkxToULb35gWGPMQAT8ssuUzFLUph6FLBuKgESp570KRRbogE+pU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RQ56iiPV; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RQ56iiPV" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-297f35be2ffso35959825ad.2 for ; Fri, 05 Dec 2025 09:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764954745; x=1765559545; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=XDia+MA8HLQHzWjV88VwCKaD5C1zT15MPbh82oRmFds=; b=RQ56iiPVcENS3HQKjiLkzKx1aYAH3n1Jh6A8PEZ+VjWpPaJqOBps0QEuowfb2p/c/7 jGLMU7XJrB9o/toV183CCWiNgHPdUXGvS5CEYJJ0dKopLt0ndPC9TB2K5OcjEC07Sl3r NaWAtLn/mUnT3wPSl23pzccsZybVtyGNUDAR3lySTz243KjoS5jmN1FEDAMwNB4gN/R8 Kr1KBlEYYoCIKj6C6U6fxDf5PIHotZqlyF9TSGH2u7+3V03jMK4MwuRjqInTRQt25N3Z XMWR9ZSuHyf4ZE4+S4I903x1n/mpAOmN8iHRkLtmJNAgwaB7RlXeQc3PAsmeEcBQdfzc r0zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764954745; x=1765559545; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XDia+MA8HLQHzWjV88VwCKaD5C1zT15MPbh82oRmFds=; b=RM7Ju6n7ndM9JDmKEgfVgVBZevAbdwVBg9ha4P78FJophPdfVh5nJTR68ghZJALP6S ZF63odsuWNma5kduj7qw+rG7EXn1mcOlms4kSkp7tSRyvuhpSZn03glwpnJYHKufgDJg l/FgddBXc/5FKGK0/ptHIy0XLcgh9KibdwhyF4HF5ScJO2q+lYQWag/ZQGCjfHZxw0JX hE4QqDTr43tcY0/N77Ej3R/L4VOGF4aLlhitzh/ML6A4+Qn1lb+kRfnxF7JoEXpcK/qo EYA9WNRuvepU5Jzd+goPRAdTvxGDCmxqi8kWJglKsP5Lnpmy18eMKXwKRU2b7TpfySEC qjlA== X-Forwarded-Encrypted: i=1; AJvYcCUU3AFSav2EjKK7/DDrnfgvt0cHnV5DhqavIBoLgkBhsCBzYNe5hvHzlZQAx7iAiXQsmw5sdcE=@vger.kernel.org X-Gm-Message-State: AOJu0YyIZ+DHP6HXg+90Fncnpy+VKgl8lnrCfnUSVouklrDwDA504JoL 6mUCWvBF7N2P2PRZkRHGVWfV9+jg7wS5KH6Kv72uFgXD0iiO2pbUKsIoVjv4Kg== X-Gm-Gg: ASbGncuDxHAEyneqoGyfq+F6mBOZA+yH+h71cPhjarYZ4mCZ1p2hnTSbJOftG34QqVx uGQBAjAYAGk5ecTwUqCzwYNW+8vkPS3vjVamuetqfFMjMHx9h/lUcmZKslokA7Kcm8UG/f19Qe0 jUgY/2dtQiEaZKieUuJ4lZs3xxYWwlN82UVeosR1IhPhbMsioSxVO/c4S/sJuj4r2alZNWVaBcZ 7lFQvcfI+ThhCtRBixXCPH5EEC5xc0GSQOXqjHfUxPHdmJDaRyjuwT3yNN7fOWsNwwI4o+VLHPr JNoeGP7PMQtu0KUA2NxOTbG+JM2+FM+PGlAgrvicjXW4kFB4pdFfwSZzrChpoFvOHjZWbLzNgS8 71eM/6vkHWt2t4v8mcGHrR1JvCM9//nZ8yY+fgL7uUmuXtSvXXEDO9kw14vccz1o1yVkYWrTGJH R5zVXwTBVmrHok+iwbsQ+9qiU= X-Google-Smtp-Source: AGHT+IFpapsnYxxuCMxEK0T30dMrqsmXHdoldVmyDlrGUqkSkZ/3MRNWB7srXi6l4pDtAeoht0dECQ== X-Received: by 2002:a05:7022:428f:b0:119:e569:f62e with SMTP id a92af1059eb24-11df0c5273fmr9380516c88.39.1764954745007; Fri, 05 Dec 2025 09:12:25 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11df7703bd7sm22123783c88.10.2025.12.05.09.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 09:12:24 -0800 (PST) Sender: Guenter Roeck From: Guenter Roeck To: Shuah Khan Cc: Jakub Kicinski , Christian Brauner , Thomas Gleixner , Ingo Molnar , Eric Dumazet , Kees Cook , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, wine-devel@winehq.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Guenter Roeck , Miklos Szeredi Subject: [PATCH v2 11/13] selftests/fs/mount-notify: Fix build warning Date: Fri, 5 Dec 2025 09:10:05 -0800 Message-ID: <20251205171010.515236-12-linux@roeck-us.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251205171010.515236-1-linux@roeck-us.net> References: <20251205171010.515236-1-linux@roeck-us.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix mount-notify_test.c: In function ‘fanotify_rmdir’: mount-notify_test.c:467:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ by checking the return value of chdir() and displaying an error message if an error is reported. Fixes: e1c24b52adb22 ("selftests: add tests for mount notification") Cc: Miklos Szeredi Signed-off-by: Guenter Roeck --- v2: Update subject and description to reflect that the patch fixes a build warning. Use perror() to display an error message if chdir() returns an error. .../selftests/filesystems/mount-notify/mount-notify_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c index e4b7c2b457ee..5c929275e689 100644 --- a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c +++ b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c @@ -464,7 +464,8 @@ TEST_F(fanotify, rmdir) ASSERT_GE(ret, 0); if (ret == 0) { - chdir("/"); + if (chdir("/")) + perror("chdir()"); unshare(CLONE_NEWNS); mount("", "/", NULL, MS_REC|MS_PRIVATE, NULL); umount2("/a", MNT_DETACH); -- 2.45.2