F2FS atomic writes. (#66)

https://sqlite.org/cgi/src/technote/714f6cbbf7
This commit is contained in:
Nuno Cruces
2024-03-21 13:59:47 +00:00
committed by GitHub
parent 36583542e1
commit 617982f947
8 changed files with 75 additions and 6 deletions

BIN
tests/testdata/f2fs.img.gz vendored Normal file

Binary file not shown.

21
tests/testdata/f2fs.sh vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
cd -P -- "$(dirname -- "$0")"
ROOT=../../
if mountpoint -q f2fs/; then
sudo umount f2fs/
fi
mkdir -p f2fs/
gunzip -c f2fs.img.gz > f2fs.img
sudo mount -nv -o loop f2fs.img f2fs/
mkdir -p f2fs/tmp/
go test -c "$ROOT/tests" -coverpkg github.com/ncruces/go-sqlite3/...
TMPDIR=f2fs/tmp/ ./tests.test -test.v -test.short -test.coverprofile cover.out
go tool cover -html cover.out
sudo umount f2fs/
rm -r f2fs/ f2fs.img cover.out *.test