Meson is detecting the path /proc/sys/vm/nr_hugepages in the call to cat
in app/test/meson.build and then adding it as a build dependency.
This causes build loop if the timestamp of this file keeps changing.
It is fixed by hiding hugepage check in a shell script.
Fixes:
77784ef0fba8 ("test: allow no-huge mode for fast-tests")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
F: app/test/autotest*
F: app/test/commands.c
F: app/test/get-coremask.sh
+F: app/test/has-hugepage.sh
F: app/test/packet_burst_generator.c
F: app/test/packet_burst_generator.h
F: app/test/process.h
--- /dev/null
+#! /bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2020 Mellanox Technologies, Ltd
+
+if [ "$(uname)" = "Linux" ] ; then
+ cat /proc/sys/vm/nr_hugepages || echo 0
+elif [ "$(uname)" = "FreeBSD" ] ; then
+ echo 1 # assume FreeBSD always has hugepages
+else
+ echo 0
+fi
install_rpath: driver_install_path,
install: true)
-has_hugepage = true
-if is_linux
- check_hugepage = run_command('cat',
- '/proc/sys/vm/nr_hugepages')
- if (check_hugepage.returncode() != 0 or
- check_hugepage.stdout().strip() == '0')
- has_hugepage = false
- endif
-endif
+has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long