From patchwork Tue Aug 16 05:15:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 1666656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dPaTSyQH; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M6K9q3Ljbz1yft for ; Tue, 16 Aug 2022 15:15:58 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B35F03C972C for ; Tue, 16 Aug 2022 07:15:48 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 677223C96AC for ; Tue, 16 Aug 2022 07:15:46 +0200 (CEST) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 596846001AF for ; Tue, 16 Aug 2022 07:15:44 +0200 (CEST) Received: by mail-pj1-x1032.google.com with SMTP id gj1so8818178pjb.0 for ; Mon, 15 Aug 2022 22:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=oyN800X9x0VLzdXNvF5+HSfm5brMyn4q4QD5jE3XSmY=; b=dPaTSyQHYFCP8FbM6HaPfT9zDFFWAs1N5EiiMzzdqfqxr6IABCj2lAW7iZ1Iq6vhxU uit+SAwNyM1yHKAFmo882CnpFGwWp6voIonAOQNy+JOgMlYXgiZZjwJfxqsEpQnVOdxr ELYGGgtCAKb28CuND8SxwTTN+5E58fJoG6mLJrI8jZ5/jeQX1e6WJ8LLQWw4bxgEmJC5 bReq+j89DshwPkVlZLQszi52ispE6B6kCDplMNtJHt0onYbbHSV8mfzV/idCxsiXX6zc B45MTE4xZpKkx8fIqUZFUto5yfW4Suju7exvIALXZfQMUYPldkOos9vHzQOgRR8zaJ7X hOfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=oyN800X9x0VLzdXNvF5+HSfm5brMyn4q4QD5jE3XSmY=; b=1Rd9OTI0LCGKzxmlixrJBzbFG0+SHpsYnU1Vuk7y4jgA5OkpFRPfVrzE5Lv22g8EMx QDv1y7OrADUeRaj19jAxC3G5NdX6tZ9hGfFYctvhRq/5mHXaw9YSe1k1XclmlioKfwLW MIOaSXrBqTFbsDfuU5wm3DAKexPrJ6qyH+xAWjO+TunWHzb9xUU30SLlCcV7tz92kQwo ABQgtwr/xM03cW/e6/kTFWVwRwu9wXNv0TjowTb5CSG3sa8POIPojjz+lOdUg0bNIS9X zKvhaHgrM6/+UOWP/hXKnBFcw6f3aArxWnW+cXt1w6gZ76+haBK9Dk/+dNNVztX28Xdz i/cg== X-Gm-Message-State: ACgBeo1VJMa+Di49x6tTc09ymfJrva3sQykt1eom2GUVXMQT9MDzi/sO +5FzCGmbz5LB0Sw6aKZPAA8bAcPk1vUFrA== X-Google-Smtp-Source: AA6agR6R0ULUQdABkHTcP3gAgZngKX/uR35PoLAeDMkyLVyhZvaXNyjen2eCM1qNiAF8hw0QX387lA== X-Received: by 2002:a17:903:22c1:b0:16f:3d1:f5c with SMTP id y1-20020a17090322c100b0016f03d10f5cmr20353840plg.155.1660626941689; Mon, 15 Aug 2022 22:15:41 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::bb7a]) by smtp.gmail.com with ESMTPSA id l18-20020a170903245200b001641b2d61d4sm7965252pls.30.2022.08.15.22.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 22:15:41 -0700 (PDT) From: Khem Raj To: ltp@lists.linux.it Date: Mon, 15 Aug 2022 22:15:38 -0700 Message-Id: <20220816051539.2948547-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/2] Add configure check for sys/pidfd.h 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: , Cc: Khem Raj Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Use it to include newly added sys/pidfd.h in glibc 2.36+ Signed-off-by: Khem Raj --- configure.ac | 1 + include/lapi/pidfd.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 81cba98c2..a0123f166 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \ sys/epoll.h \ sys/fanotify.h \ sys/inotify.h \ + sys/pidfd.h \ sys/prctl.h \ sys/shm.h \ sys/timerfd.h \ diff --git a/include/lapi/pidfd.h b/include/lapi/pidfd.h index 244d3acaf..d29a2b274 100644 --- a/include/lapi/pidfd.h +++ b/include/lapi/pidfd.h @@ -15,6 +15,10 @@ #define PIDFD_NONBLOCK O_NONBLOCK #endif +#ifdef HAVE_SYS_PIDFD_H +#include +#endif + static inline void pidfd_send_signal_supported(void) { /* allow the tests to fail early */ From patchwork Tue Aug 16 05:15:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 1666657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AJpn8508; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M6K9v5Fdlz1yft for ; Tue, 16 Aug 2022 15:16:03 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D4B5D3C9787 for ; Tue, 16 Aug 2022 07:15:59 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 7F76F3C96E5 for ; Tue, 16 Aug 2022 07:15:46 +0200 (CEST) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 8564710006C5 for ; Tue, 16 Aug 2022 07:15:45 +0200 (CEST) Received: by mail-pl1-x635.google.com with SMTP id t3so356575ply.2 for ; Mon, 15 Aug 2022 22:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=LO2SjgNkaYYExEEDtxNJ+NTRG5h3aa/zS0/+WKK/gX8=; b=AJpn8508PRkrQpoMHzuaCA7YC/Ys7Eo+LLn9FKWNK/5Zq/elPE9BDVygCpiYaBqTOT 0x7UvXoGD/FIM88tXJup2otJfKk7Bmmzr3+mQSW1f0H7uFMswD/qEOBA9kueZAac+Nia pXZz695+1P1KvgX2d2iQotfshEEOFncbF97azi3hlux2g49bBjJJtnVFhEsqvpvPnqQH 7BWbE3SYFQiSSY+0BzEFrkZFa0uYKlQnqNsIRIpmF8sWmWHYJfwCB6FR0VStKaGfe4qn cK+oC9Q4yBRmi9ndpIGzZCMveyF97hDRG6vh287clAXhgBGS6bBKDqVzEtWgu2EAbJhs GDgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=LO2SjgNkaYYExEEDtxNJ+NTRG5h3aa/zS0/+WKK/gX8=; b=co9qhoPButzvcz1vrLPGDI8q+aiRmQfUfd7Dz0wt6wS9gOWJNNnWGHv7SnII0eT5Bt sfRYCFrmzaCEzLzMurbYTczWDIpdfi5b+mEjrsRyRhkqS+9R7U+DG2bSAyGvBFzRCrxV uiI+sv6in5ZWhKJkPTYQ9XeO0FlFNmx8Wjnhk5cwmrQyyM+imsOWVauGHtmyZiplQDjQ npiQaLWbyN/JGpLHkhXM5AhCzLbWDS5ZfKgSsAQ/fpMh5odWg0YClBRrJztlf3HWsl21 suuuZIKdB1OjZ1Fzcye+WlOGRmAbwf2Ohff1G7Pi3UCYm50TcdTkpj6xGJlnTYNOrIF+ 0PpA== X-Gm-Message-State: ACgBeo2PpBrEVLZL3Npep3m9Bj5/c5pnsoLWsGNYvRWAOQ01MVA4uGJy L5OipYboNEG925XZAFKcMr2DmTegQ7CMKA== X-Google-Smtp-Source: AA6agR7YuUP9K4SUnVWuI23CClxA4go4fAr1hpiWps5s8mmtDu+TQXt7BZJe91ogXWM06tqgdZtZ4A== X-Received: by 2002:a17:902:ce0e:b0:172:69cc:60aa with SMTP id k14-20020a170902ce0e00b0017269cc60aamr9838333plg.31.1660626943456; Mon, 15 Aug 2022 22:15:43 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::bb7a]) by smtp.gmail.com with ESMTPSA id l18-20020a170903245200b001641b2d61d4sm7965252pls.30.2022.08.15.22.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 22:15:42 -0700 (PDT) From: Khem Raj To: ltp@lists.linux.it Date: Mon, 15 Aug 2022 22:15:39 -0700 Message-Id: <20220816051539.2948547-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220816051539.2948547-1-raj.khem@gmail.com> References: <20220816051539.2948547-1-raj.khem@gmail.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 2/2] Fix conflicting linux/mount.h and sys/mount.h 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: , Cc: Khem Raj Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" glibc 2.36 mount.h is conflicting with linux/mount.h [1] which is included by linux/fs.h via lapi/fs.h, as a compromize define needed macros from linux/fs.h and avoid the conflict [1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E Signed-off-by: Khem Raj --- include/lapi/fsmount.h | 5 +---- testcases/kernel/syscalls/statx/statx09.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/lapi/fsmount.h b/include/lapi/fsmount.h index 3609855f6..a61711d52 100644 --- a/include/lapi/fsmount.h +++ b/include/lapi/fsmount.h @@ -12,11 +12,8 @@ #include #include -#ifdef HAVE_LINUX_MOUNT_H -# include -#endif - #include "lapi/fcntl.h" +#include "lapi/mount.h" #include "lapi/syscalls.h" #ifndef HAVE_FSOPEN diff --git a/testcases/kernel/syscalls/statx/statx09.c b/testcases/kernel/syscalls/statx/statx09.c index aea329e08..e03f29613 100644 --- a/testcases/kernel/syscalls/statx/statx09.c +++ b/testcases/kernel/syscalls/statx/statx09.c @@ -18,14 +18,22 @@ */ #define _GNU_SOURCE -#include #include #include "tst_test.h" -#include "lapi/fs.h" #include "lapi/fsverity.h" #include "lapi/stat.h" +#include "lapi/mount.h" #include +/* define neded FS_* macros to avoid linux/fs.h conflict with sys/mount.h */ +#ifndef FS_IOC_GETFLAGS +#define FS_IOC_GETFLAGS _IOR('f', 1, long) +#endif + +#ifndef FS_VERITY_FL +#define FS_VERITY_FL 0x00100000 /* Verity protected inode */ +#endif + #define MNTPOINT "mnt_point" #define TESTFILE_FLAGGED MNTPOINT"/test_file1" #define TESTFILE_UNFLAGGED MNTPOINT"/test_file2"