Sfoglia il codice sorgente

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 <liuxiaodong@loongson.cn>

liuxiaodong 5 anni fa
parent
commit
25d6047ec0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/signal/signal_linux_mipsx.go

+ 1 - 1
pkg/signal/signal_linux_mipsx.go

@@ -35,7 +35,7 @@ var SignalMap = map[string]syscall.Signal{
 	"PWR":      unix.SIGPWR,
 	"PWR":      unix.SIGPWR,
 	"QUIT":     unix.SIGQUIT,
 	"QUIT":     unix.SIGQUIT,
 	"SEGV":     unix.SIGSEGV,
 	"SEGV":     unix.SIGSEGV,
-	"SIGEMT":   unix.SIGEMT,
+	"EMT":      unix.SIGEMT,
 	"STOP":     unix.SIGSTOP,
 	"STOP":     unix.SIGSTOP,
 	"SYS":      unix.SIGSYS,
 	"SYS":      unix.SIGSYS,
 	"TERM":     unix.SIGTERM,
 	"TERM":     unix.SIGTERM,