From 25d6047ec094170761a11e582b8cb45f16cf675e Mon Sep 17 00:00:00 2001 From: liuxiaodong Date: Thu, 12 Mar 2020 20:45:02 +0800 Subject: [PATCH] unit test on TestParseSignal failed within pkg/signal package on mips64el error log : signal_test.go:20: assertion failed: error is not nil: Invalid signal: SIGEMT signal_test.go:22: assertion failed: When "ParseSignal" function parse sigStr from SignalMap, it find the signal object with key ("SIG"+sigStr). But EMT signal named "SIGEMT" in SignalMap structrue, so the real key is "SIGSIGEMT" , and cannot find the target signal. modify "SIGEMT" to "EMT" in SignalMap structrue. Signed-off-by: liuxiaodong --- pkg/signal/signal_linux_mipsx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signal/signal_linux_mipsx.go b/pkg/signal/signal_linux_mipsx.go index 4c79891216..c78c887af5 100644 --- a/pkg/signal/signal_linux_mipsx.go +++ b/pkg/signal/signal_linux_mipsx.go @@ -35,7 +35,7 @@ var SignalMap = map[string]syscall.Signal{ "PWR": unix.SIGPWR, "QUIT": unix.SIGQUIT, "SEGV": unix.SIGSEGV, - "SIGEMT": unix.SIGEMT, + "EMT": unix.SIGEMT, "STOP": unix.SIGSTOP, "SYS": unix.SIGSYS, "TERM": unix.SIGTERM,