From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 659DC606A68C for ; Mon, 30 Nov 2026 21:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=hqIdi15R Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59C4340685; Mon, 30 Nov 2026 22:52:17 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTPS id 15A1640614 for ; Mon, 30 Nov 2026 22:52:11 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-8b2382bf051so5760071b3a.3 for ; Mon, 30 Nov 2026 13:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796075529; x=1796680329; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=o+w1OO7jpHTbNcS1r4LBD4Pj0vqkIHVfWgvgdC4bqxE=; b=hqIdi15RH98B3WVI396HM3XhPvwFbfze5RWV3Wt2hNgMh5OKOnYuDc/7TfvQ8Rl21a G8UEvWmELkHCE4c/dAkosFPJacIv2psgZEw0UHUIdV+Gf43tJqPvdvHUQw5DdRKBvNUg odBXSh9oDsq3Mn/gi12+85D7bGfahT4dZ4b16GsySVK0xVonZqI/R1PQbqnOAyvkuIFc ly9RJWv+xTCwR3KZlPydPVaSNf3iL+gutxAauQcicQbuKy8KsVVYv/xJ9g7hn1fKvYQ8 pPN6eobuTb4sz+twihOQf5l9iqkQzxJvkiTH3iy079py3d536OPw21WtNZmJH4Gse54V fthg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796075529; x=1796680329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=o+w1OO7jpHTbNcS1r4LBD4Pj0vqkIHVfWgvgdC4bqxE=; b=RpWkM9FEvjqMYw0t6mjO6KrixNv4NAGic1QzKvP3jeHL556C23CyBXez8RAT46L6kK tmaEkLpIbkaVghEzAucZj+RCVdOYXoIFxTs+tYosZzFvnulN6H2h7zQZvcR0OHJ5SHKv H5l/tRiUlVVwa56JzPQYucam2nMR/wrkD10Hf9hnEnQ+R57k0haV0W94wMtdUatwsLq6 vCuJI4m3ZOzeBAO/ze2jTHb77j3cHBGK9Fxamc4a+icjNf5QTFYUYbXduNHxJhrw+Fbm e3NrT76SVXDgTjTvFvCA2QmhNmXYN11vcDTPfYWU+F5F9zzoLHwQAkNb28CPiah/vJE7 EqEg== X-Gm-Message-State: APuU4Z8TwcxOPdxsJpotWw25gaVmsKQbeq5WMlLFVz+pUkctfxVQoi9W apID86cTME/6m70xfLnoIGbhc9rcbAp3d0NiHtQlq3ft6HYLGtlvKfh7YHIIFIrWg+AdhmWnuGk fgp48NyU= X-Gm-Gg: AZFdTZfxT7SC7hP23sXKRRZ/kf7dfUAih6qg6+YcK+2FTTuRphpQVxskst2C4EpREas TrSrJgKgrSu1QqQvseJNzcBGrJqFAsuDrMWm0l2NurUT+WCuM5ebNoBEEKCE+FEUO22X4HR/s5x Q9IscKBoV/acidpcnI4VQQ3x7d3UBvpiRsM7gnSHj5HEKaMWSF86guq56ucOfnoH/b0XenHNXgx lRjB87zl+zN97tBo/wRaWBJlhX81BlwartcjPreFJuvPZYrbZUQqr7RjP69fdV4tj+FbmwrgHDS bkl1r7IduzlYFqVjI//kvQsbpUTHXW73llpJb9YakFUI9wnbav5LztdgnyK6gB2Nujr11Zk8w6o o80JfEHHC7jH5HyijKMIFqt2ZJoaT7Gd868M05GV5spTBND3QtM/Ug/1SWMNzdTtHbcibYHlPnb TsGcBz1c1/k3kUEge8APLZ/ph3E54ROQpufRVxwrToXkuQ0c0qzL1w6MMv/IGJEM40s8/SOfeVV Gx+i5ujkGxdWtOUYB0Typ9pWSBKhbYstiajSnE6xiT0hhLgxNsYF1C6Yfa1EWqvCIRozUYPLd8m QOLt5NzRI/1MShE7/8kidmSZTcwtTGiNah+iYdKwuQgegujQjTLez7uc7IeJ1BwbqeCCcA== X-Received: by 2002:a05:6a00:1911:b0:881:158b:ea8c with SMTP id d2e1a72fcca58-8c87bfa7787mr35967165b3a.26.1796075529493; Mon, 30 Nov 2026 13:52:09 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8c872e45756sm18561940b3a.27.2026.11.30.13.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 13:52:09 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Date: Mon, 30 Nov 2026 13:49:11 -0800 Message-ID: <20261130215203.886245-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261130215203.886245-1-stephen@networkplumber.org> References: <20261129205006.1440292-1-stephen@networkplumber.org> <20261130215203.886245-1-stephen@networkplumber.org> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The eal_fs test needs /proc/self/fd to find the name of the temporary file it creates. FreeBSD does not have it, so the test returned early from inside test_parse_sysfs_value(), which clang reports as unreachable code for the rest of the function. Worse, returning zero reported the test as passing when it had not run at all. Build the skip stub on FreeBSD as well as Windows and return TEST_SKIPPED, which is what the rest of the file already does. This also removes the unreachable body rather than hiding it. Signed-off-by: Stephen Hemminger --- app/test/test_eal_fs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c index 62eea98677..4201b7fc3f 100644 --- a/app/test/test_eal_fs.c +++ b/app/test/test_eal_fs.c @@ -10,11 +10,12 @@ #include "eal_filesystem.h" -#ifdef RTE_EXEC_ENV_WINDOWS +/* Both need /proc/self/fd to find the name of a temporary file. */ +#if defined(RTE_EXEC_ENV_WINDOWS) || defined(RTE_EXEC_ENV_FREEBSD) static int test_eal_fs(void) { - printf("eal_fs not supported on Windows, skipping test\n"); + printf("eal_fs not supported on this platform, skipping test\n"); return TEST_SKIPPED; } @@ -31,11 +32,6 @@ test_parse_sysfs_value(void) unsigned valid_number; unsigned long retval = 0; -#ifdef RTE_EXEC_ENV_FREEBSD - /* BSD doesn't have /proc/pid/fd */ - return 0; -#endif - printf("Testing function eal_parse_sysfs_value()\n"); /* get a temporary filename to use for all tests - create temp file handle and then @@ -183,6 +179,6 @@ test_eal_fs(void) return 0; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ +#endif /* !RTE_EXEC_ENV_WINDOWS && !RTE_EXEC_ENV_FREEBSD */ REGISTER_FAST_TEST(eal_fs_autotest, NOHUGE_OK, ASAN_OK, test_eal_fs); -- 2.53.0