Skip to content

Commit

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

Closes elastic#22303
  • Loading branch information
adriansr committed Nov 2, 2020
1 parent 61f7acd commit 7bdfc15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ stages:
- "windows-7"
branches: true ## for all the branches
tags: true ## for all the tags
#windows-7-32: See https://github.com/elastic/beats/issues/22303
# mage: "mage build unitTest"
# platforms: ## override default labels in this specific stage.
# - "windows-7-32-bit"
# when: ## Override the top-level when.
# comments:
# - "/test packetbeat for windows-7-32"
# labels:
# - "windows-7-32"
# branches: true ## for all the branches
# tags: true ## for all the tags
windows-7-32:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-7-32-bit"
when: ## Override the top-level when.
comments:
- "/test packetbeat for windows-7-32"
labels:
- "windows-7-32"
branches: true ## for all the branches
tags: true ## for all the tags
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 7bdfc15

Please sign in to comment.