From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B6EACAC59A for ; Wed, 17 Sep 2025 16:54:30 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3A9D83CDC77 for ; Wed, 17 Sep 2025 18:54:29 +0200 (CEST) Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 6F7B33CDB75 for ; Wed, 17 Sep 2025 18:54:14 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 8E6671A00641 for ; Wed, 17 Sep 2025 18:54:11 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 611A920FAF; Wed, 17 Sep 2025 16:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1758128051; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sEOpeXeZSMxAviUqhYduB8DDTD4TzmDxahKF7G1kk28=; b=G0LUyUYOqcieKHtwL/iH0gtKAcPIc4ZTyl1BSo7x+aaSyOY7DGE4WYl/ZmfOAAJLhHq0O8 CMO19abm/bFYxcUwBjK2BqMD4sNirR9HhXEEIjan5t8cVoLsgyQQYv1xLlAWX2RdmDGOsI ILsL9g3YFcxCP9S7UZuZhE18IATfn/o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1758128051; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sEOpeXeZSMxAviUqhYduB8DDTD4TzmDxahKF7G1kk28=; b=Nc/N0GPmbPWGDpaINvL1Reqgv3tdBSS2uJWYkP7ZznmALd6UIoKju5MMBnznnFADVsY5+b 8buqUUmVowJT7bCQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1758128051; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sEOpeXeZSMxAviUqhYduB8DDTD4TzmDxahKF7G1kk28=; b=G0LUyUYOqcieKHtwL/iH0gtKAcPIc4ZTyl1BSo7x+aaSyOY7DGE4WYl/ZmfOAAJLhHq0O8 CMO19abm/bFYxcUwBjK2BqMD4sNirR9HhXEEIjan5t8cVoLsgyQQYv1xLlAWX2RdmDGOsI ILsL9g3YFcxCP9S7UZuZhE18IATfn/o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1758128051; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sEOpeXeZSMxAviUqhYduB8DDTD4TzmDxahKF7G1kk28=; b=Nc/N0GPmbPWGDpaINvL1Reqgv3tdBSS2uJWYkP7ZznmALd6UIoKju5MMBnznnFADVsY5+b 8buqUUmVowJT7bCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5ACBD1368D; Wed, 17 Sep 2025 16:54:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 31AkFrPnymhpOQAAD6G6ig (envelope-from ); Wed, 17 Sep 2025 16:54:11 +0000 From: Avinesh Kumar To: ltp@lists.linux.it Date: Wed, 17 Sep 2025 18:54:02 +0200 Message-ID: <20250917165403.6038-1-akumar@suse.de> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Virus-Scanned: clamav-milter 1.0.7 at in-3.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH] ioctl_pidfd05: Check if PIDFD_INFO_EXIT is available X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" This test also needs this check as it might fail with ioctl_pidfd05.c:45: TFAIL: ioctl(pidfd, PIDFD_GET_INFO, NULL) expected EINVAL: ENOTTY (25) ioctl_pidfd05.c:46: TFAIL: ioctl(pidfd, PIDFD_GET_INFO_SHORT, info_invalid) expected EINVAL: ENOTTY (25) when system does not have PIDFD_INFO_EXIT implementation. Signed-off-by: Avinesh Kumar --- testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c index c379717b3..01ea363b6 100644 --- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c +++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c @@ -14,7 +14,7 @@ #include "tst_test.h" #include "lapi/pidfd.h" #include "lapi/sched.h" -#include "lapi/ioctl.h" +#include "ioctl_pidfd.h" struct pidfd_info_invalid { uint32_t dummy; @@ -48,8 +48,15 @@ static void run(void) SAFE_CLOSE(pidfd); } +static void setup(void) +{ + if (!ioctl_pidfd_info_exit_supported()) + tst_brk(TCONF, "PIDFD_INFO_EXIT is not supported by ioctl()"); +} + static struct tst_test test = { .test_all = run, + .setup = setup, .forks_child = 1, .bufs = (struct tst_buffers []) { {&args, .size = sizeof(*args)}, -- 2.51.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp