summaryrefslogtreecommitdiffhomepage
path: root/util/linuxfw/linuxfwtest
diff options
context:
space:
mode:
authorNick Khyl <nickk@tailscale.com>2024-12-05 13:16:48 -0600
committerNick Khyl <nickk@tailscale.com>2024-12-05 13:16:48 -0600
commit0267fe83b200f1702a2fa0a395442c02a053fadb (patch)
tree63654c55225eeb834de59a5a0bc8d19033c6145b /util/linuxfw/linuxfwtest
parent87546a5edf6b6503a87eeb2d666baba57398a066 (diff)
downloadtailscale-1.78.0.tar.xz
tailscale-1.78.0.zip
VERSION.txt: this is v1.78.0v1.78.0
Signed-off-by: Nick Khyl <nickk@tailscale.com>
Diffstat (limited to 'util/linuxfw/linuxfwtest')
-rw-r--r--util/linuxfw/linuxfwtest/linuxfwtest.go62
-rw-r--r--util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go36
2 files changed, 49 insertions, 49 deletions
diff --git a/util/linuxfw/linuxfwtest/linuxfwtest.go b/util/linuxfw/linuxfwtest/linuxfwtest.go
index ee2cbd1b2..04f179199 100644
--- a/util/linuxfw/linuxfwtest/linuxfwtest.go
+++ b/util/linuxfw/linuxfwtest/linuxfwtest.go
@@ -1,31 +1,31 @@
-// Copyright (c) Tailscale Inc & AUTHORS
-// SPDX-License-Identifier: BSD-3-Clause
-
-//go:build cgo && linux
-
-// Package linuxfwtest contains tests for the linuxfw package. Go does not
-// support cgo in tests, and we don't want the main package to have a cgo
-// dependency, so we put all the tests here and call them from the main package
-// in tests intead.
-package linuxfwtest
-
-import (
- "testing"
- "unsafe"
-)
-
-/*
-#include <sys/socket.h> // socket()
-*/
-import "C"
-
-type SizeInfo struct {
- SizeofSocklen uintptr
-}
-
-func TestSizes(t *testing.T, si *SizeInfo) {
- want := unsafe.Sizeof(C.socklen_t(0))
- if want != si.SizeofSocklen {
- t.Errorf("sockLen has wrong size; want=%d got=%d", want, si.SizeofSocklen)
- }
-}
+// Copyright (c) Tailscale Inc & AUTHORS
+// SPDX-License-Identifier: BSD-3-Clause
+
+//go:build cgo && linux
+
+// Package linuxfwtest contains tests for the linuxfw package. Go does not
+// support cgo in tests, and we don't want the main package to have a cgo
+// dependency, so we put all the tests here and call them from the main package
+// in tests intead.
+package linuxfwtest
+
+import (
+ "testing"
+ "unsafe"
+)
+
+/*
+#include <sys/socket.h> // socket()
+*/
+import "C"
+
+type SizeInfo struct {
+ SizeofSocklen uintptr
+}
+
+func TestSizes(t *testing.T, si *SizeInfo) {
+ want := unsafe.Sizeof(C.socklen_t(0))
+ if want != si.SizeofSocklen {
+ t.Errorf("sockLen has wrong size; want=%d got=%d", want, si.SizeofSocklen)
+ }
+}
diff --git a/util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go b/util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go
index 6e9569900..d5e297da7 100644
--- a/util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go
+++ b/util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go
@@ -1,18 +1,18 @@
-// Copyright (c) Tailscale Inc & AUTHORS
-// SPDX-License-Identifier: BSD-3-Clause
-
-//go:build !cgo || !linux
-
-package linuxfwtest
-
-import (
- "testing"
-)
-
-type SizeInfo struct {
- SizeofSocklen uintptr
-}
-
-func TestSizes(t *testing.T, si *SizeInfo) {
- t.Skip("not supported without cgo")
-}
+// Copyright (c) Tailscale Inc & AUTHORS
+// SPDX-License-Identifier: BSD-3-Clause
+
+//go:build !cgo || !linux
+
+package linuxfwtest
+
+import (
+ "testing"
+)
+
+type SizeInfo struct {
+ SizeofSocklen uintptr
+}
+
+func TestSizes(t *testing.T, si *SizeInfo) {
+ t.Skip("not supported without cgo")
+}