1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Brian Behlendorf <behlendorf1@llnl.gov>
3 Date: Fri, 15 Sep 2017 10:24:13 -0700
4 Subject: [PATCH] Add configure option to enable gcov analysis
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 * Add configure option to enable gcov analysis.
10 * Includes a few minor ctime fixes.
11 * Add codecov.yml configuration.
13 Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
14 Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
16 (cherry picked from commit 184087f822ef178d6f5c155681ee7c3d90f23321)
17 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 Makefile.am | 8 +++---
21 .github/codecov.yml | 9 +++++++
22 config/zfs-build.m4 | 31 ++++++++++++++++++++++
23 .../tests/functional/ctime/ctime_001_pos.ksh | 0
24 5 files changed, 45 insertions(+), 4 deletions(-)
25 create mode 100644 .github/codecov.yml
26 mode change 100644 => 100755 tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh
28 diff --git a/configure.ac b/configure.ac
29 index e145aa370..ee754fd38 100644
32 @@ -56,6 +56,7 @@ ZFS_AC_PACKAGE
40 diff --git a/Makefile.am b/Makefile.am
41 index 508d3f40e..732a373bd 100644
44 @@ -29,10 +29,10 @@ distclean-local::
45 -o -name .pc -o -name .hg -o -name .git \) -prune -o \
46 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
47 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
48 - -o -name '.*.rej' -o -name '.script-config' -o -size 0 \
49 - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \
50 - -o -name 'Makefile' -o -name 'Module.symvers' \
51 - -o -name '*.order' -o -name '*.markers' \) \
52 + -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \
53 + -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \
54 + -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \
55 + -o -name '*.gcno' \) \
56 -type f -print | xargs $(RM)
59 diff --git a/.github/codecov.yml b/.github/codecov.yml
61 index 000000000..f36be39cb
63 +++ b/.github/codecov.yml
66 + strict_yaml_branch: master # only use the latest copy on master branch
74 diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
75 index a8609b829..b84658a64 100644
76 --- a/config/zfs-build.m4
77 +++ b/config/zfs-build.m4
78 @@ -75,6 +75,37 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [
79 AC_MSG_RESULT([$enable_debuginfo])
82 +AC_DEFUN([ZFS_AC_GCOV_KERNEL], [
85 +AC_DEFUN([ZFS_AC_GCOV_USER], [
86 + DEBUG_CFLAGS="$DEBUG_CFLAGS -fprofile-arcs -ftest-coverage"
89 +AC_DEFUN([ZFS_AC_GCOV], [
90 + AC_MSG_CHECKING([whether gcov profiling will be enabled])
91 + AC_ARG_ENABLE([gcov],
92 + [AS_HELP_STRING([--enable-gcov],
93 + [Enable gcov profiling @<:@default=no@:>@])],
97 + AS_CASE(["x$enable_gcov"],
102 + [ZFS_AC_GCOV_KERNEL],
104 + [ZFS_AC_GCOV_USER],
107 + [AC_MSG_ERROR([Unknown option $enable_gcov])])
109 + AC_SUBST(DEBUG_CFLAGS)
110 + AC_MSG_RESULT([$enable_gcov])
113 AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
114 ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE
115 ZFS_AC_CONFIG_ALWAYS_NO_BOOL_COMPARE
116 diff --git a/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh b/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh