Skip to content

Commit

Permalink
Fix build of Packetbeat test under windows/386 (#22351) (#23750)
Browse files Browse the repository at this point in the history
Constant overflowed 32-bit int.

Closes #22303

(cherry picked from commit 7bdfc15)
  • Loading branch information
adriansr authored Jan 29, 2021
1 parent f965731 commit 899a73c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packetbeat/procs/procs_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestParseTableRaw(t *testing.T) {
IPv4 := extractTCPRowOwnerPID
IPv6 := extractTCP6RowOwnerPID

pid := uint32(0xCCCCCCCC)
for idx, testCase := range []struct {
name string
factory extractorFactory
Expand All @@ -52,7 +53,7 @@ func TestParseTableRaw(t *testing.T) {
"01000000" +
"77777777AAAAAAAA12340000BBBBBBBBFFFF0000CCCCCCCC",
[]portProcMapping{
{endpoint: endpoint{address: "170.170.170.170", port: 0x1234}, pid: 0xCCCCCCCC},
{endpoint: endpoint{address: "170.170.170.170", port: 0x1234}, pid: int(pid)},
}, false},
{"Two entries (IPv6)", IPv6,
"02000000" +
Expand Down

0 comments on commit 899a73c

Please sign in to comment.