From patchwork Mon Jul 22 14:21:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jos=C3=A9_Luis_Salvador_Rufo?= X-Patchwork-Id: 1963270 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 legolas.ozlabs.org (Postfix) with ESMTPS id 4WSMv11Xmnz1ybY for ; Tue, 23 Jul 2024 00:22:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A8C8E80D59; Mon, 22 Jul 2024 14:22:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id pwsL-IsQ1aGj; Mon, 22 Jul 2024 14:22:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5AF1980F87 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5AF1980F87; Mon, 22 Jul 2024 14:22:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1FBBE1BF286 for ; Mon, 22 Jul 2024 14:22:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0D1B240448 for ; Mon, 22 Jul 2024 14:22:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zZuLnMamXQ6o for ; Mon, 22 Jul 2024 14:22:44 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::22d; helo=mail-lj1-x22d.google.com; envelope-from=salvador.joseluis@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 323B14029F DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 323B14029F Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by smtp2.osuosl.org (Postfix) with ESMTPS id 323B14029F for ; Mon, 22 Jul 2024 14:22:44 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2ee920b0781so50554541fa.1 for ; Mon, 22 Jul 2024 07:22:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721658162; x=1722262962; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JQkAXqiA4+ckSkRlcOgFS2lwqZ2JrF+BYCp81kOFUds=; b=J+uEv82oJwZvsfqDFIffjAsWOBdpKxcVE82YnJXpMpiZZmVc/OG6Ytn6DdAITmF1p5 rFoaHXHIwyGwflOIcRO5n6In7GfjfLqzrsMkO9GsSiO5iGTBlxlwV4G7a/q1WbURMuCO cm+eyS/Qf+FXMzsWKycO/kx/pBo4gqJh7bQ0DvI6Vlcu6XSVxNMg8PoGdjFdfN6F/p3g WDiIoNCqhp9aE6+TAFX71wSNjFqc28XJfIjXoH2P23JlYBwQHEs2S11D2FDsH+WBgV+m 8ctOFzO25kwzT8AAMTxQ47l2wDYeFolGVAGB898X0z4rl23A+XBS9p1lPNe0OSFImCXY nZAQ== X-Gm-Message-State: AOJu0Yz+fy1Pif+s6rVKSleqtOvqJgd84Ggeu0SWdW7RmTBwz5oFNp3w 8EIUn/3e3DHKG2byJO1tZjiaqhv8qVMVadGUybpzkmRvXaktQrbmQffIbw== X-Google-Smtp-Source: AGHT+IEJdscOWGmqgohmATyvXDGf9FfsJjG5MaurIwIseXunmFIisqik0mk0QoLvaL5Rn9umf5hPlA== X-Received: by 2002:a2e:9c05:0:b0:2ef:2d6e:58fe with SMTP id 38308e7fff4ca-2ef2d6e5ae3mr25836371fa.32.1721658161573; Mon, 22 Jul 2024 07:22:41 -0700 (PDT) Received: from cuervo.intranet.jlsalvador.online ([207.188.150.218]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36878684839sm8657743f8f.22.2024.07.22.07.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 07:22:41 -0700 (PDT) From: =?utf-8?q?Jos=C3=A9_Luis_Salvador_Rufo?= To: buildroot@buildroot.org Date: Mon, 22 Jul 2024 16:21:42 +0200 Message-ID: <20240722142141.2105929-2-salvador.joseluis@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721658162; x=1722262962; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JQkAXqiA4+ckSkRlcOgFS2lwqZ2JrF+BYCp81kOFUds=; b=Iss/xGl4KZAgugBGp1uatmll+eCK6SrSfmHkA0AgP4PRcg/L2fjU4JAGcU/moIj1lY 4mU7l13anc1/Y2c3z3e8k3eHzNg0EttsIO6avcSivxLojPZ0EJreunO+9O5PRhl2KZuK B9XbGw8iOIc0T8YdLY2h453wk7MTUW2u3ekpnW2md8lNGTKBeTbpMdKqbZLfZYR5nmV1 FfXtpx8vfCLmtAtIPitLmUbWNgdHBE6/j8iWMSlXRhXzO9W78GWfrCJJ+eX2WvyD+d0N sasmSuPiAG18Y5P9A17tl8N0Khie7HNjZNze99d6eO7EN42FoZiK6qJqn3x5tWEMlgzO 6/pw== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Iss/xGl4 Subject: [Buildroot] [PATCH 1/1] package/zfs: fix uClibc support X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Mukhin , =?utf-8?q?Jos=C3=A9_Lui?= =?utf-8?q?s_Salvador_Rufo?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: https://github.com/openzfs/zfs/pull/16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo --- ...s-ignore-if-SEEK_DATA-is-not-defined.patch | 162 ++++++++++++++++++ package/zfs/zfs.hash | 2 + 2 files changed, 164 insertions(+) create mode 100644 package/zfs/0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch diff --git a/package/zfs/0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch b/package/zfs/0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch new file mode 100644 index 0000000000..f47c615d10 --- /dev/null +++ b/package/zfs/0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch @@ -0,0 +1,162 @@ +From 93e7f8889072047276da11fe6a525d3f0ea16205 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Luis=20Salvador=20Rufo?= + +Date: Sat, 11 May 2024 22:40:12 +0200 +Subject: [PATCH] tests/cp_files: ignore if SEEK_DATA is not defined +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Not all C libraries support SEEK_DATA (e.g., uClibc). Skip the test case +cp_files if SEEK_DATA is not defined. + +Signed-off-by: José Luis Salvador Rufo +Upstream: https://github.com/openzfs/zfs/pull/16169 +--- + config/user-unistd.m4 | 24 ++++++++++++++++++++++++ + config/user.m4 | 1 + + config/zfs-build.m4 | 1 + + tests/test-runner/bin/zts-report.py.in | 1 + + tests/zfs-tests/Makefile.am | 2 ++ + tests/zfs-tests/cmd/Makefile.am | 6 +++++- + tests/zfs-tests/tests/Makefile.am | 14 +++++++++----- + 7 files changed, 43 insertions(+), 6 deletions(-) + create mode 100644 config/user-unistd.m4 + +diff --git a/config/user-unistd.m4 b/config/user-unistd.m4 +new file mode 100644 +index 000000000..302bc0bde +--- /dev/null ++++ b/config/user-unistd.m4 +@@ -0,0 +1,24 @@ ++dnl # ++dnl # Check for SEEK_DATA - only used for cp_files/seekflood test case. ++dnl # ++AC_DEFUN([ZFS_AC_CONFIG_USER_UNISTD_SEEK_DATA], [ ++ AC_MSG_CHECKING(whether host toolchain supports SEEK_DATA) ++ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ++ #ifndef _GNU_SOURCE ++ #define _GNU_SOURCE ++ #endif ++ #include ++ #if defined(SEEK_DATA) ++ int ok; ++ #else ++ error fail ++ #endif ++ ]])], [ ++ user_unistd_seek_data=yes ++ AC_MSG_RESULT([yes]) ++ ], [ ++ user_unistd_seek_data=no ++ AC_MSG_RESULT([no]) ++ ]) ++]) +diff --git a/config/user.m4 b/config/user.m4 +index 6ec27a5b2..2326a44be 100644 +--- a/config/user.m4 ++++ b/config/user.m4 +@@ -23,6 +23,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [ + ZFS_AC_CONFIG_USER_LIBAIO + ZFS_AC_CONFIG_USER_LIBATOMIC + ZFS_AC_CONFIG_USER_LIBFETCH ++ ZFS_AC_CONFIG_USER_UNISTD_SEEK_DATA + ZFS_AC_CONFIG_USER_AIO_H + ZFS_AC_CONFIG_USER_CLOCK_GETTIME + ZFS_AC_CONFIG_USER_PAM +diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 +index bb5a85d81..578692676 100644 +--- a/config/zfs-build.m4 ++++ b/config/zfs-build.m4 +@@ -294,6 +294,7 @@ AC_DEFUN([ZFS_AC_CONFIG], [ + [test "x$qatsrc" != x ]) + AM_CONDITIONAL([WANT_DEVNAME2DEVID], [test "x$user_libudev" = xyes ]) + AM_CONDITIONAL([WANT_MMAP_LIBAIO], [test "x$user_libaio" = xyes ]) ++ AM_CONDITIONAL([WANT_UNISTD_SEEK_DATA], [test "x$user_unistd_seek_data" = xyes ]) + AM_CONDITIONAL([PAM_ZFS_ENABLED], [test "x$enable_pam" = xyes]) + ]) + +diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in +index ecc50f487..3a00345ed 100755 +--- a/tests/test-runner/bin/zts-report.py.in ++++ b/tests/test-runner/bin/zts-report.py.in +@@ -162,6 +162,7 @@ known = { + ['FAIL', rewind_reason], + 'cli_user/misc/zfs_share_001_neg': ['SKIP', na_reason], + 'cli_user/misc/zfs_unshare_001_neg': ['SKIP', na_reason], ++ 'cp_files/cp_stress': ['SKIP', 16169], + 'pool_checkpoint/checkpoint_discard_busy': ['SKIP', 12053], + 'privilege/setup': ['SKIP', na_reason], + 'refreserv/refreserv_004_pos': ['FAIL', known_reason], +diff --git a/tests/zfs-tests/Makefile.am b/tests/zfs-tests/Makefile.am +index 3dd1a6452..8ae790057 100644 +--- a/tests/zfs-tests/Makefile.am ++++ b/tests/zfs-tests/Makefile.am +@@ -13,8 +13,10 @@ scripts_zfs_tests_functional_hkdf_PROGRAMS = %D%/tests/functional/hkdf/hkdf_test + %C%_tests_functional_hkdf_hkdf_test_LDADD = \ + libzpool.la + ++if WANT_UNISTD_SEEK_DATA + scripts_zfs_tests_functional_cp_filesdir = $(datadir)/$(PACKAGE)/zfs-tests/tests/functional/cp_files + scripts_zfs_tests_functional_cp_files_PROGRAMS = %D%/tests/functional/cp_files/seekflood ++endif + + if BUILD_LINUX + scripts_zfs_tests_functional_tmpfiledir = $(datadir)/$(PACKAGE)/zfs-tests/tests/functional/tmpfile +diff --git a/tests/zfs-tests/cmd/Makefile.am b/tests/zfs-tests/cmd/Makefile.am +index 23848a82f..69bba3039 100644 +--- a/tests/zfs-tests/cmd/Makefile.am ++++ b/tests/zfs-tests/cmd/Makefile.am +@@ -5,7 +5,6 @@ scripts_zfs_tests_bin_PROGRAMS = %D%/chg_usr_exec + scripts_zfs_tests_bin_PROGRAMS += %D%/clonefile + scripts_zfs_tests_bin_PROGRAMS += %D%/clone_mmap_cached + scripts_zfs_tests_bin_PROGRAMS += %D%/clone_mmap_write +-scripts_zfs_tests_bin_PROGRAMS += %D%/cp_files + scripts_zfs_tests_bin_PROGRAMS += %D%/ctime + scripts_zfs_tests_bin_PROGRAMS += %D%/dir_rd_update + scripts_zfs_tests_bin_PROGRAMS += %D%/dosmode_readonly_write +@@ -16,6 +15,11 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/truncate_test + scripts_zfs_tests_bin_PROGRAMS += %D%/zfs_diff-socket + + ++if WANT_UNISTD_SEEK_DATA ++scripts_zfs_tests_bin_PROGRAMS += %D%/cp_files ++endif ++ ++ + scripts_zfs_tests_bin_PROGRAMS += %D%/badsend + %C%_badsend_LDADD = \ + libzfs_core.la \ +diff --git a/tests/zfs-tests/tests/Makefile.am b/tests/zfs-tests/tests/Makefile.am +index cc66d762f..1e9f06a7e 100644 +--- a/tests/zfs-tests/tests/Makefile.am ++++ b/tests/zfs-tests/tests/Makefile.am +@@ -1394,11 +1394,6 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ + functional/compression/l2arc_encrypted.ksh \ + functional/compression/l2arc_encrypted_no_compressed_arc.ksh \ + functional/compression/setup.ksh \ +- functional/cp_files/cleanup.ksh \ +- functional/cp_files/cp_files_001_pos.ksh \ +- functional/cp_files/cp_files_002_pos.ksh \ +- functional/cp_files/cp_stress.ksh \ +- functional/cp_files/setup.ksh \ + functional/crtime/cleanup.ksh \ + functional/crtime/crtime_001_pos.ksh \ + functional/crtime/setup.ksh \ +@@ -2108,3 +2103,12 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ + functional/idmap_mount/idmap_mount_003.ksh \ + functional/idmap_mount/idmap_mount_004.ksh \ + functional/idmap_mount/idmap_mount_005.ksh ++ ++if WANT_UNISTD_SEEK_DATA ++nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ ++ functional/cp_files/cleanup.ksh \ ++ functional/cp_files/cp_files_001_pos.ksh \ ++ functional/cp_files/cp_files_002_pos.ksh \ ++ functional/cp_files/cp_stress.ksh \ ++ functional/cp_files/setup.ksh ++endif +-- +2.45.2 + diff --git a/package/zfs/zfs.hash b/package/zfs/zfs.hash index 9c8d4cec85..bef95063f9 100644 --- a/package/zfs/zfs.hash +++ b/package/zfs/zfs.hash @@ -4,3 +4,5 @@ sha256 9790905f7683d41759418e1ef3432828c31116654ff040e91356ff1c21c31ec0 zfs-2. # Hash for license files: sha256 1ffb70c33c4f79f04e947facc5c7851f289609256aacb47fc115f700427d9520 LICENSE sha256 f125a37c829705eff3e6f77a9f6c58fd71060f84ab54180b98fafdf94a2021eb COPYRIGHT + +sha256 71e605df37abf8c48b7c103e6dec7538b5d06fc91416c77c50525d021b9b91b0 0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch