From patchwork Thu Feb 22 10:12:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miko Larsson via B4 Relay X-Patchwork-Id: 13567011 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B145C3F9F0 for ; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; cv=none; b=VYmiQEemuqURpfx9i2YSQLg4sjkMmGOWN1tH/jnOHGvecsbURs7UzyUSO9DFlh24kYnU9SFH5c3Cg2GmiaQnEWL1PfQFmYP7QmPU+yrdGYjSFFw9UA213OYsbdu9gjOkQCLi7xMTLsWdrCh9zok31f7Mjk3tL4cXMvrmH9Aa3BA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; c=relaxed/simple; bh=WYbaaROxJ8zpmPOenkC4a6YFj75YP20m2E1WeRaJY9c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GwrPzR8XaUHQoafWS/P5uUhWlwVwSLK6Y7mar/GoJn0Q8wA8PglZAaSHJGBT0eF+qeyJjMIlonnWciRHRR/hr48ZQFkm6oPkIxhqGu2fdil3V5IkYh8vwxhexJ8//MvVk+QLgB2N0BS/crgtuSAv/QM7MANTYlpKN7TgJeUfEGk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EcwmieH8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EcwmieH8" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5F2C9C433F1; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708596766; bh=WYbaaROxJ8zpmPOenkC4a6YFj75YP20m2E1WeRaJY9c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=EcwmieH8xUCDt26Kd/ZNvkmp822feLqX1cpqEIfFBNY8jB8NRmbb9Eg9s7VYI9c4o QEd7VmdsixVNXF9GO+aLaL5Ed1H/ffoyJ9PSQ4c/km5nY7ZH3izbxdWaUSllFXSSJD uNU85wXuYRs2RbV6656w9AmfyhKEu+Oa6UtfrynlHezWD32JL6UJ3F1P0Zrj5QzRVc RxTRZb9p+fhkdzzMZO5FR1BdyfPDh4YrdQX4pHMvsrcP0Y7Nx1z028TFgI3CfoEIwk e0FXSgFoptcf+sGp/q0TUUYpLD/JVQgwls9WVEayCvfN7LVLSqGws2rOfRhthqEQrr E2PYIX9+7Q8AA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EAF4C48BEB; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) From: Miko Larsson via B4 Relay Date: Thu, 22 Feb 2024 11:12:44 +0100 Subject: [PATCH v2 1/3] utest/tracefs-utest: include linux/limits.h Precedence: bulk X-Mailing-List: linux-trace-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240222-utest-fixes-v2-1-ba9cd06b41d3@gmail.com> References: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> In-Reply-To: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> To: linux-trace-devel@vger.kernel.org Cc: Miko Larsson X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708596765; l=871; i=mikoxyzzz@gmail.com; s=20240215; h=from:subject:message-id; bh=fJxacPVoyFtCYtoqXqDtpb725G8Jw3FCfY22Xy5jABM=; b=Idf+mPBK8Jeu1EXfl3woR8JPDGgjJ/7P643F1zkJzj9BaGQWJdzDMwDpUn7Uz/N5WMEn7ZlqF 0Vb23hGg1TyDK2N3Yb23L8eahbKr77dX7Uei4zMEyEurSApH8ZOvF2y X-Developer-Key: i=mikoxyzzz@gmail.com; a=ed25519; pk=1WO6EuQa9ZdBA5vCl3bQNjIb6FdQDoTriJmTDrF5mFw= X-Endpoint-Received: by B4 Relay for mikoxyzzz@gmail.com/20240215 with auth_id=130 X-Original-From: Miko Larsson Reply-To: From: Miko Larsson This fixes the build with musl + clang >=15; musl doesn't define PATH_MAX anywhere else, and clang >=15 doesn't allow implicit declarations with >=c99. Without this, the build fails due to PATH_MAX not being defined. We could include limits.h from the libc, but AFAIK the libc doesn't necessarily have to define PATH_MAX, so it's safer to just include linux/limits.h Fixes: 845f16976929 ("libtracefs: Add unit tests") Signed-off-by: Miko Larsson --- utest/tracefs-utest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c index 963fac7..70bcf3e 100644 --- a/utest/tracefs-utest.c +++ b/utest/tracefs-utest.c @@ -16,6 +16,8 @@ #include #include +#include + #include #include From patchwork Thu Feb 22 10:12:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miko Larsson via B4 Relay X-Patchwork-Id: 13567012 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B76D93F9F3 for ; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; cv=none; b=jMBSrsE6feTubs5tZ7MRyp0DllvwGielJuzxaxWUT2osYHAHtjnLwDWt35E9ukG5foFm86W2OOPqSD2SuyYrV9YsD3itwNLWfIu7eBFv6NgpIzXy5u3GqVr9AkJ4EEYlviVwHEQRhiadRU8Q9Rn/+cnmCJAYVjHhfZFizk9ih7U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; c=relaxed/simple; bh=EoiTx4uct3Fu7kGvIeJgG9RrbZvhuARdQQ4PgLhCS84=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eZATm4Df/zJ9KRl/ZNLVjGbwJocV8CZU4iONCHeMrry6oKYflWQpWApK1fmVqxbGgnmOwVeQ1BdZq2A960+PS28EHgoRMvuOs2j5PdG6PcPGC+/4EwYziIpLnNs2hUtm+Saj41wM38hEXjSbG/vCUJ4If6lH2yRQjxLNbJBefpI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sKAihYb6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sKAihYb6" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6C899C43390; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708596766; bh=EoiTx4uct3Fu7kGvIeJgG9RrbZvhuARdQQ4PgLhCS84=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=sKAihYb63tA2SMse1eSnG0KQsxusnX3fPPZrJY1jvBysEOXtqPsH/O4DCOUNLJzMu 1FkN98IqwBTn+wLC0WTh3I4bz7ebzqv775qbKsKMObHgKlR9lVoX0oQVaaoynGlSis Oj0GWwFHYZnuyp7mZpVmL6znUcnqKXxDzivaGgcazofBosPMhWLmqVdFcVpxR3WmF5 CwPSmk9HF6SYrk9bf2vxdCf2Cp2+xDAEtmqXzFfyjjgrBGPT1FGYkxWeLu/O4HoSxb 6qI3w+fhehLnjtnB6VhWTGqK8mogT6vSzY4HVZ6EYkpkIsMI0uDmlYchpZsXlqZe44 TRSTI/8LjJo2g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B968C5478C; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) From: Miko Larsson via B4 Relay Date: Thu, 22 Feb 2024 11:12:45 +0100 Subject: [PATCH v2 2/3] utest/tracefs-utest: define _LARGEFILE64_SOURCE Precedence: bulk X-Mailing-List: linux-trace-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240222-utest-fixes-v2-2-ba9cd06b41d3@gmail.com> References: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> In-Reply-To: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> To: linux-trace-devel@vger.kernel.org Cc: Miko Larsson X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708596765; l=712; i=mikoxyzzz@gmail.com; s=20240215; h=from:subject:message-id; bh=5SeXhPMSZNf3r3OXzTkrJzWyI2EtopiLnN2OK4A1N2s=; b=64d3NsTY9uZkTKjNRXuCH/UjaS+3LLBZFfwpz4dJaSHKipbeqWnQdLSaxDl0Pi7P6LfD5pBuK MsTpcC1ft6KDINRcQE7QHGrv1cvXMxL6UxQld66CAS9BCfEcBhl68Vb X-Developer-Key: i=mikoxyzzz@gmail.com; a=ed25519; pk=1WO6EuQa9ZdBA5vCl3bQNjIb6FdQDoTriJmTDrF5mFw= X-Endpoint-Received: by B4 Relay for mikoxyzzz@gmail.com/20240215 with auth_id=130 X-Original-From: Miko Larsson Reply-To: From: Miko Larsson This fixes the build with musl + clang >=15; musl doesn't declare lseek64() otherwise, and clang >=15 doesn't allow implicit declarations. Fixes: 0f45e68cb04a ("libtracefs: Add unit tests for tracefs_cpu functions") Signed-off-by: Miko Larsson --- utest/tracefs-utest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c index 70bcf3e..224903b 100644 --- a/utest/tracefs-utest.c +++ b/utest/tracefs-utest.c @@ -3,6 +3,8 @@ * Copyright (C) 2020, VMware, Tzvetomir Stoyanov * */ +#define _LARGEFILE64_SOURCE + #include #include #include From patchwork Thu Feb 22 10:12:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miko Larsson via B4 Relay X-Patchwork-Id: 13567013 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B76F73F9F5 for ; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; cv=none; b=HgdQXgUkfUSiuwKG4C/eiLPR3FNP5fRBDk4w4a78+sNHy81XEENuFR1xqSnldWUHdZxjgnGNHK82DNJDCpwcXIkS4HPppVc9qz8HCWBKlglDVp2plvSbb/UmqVRh2faJSw2o8OOksm+7oZ4QBxKp8EOiKxI3TX9K4jjD/cWSUFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596766; c=relaxed/simple; bh=1sVpsr/KveokqtJD6tJodHE+uHJOk2SHtqKyA/DMj8c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g0DkD9gYr9p1Vvm4jFXr4Rlw5wNiNLFgO9oiK+UiFrAD1qRcj7WtMBBafuuOAv15DeR0D83QT950NHtmEKPBUZKqIk9pWUY58K2+GZC9ZBGYhESiyJ5eV0eRBFksUHCs7/hZ5oQ4IjwlQgW5gbfkflRsoBDldDJCMW+c/1dQtDQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XMNNdloQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XMNNdloQ" Received: by smtp.kernel.org (Postfix) with ESMTPS id 78CFFC43399; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708596766; bh=1sVpsr/KveokqtJD6tJodHE+uHJOk2SHtqKyA/DMj8c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=XMNNdloQBfPQDtE5MJ/4Wlo9ogInNdyCrnW9rBb5g3Xta3A1dF4dyOQzRUMBuXv5n Y2jqTlXhxfHphNUFLMV62img4JAE19XIkNgvLwAyLjCEe+0cOjtcqPw+dkT+lwyXHe KRCn5WTAErnuQGW68vN80tLfYJlmUhfMvQF4+lEiSeSufD3Qtv4swLTanCdSFbZMCT OxKSyn0s7/KFslv3sfLDhvM/FL+foLNbsNhl82QEjqW8fdcIz6Q/vChcfr8rJmhsog Mfw/PfkZhcWTR20ZSH6OgYcuirgjmyw8p7QxkpUEIoXBAk/uB3pKEEhvNUwVdY5pag NZwabr5HIun0A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68598C48BF8; Thu, 22 Feb 2024 10:12:46 +0000 (UTC) From: Miko Larsson via B4 Relay Date: Thu, 22 Feb 2024 11:12:46 +0100 Subject: [PATCH v2 3/3] utest/trace-utest: include libgen.h Precedence: bulk X-Mailing-List: linux-trace-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240222-utest-fixes-v2-3-ba9cd06b41d3@gmail.com> References: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> In-Reply-To: <20240222-utest-fixes-v2-0-ba9cd06b41d3@gmail.com> To: linux-trace-devel@vger.kernel.org Cc: Miko Larsson X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708596765; l=667; i=mikoxyzzz@gmail.com; s=20240215; h=from:subject:message-id; bh=EetEr7KQnL5UP3Nk+LwH32FOuETzJwv3l+Uu0BV2+ng=; b=ApgoaBoIwbpv0szrNeoC41jE5sAhyPiQTQK71d+DGhAgbbyYbSeVpJzQSiMQDRKAgAiUL/5Yz 1sj8NL/YmR5CtOqz4xDsY4ROBeBSACZUEAvpvfWE+DHTOloiO/u55wL X-Developer-Key: i=mikoxyzzz@gmail.com; a=ed25519; pk=1WO6EuQa9ZdBA5vCl3bQNjIb6FdQDoTriJmTDrF5mFw= X-Endpoint-Received: by B4 Relay for mikoxyzzz@gmail.com/20240215 with auth_id=130 X-Original-From: Miko Larsson Reply-To: From: Miko Larsson This fixes the build with musl + clang >=15; musl doesn't declare basename() anywhere else, and clang >=15 doesn't allow implicit declarations. Fixes: 845f16976929 ("libtracefs: Add unit tests") Signed-off-by: Miko Larsson --- utest/trace-utest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utest/trace-utest.c b/utest/trace-utest.c index 58d4d4e..39485a1 100644 --- a/utest/trace-utest.c +++ b/utest/trace-utest.c @@ -3,6 +3,7 @@ * Copyright (C) 2020, VMware, Tzvetomir Stoyanov * */ +#include #include #include #include