GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/api/utils.cc Lines: 10 34 29.4 %
Date: 2020-07-19 22:14:24 Branches: 8 32 25.0 %

Line Branch Exec Source
1
#include "node.h"
2
3
#include <csignal>
4
5
namespace node {
6
7
2118
const char* signo_string(int signo) {
8
#define SIGNO_CASE(e)                                                          \
9
  case e:                                                                      \
10
    return #e;
11








2118
  switch (signo) {
12
#ifdef SIGHUP
13
    SIGNO_CASE(SIGHUP);
14
#endif
15
16
#ifdef SIGINT
17
12
    SIGNO_CASE(SIGINT);
18
#endif
19
20
#ifdef SIGQUIT
21
    SIGNO_CASE(SIGQUIT);
22
#endif
23
24
#ifdef SIGILL
25
3
    SIGNO_CASE(SIGILL);
26
#endif
27
28
#ifdef SIGTRAP
29
    SIGNO_CASE(SIGTRAP);
30
#endif
31
32
#ifdef SIGABRT
33
14
    SIGNO_CASE(SIGABRT);
34
#endif
35
36
#ifdef SIGIOT
37
#if SIGABRT != SIGIOT
38
    SIGNO_CASE(SIGIOT);
39
#endif
40
#endif
41
42
#ifdef SIGBUS
43
    SIGNO_CASE(SIGBUS);
44
#endif
45
46
#ifdef SIGFPE
47
    SIGNO_CASE(SIGFPE);
48
#endif
49
50
#ifdef SIGKILL
51
7
    SIGNO_CASE(SIGKILL);
52
#endif
53
54
#ifdef SIGUSR1
55
    SIGNO_CASE(SIGUSR1);
56
#endif
57
58
#ifdef SIGSEGV
59
1
    SIGNO_CASE(SIGSEGV);
60
#endif
61
62
#ifdef SIGUSR2
63
1
    SIGNO_CASE(SIGUSR2);
64
#endif
65
66
#ifdef SIGPIPE
67
    SIGNO_CASE(SIGPIPE);
68
#endif
69
70
#ifdef SIGALRM
71
    SIGNO_CASE(SIGALRM);
72
#endif
73
74
170
    SIGNO_CASE(SIGTERM);
75
76
#ifdef SIGCHLD
77
    SIGNO_CASE(SIGCHLD);
78
#endif
79
80
#ifdef SIGSTKFLT
81
    SIGNO_CASE(SIGSTKFLT);
82
#endif
83
84
#ifdef SIGCONT
85
    SIGNO_CASE(SIGCONT);
86
#endif
87
88
#ifdef SIGSTOP
89
    SIGNO_CASE(SIGSTOP);
90
#endif
91
92
#ifdef SIGTSTP
93
    SIGNO_CASE(SIGTSTP);
94
#endif
95
96
#ifdef SIGBREAK
97
    SIGNO_CASE(SIGBREAK);
98
#endif
99
100
#ifdef SIGTTIN
101
    SIGNO_CASE(SIGTTIN);
102
#endif
103
104
#ifdef SIGTTOU
105
    SIGNO_CASE(SIGTTOU);
106
#endif
107
108
#ifdef SIGURG
109
    SIGNO_CASE(SIGURG);
110
#endif
111
112
#ifdef SIGXCPU
113
    SIGNO_CASE(SIGXCPU);
114
#endif
115
116
#ifdef SIGXFSZ
117
    SIGNO_CASE(SIGXFSZ);
118
#endif
119
120
#ifdef SIGVTALRM
121
    SIGNO_CASE(SIGVTALRM);
122
#endif
123
124
#ifdef SIGPROF
125
    SIGNO_CASE(SIGPROF);
126
#endif
127
128
#ifdef SIGWINCH
129
    SIGNO_CASE(SIGWINCH);
130
#endif
131
132
#ifdef SIGIO
133
    SIGNO_CASE(SIGIO);
134
#endif
135
136
#ifdef SIGPOLL
137
#if SIGPOLL != SIGIO
138
    SIGNO_CASE(SIGPOLL);
139
#endif
140
#endif
141
142
#ifdef SIGLOST
143
#if SIGLOST != SIGABRT
144
    SIGNO_CASE(SIGLOST);
145
#endif
146
#endif
147
148
#ifdef SIGPWR
149
#if SIGPWR != SIGLOST
150
    SIGNO_CASE(SIGPWR);
151
#endif
152
#endif
153
154
#ifdef SIGINFO
155
#if !defined(SIGPWR) || SIGINFO != SIGPWR
156
    SIGNO_CASE(SIGINFO);
157
#endif
158
#endif
159
160
#ifdef SIGSYS
161
    SIGNO_CASE(SIGSYS);
162
#endif
163
164
    default:
165
1910
      return "";
166
  }
167
}
168
169
}  // namespace node