75b07eca3e
by importing the upstream release as patches. replace user namespace patch with version which has been applied usptream.
122 lines
3.6 KiB
Diff
122 lines
3.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
|
Date: Fri, 15 Sep 2017 10:24:13 -0700
|
|
Subject: [PATCH] Add configure option to enable gcov analysis
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
* Add configure option to enable gcov analysis.
|
|
* Includes a few minor ctime fixes.
|
|
* Add codecov.yml configuration.
|
|
|
|
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
|
|
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
|
Closes #6642
|
|
(cherry picked from commit 184087f822ef178d6f5c155681ee7c3d90f23321)
|
|
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
|
---
|
|
configure.ac | 1 +
|
|
Makefile.am | 8 +++---
|
|
.github/codecov.yml | 9 +++++++
|
|
config/zfs-build.m4 | 31 ++++++++++++++++++++++
|
|
.../tests/functional/ctime/ctime_001_pos.ksh | 0
|
|
5 files changed, 45 insertions(+), 4 deletions(-)
|
|
create mode 100644 .github/codecov.yml
|
|
mode change 100644 => 100755 tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index e145aa370..ee754fd38 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -56,6 +56,7 @@ ZFS_AC_PACKAGE
|
|
ZFS_AC_CONFIG
|
|
ZFS_AC_DEBUG
|
|
ZFS_AC_DEBUGINFO
|
|
+ZFS_AC_GCOV
|
|
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 508d3f40e..732a373bd 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -29,10 +29,10 @@ distclean-local::
|
|
-o -name .pc -o -name .hg -o -name .git \) -prune -o \
|
|
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
|
|
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
|
|
- -o -name '.*.rej' -o -name '.script-config' -o -size 0 \
|
|
- -o -name '*%' -o -name '.*.cmd' -o -name 'core' \
|
|
- -o -name 'Makefile' -o -name 'Module.symvers' \
|
|
- -o -name '*.order' -o -name '*.markers' \) \
|
|
+ -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \
|
|
+ -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \
|
|
+ -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \
|
|
+ -o -name '*.gcno' \) \
|
|
-type f -print | xargs $(RM)
|
|
|
|
dist-hook:
|
|
diff --git a/.github/codecov.yml b/.github/codecov.yml
|
|
new file mode 100644
|
|
index 000000000..f36be39cb
|
|
--- /dev/null
|
|
+++ b/.github/codecov.yml
|
|
@@ -0,0 +1,9 @@
|
|
+codecov:
|
|
+ strict_yaml_branch: master # only use the latest copy on master branch
|
|
+
|
|
+comment: off
|
|
+
|
|
+coverage:
|
|
+ status:
|
|
+ project: off
|
|
+ patch: off
|
|
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
|
|
index a8609b829..b84658a64 100644
|
|
--- a/config/zfs-build.m4
|
|
+++ b/config/zfs-build.m4
|
|
@@ -75,6 +75,37 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [
|
|
AC_MSG_RESULT([$enable_debuginfo])
|
|
])
|
|
|
|
+AC_DEFUN([ZFS_AC_GCOV_KERNEL], [
|
|
+])
|
|
+
|
|
+AC_DEFUN([ZFS_AC_GCOV_USER], [
|
|
+ DEBUG_CFLAGS="$DEBUG_CFLAGS -fprofile-arcs -ftest-coverage"
|
|
+])
|
|
+
|
|
+AC_DEFUN([ZFS_AC_GCOV], [
|
|
+ AC_MSG_CHECKING([whether gcov profiling will be enabled])
|
|
+ AC_ARG_ENABLE([gcov],
|
|
+ [AS_HELP_STRING([--enable-gcov],
|
|
+ [Enable gcov profiling @<:@default=no@:>@])],
|
|
+ [],
|
|
+ [enable_gcov=no])
|
|
+
|
|
+ AS_CASE(["x$enable_gcov"],
|
|
+ ["xyes"],
|
|
+ [ZFS_AC_GCOV_KERNEL
|
|
+ ZFS_AC_GCOV_USER],
|
|
+ ["xkernel"],
|
|
+ [ZFS_AC_GCOV_KERNEL],
|
|
+ ["xuser"],
|
|
+ [ZFS_AC_GCOV_USER],
|
|
+ ["xno"],
|
|
+ [],
|
|
+ [AC_MSG_ERROR([Unknown option $enable_gcov])])
|
|
+
|
|
+ AC_SUBST(DEBUG_CFLAGS)
|
|
+ AC_MSG_RESULT([$enable_gcov])
|
|
+])
|
|
+
|
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|
ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE
|
|
ZFS_AC_CONFIG_ALWAYS_NO_BOOL_COMPARE
|
|
diff --git a/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh b/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh
|
|
old mode 100644
|
|
new mode 100755
|
|
--
|
|
2.14.2
|
|
|