Skip to content

Commit

Permalink
Fix build of Packetbeat test under windows/386 (#22351) (#23749)
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 6c69afc commit 918c894
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ stages:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-7"
#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"
windows-7-32:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-7-32-bit"
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 918c894

Please sign in to comment.