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: 4 34 11.8 %
Date: 2019-02-01 22:03:38 Branches: 2 32 6.3 %

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








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