net/bpf
Matt Layher 2796e09d6a bpf: check for little endian CPU for OS VM comparison
When I wrote these tests, I assumed the native endianness for the machine
was little endian. Explicitly check this so that the emulated BPF VM tests
can run on s390x, but we avoid test flakes related to endianness.

Updates golang/go#55235.

Change-Id: I9be430dfe7f97503af7a620ed80dcbacb66d73cc
Reviewed-on: https://go-review.googlesource.com/c/net/+/501155
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-06-06 21:42:20 +00:00
..
testdata bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
asm.go bpf: new package to assemble and disassemble Berkeley Packet Filter programs. 2016-03-28 06:22:12 +00:00
constants.go bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
doc.go all: gofmt 2022-04-12 02:06:05 +00:00
instructions.go bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
instructions_test.go bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
setter.go bpf: add Setter interface 2017-06-13 04:21:24 +00:00
vm.go bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
vm_aluop_test.go bpf: add Go implementation of virtual machine 2016-06-18 00:31:17 +00:00
vm_bpf_test.go bpf: check for little endian CPU for OS VM comparison 2023-06-06 21:42:20 +00:00
vm_extension_test.go bpf: implement LoadExtension and ExtLen for VM 2016-06-20 21:42:44 +00:00
vm_instructions.go all: remove redundant type conversion 2022-09-09 16:43:09 +00:00
vm_jump_test.go bpf: support JumpIf on RegX instead of K 2018-10-11 14:41:30 +00:00
vm_load_test.go bpf: fix VM out of bounds LoadMemShift check 2019-06-07 17:17:31 +00:00
vm_ret_test.go bpf: add Go implementation of virtual machine 2016-06-18 00:31:17 +00:00
vm_scratch_test.go bpf: add Go implementation of virtual machine 2016-06-18 00:31:17 +00:00
vm_test.go bpf: fix a typo 2016-06-19 23:45:41 +00:00