File: 0001-Fix-skipBigEndian-test-helper.patch

package info (click to toggle)
golang-github-jsimonetti-rtnetlink 2.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,284 kB
  • sloc: makefile: 2
file content (37 lines) | stat: -rw-r--r-- 925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Tue, 26 Aug 2025 19:44:07 +0200
Subject: Fix skipBigEndian test helper

Origin: https://github.com/jsimonetti/rtnetlink/pull/273
---
 address_test.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/address_test.go b/address_test.go
index 7b1244a..d70a79c 100644
--- a/address_test.go
+++ b/address_test.go
@@ -1,13 +1,12 @@
 package rtnetlink
 
 import (
-	"encoding/binary"
 	"net"
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/jsimonetti/rtnetlink/v2/internal/unix"
-	"github.com/mdlayher/netlink/nlenc"
+	"golang.org/x/sys/cpu"
 )
 
 func TestAddressMessageMarshalBinary(t *testing.T) {
@@ -183,7 +182,7 @@ func TestAddressMessageUnmarshalBinary(t *testing.T) {
 }
 
 func skipBigEndian(t *testing.T) {
-	if nlenc.NativeEndian() == binary.BigEndian {
+	if cpu.IsBigEndian {
 		t.Skip("skipping test on big-endian system")
 	}
 }