From d694e9718e0d1098eef014ea5dc961144447e67d Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Tue, 24 Sep 2024 13:20:16 +0100 Subject: [PATCH] Test ppc64le. --- .github/workflows/test.yml | 3 +++ README.md | 2 +- internal/alloc/alloc_slice.go | 2 +- internal/util/mmap.go | 2 +- internal/util/mmap_other.go | 2 +- vfs/README.md | 2 +- vfs/os_f2fs_linux.go | 3 ++- vfs/os_std_atomic.go | 2 +- vfs/shm.go | 2 +- vfs/shm_bsd.go | 2 +- vfs/shm_other.go | 2 +- 11 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37c4da6f..1c718d73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -153,6 +153,9 @@ jobs: - name: Test riscv64 (interpreter) run: GOARCH=riscv64 go test -v -short ./... + - name: Test ppc64le (interpreter) + run: GOARCH=ppc64le go test -v -short ./... + - name: Test s390x (big-endian, z/OS demo) run: GOARCH=s390x go test -v -short -tags sqlite3_flock ./... diff --git a/README.md b/README.md index 7da1f439..2ba19ccd 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and [wazero's](https://tetrate.io/blog/introducing-wazero-from-tetrate/#:~:text=Rock%2Dsolid%20test%20approach) thorough testing. Every commit is [tested](https://github.com/ncruces/go-sqlite3/wiki/Test-matrix) on -Linux (amd64/arm64/386/riscv64/s390x), macOS (amd64/arm64), +Linux (amd64/arm64/386/riscv64/ppc64le/s390x), macOS (amd64/arm64), Windows (amd64), FreeBSD (amd64), OpenBSD (amd64), NetBSD (amd64), illumos (amd64), and Solaris (amd64). diff --git a/internal/alloc/alloc_slice.go b/internal/alloc/alloc_slice.go index 5072ca9c..5fc725c6 100644 --- a/internal/alloc/alloc_slice.go +++ b/internal/alloc/alloc_slice.go @@ -1,4 +1,4 @@ -//go:build !(darwin || linux) || !(amd64 || arm64 || riscv64) || sqlite3_noshm || sqlite3_nosys +//go:build !(darwin || linux) || !(amd64 || arm64 || riscv64 || ppc64le) || sqlite3_noshm || sqlite3_nosys package alloc diff --git a/internal/util/mmap.go b/internal/util/mmap.go index b091e38b..81377267 100644 --- a/internal/util/mmap.go +++ b/internal/util/mmap.go @@ -1,4 +1,4 @@ -//go:build unix && (amd64 || arm64 || riscv64) && !(sqlite3_noshm || sqlite3_nosys) +//go:build unix && (amd64 || arm64 || riscv64 || ppc64le) && !(sqlite3_noshm || sqlite3_nosys) package util diff --git a/internal/util/mmap_other.go b/internal/util/mmap_other.go index a0a3ba67..b6cd4c55 100644 --- a/internal/util/mmap_other.go +++ b/internal/util/mmap_other.go @@ -1,4 +1,4 @@ -//go:build !unix || !(amd64 || arm64 || riscv64) || sqlite3_noshm || sqlite3_nosys +//go:build !unix || !(amd64 || arm64 || riscv64 || ppc64le) || sqlite3_noshm || sqlite3_nosys package util diff --git a/vfs/README.md b/vfs/README.md index 741a1b6a..b1d9ea22 100644 --- a/vfs/README.md +++ b/vfs/README.md @@ -46,7 +46,7 @@ to check if your build supports file locking. ### Write-Ahead Logging -On 64-bit Unix, this module uses `mmap` to implement +On 64-bit little-endian Unix, this module uses `mmap` to implement [shared-memory for the WAL-index](https://sqlite.org/wal.html#implementation_of_shared_memory_for_the_wal_index), like SQLite. diff --git a/vfs/os_f2fs_linux.go b/vfs/os_f2fs_linux.go index 487f0c7d..6ecb60ed 100644 --- a/vfs/os_f2fs_linux.go +++ b/vfs/os_f2fs_linux.go @@ -1,4 +1,4 @@ -//go:build (amd64 || arm64 || riscv64) && !sqlite3_nosys +//go:build (amd64 || arm64 || riscv64 || ppc64le) && !sqlite3_nosys package vfs @@ -9,6 +9,7 @@ import ( ) const ( + // https://godbolt.org/z/1PcK5vea3 _F2FS_IOC_START_ATOMIC_WRITE = 62721 _F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 _F2FS_IOC_ABORT_ATOMIC_WRITE = 62725 diff --git a/vfs/os_std_atomic.go b/vfs/os_std_atomic.go index ecaff024..c3590a7d 100644 --- a/vfs/os_std_atomic.go +++ b/vfs/os_std_atomic.go @@ -1,4 +1,4 @@ -//go:build !linux || !(amd64 || arm64 || riscv64) || sqlite3_nosys +//go:build !linux || !(amd64 || arm64 || riscv64 || ppc64le) || sqlite3_nosys package vfs diff --git a/vfs/shm.go b/vfs/shm.go index 00448397..0fbd09d0 100644 --- a/vfs/shm.go +++ b/vfs/shm.go @@ -1,4 +1,4 @@ -//go:build (darwin || linux) && (amd64 || arm64 || riscv64) && !(sqlite3_flock || sqlite3_noshm || sqlite3_nosys) +//go:build (darwin || linux) && (amd64 || arm64 || riscv64 || ppc64le) && !(sqlite3_flock || sqlite3_noshm || sqlite3_nosys) package vfs diff --git a/vfs/shm_bsd.go b/vfs/shm_bsd.go index 08940115..52ffeacb 100644 --- a/vfs/shm_bsd.go +++ b/vfs/shm_bsd.go @@ -1,4 +1,4 @@ -//go:build (freebsd || openbsd || netbsd || dragonfly || illumos || sqlite3_flock) && (amd64 || arm64 || riscv64) && !(sqlite3_noshm || sqlite3_nosys) +//go:build (freebsd || openbsd || netbsd || dragonfly || illumos || sqlite3_flock) && (amd64 || arm64 || riscv64 || ppc64le) && !(sqlite3_noshm || sqlite3_nosys) package vfs diff --git a/vfs/shm_other.go b/vfs/shm_other.go index 7c899758..4d0f6a2c 100644 --- a/vfs/shm_other.go +++ b/vfs/shm_other.go @@ -1,4 +1,4 @@ -//go:build !(darwin || linux || freebsd || openbsd || netbsd || dragonfly || illumos || sqlite3_flock) || !(amd64 || arm64 || riscv64) || sqlite3_noshm || sqlite3_nosys +//go:build !(darwin || linux || freebsd || openbsd || netbsd || dragonfly || illumos || sqlite3_flock) || !(amd64 || arm64 || riscv64 || ppc64le) || sqlite3_noshm || sqlite3_nosys package vfs