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: 2019-10-08 22:34:21 Branches: 8 32 25.0 %

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








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