Skip to content
Open
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
cebe20a
Build: add SQLite wallet dependency
0xGoethe Jul 29, 2026
7971d79
Wallet: add database batch abstraction
0xGoethe Jul 30, 2026
3bae828
Wallet: add persistent database ownership
0xGoethe Jul 30, 2026
0f2e9ae
Wallet: abstract database ownership
0xGoethe Jul 30, 2026
e287abe
Wallet: centralize database creation
0xGoethe Jul 30, 2026
19cefe2
Wallet: add SQLite storage backend
0xGoethe Jul 30, 2026
63d8e53
Wallet: activate SQLite wallet backend
0xGoethe Jul 31, 2026
fcbd9b4
Wallet: add explicit SQLite migration
0xGoethe Jul 31, 2026
9d23235
Wallet: test database record parity
0xGoethe Jul 31, 2026
4cdcf05
Wallet: add SQLite wallet recovery
0xGoethe Aug 1, 2026
9e0dcb0
Wallet: integrate backup and offline restore
0xGoethe Aug 1, 2026
4d7c3ad
Wallet: close remaining record parity gaps
0xGoethe Aug 1, 2026
2d5f8ff
Wallet: report ambiguous recovery cleanup
0xGoethe Aug 1, 2026
0a478b1
Build: limit SQLite wallets to Linux
0xGoethe Aug 1, 2026
4dd8fd2
Tests: register isolated wallet contracts
0xGoethe Aug 1, 2026
0c22468
Tests: cover encrypted wallet lifecycles
0xGoethe Aug 1, 2026
3107964
Wallet: fail closed on directory sync
0xGoethe Aug 1, 2026
abeedfa
Wallet: preserve BDB wallet behavior
0xGoethe Aug 1, 2026
34c5ae8
Wallet: validate BIP47 migration records
0xGoethe Aug 1, 2026
fcba2b4
Wallet: restore legacy BDB database behavior
0xGoethe Aug 1, 2026
df96528
Tests: restore SQLite failure isolation
0xGoethe Aug 1, 2026
d35ea08
Wallet: validate Spark migration records
0xGoethe Aug 1, 2026
88639df
Wallet: reopen SQLite for backup and rewrite
0xGoethe Aug 1, 2026
dad4536
Wallet: enable SQLite wallets on macOS
0xGoethe Aug 2, 2026
e343e73
Wallet: enable SQLite wallets on Windows
0xGoethe Aug 2, 2026
ac7bbac
Tests: add native SQLite wallet coverage
0xGoethe Aug 2, 2026
c1f3f2e
Tests: run SQLite wallet platform evidence
0xGoethe Aug 2, 2026
460d258
Tests: correct SQLite platform evidence
0xGoethe Aug 2, 2026
f7b4981
Tests: expose native wallet failures
0xGoethe Aug 3, 2026
595200e
Wallet: handle inherit-only Windows ACLs
0xGoethe Aug 3, 2026
6363b37
CI: diagnose native wallet failures
0xGoethe Aug 3, 2026
fcf7d6a
CI: fix SQLite wallet builds and diagnostics
0xGoethe Aug 4, 2026
75e163d
Wallet: close SQLite review findings
0xGoethe Oct 11, 2026
cb8585e
Tests: run native SQLite wallet lifecycles
0xGoethe Oct 11, 2026
a24be23
Wallet: fix native SQLite wallet publication
0xGoethe Oct 11, 2026
819d70a
Wallet: copy Windows rename name within buffer
0xGoethe Oct 11, 2026
7966e58
Wallet: terminate Windows rename paths
0xGoethe Oct 11, 2026
5cb51d6
Wallet: isolate macOS SQLite ownership lock
0xGoethe Oct 11, 2026
588d05c
Tests: retain migration destination with delete sharing
0xGoethe Oct 11, 2026
aa87134
Tests: close BDB handles before fixture restart
0xGoethe Oct 11, 2026
05cdad1
Tests: flush frozen BDB fixture before reset
0xGoethe Oct 11, 2026
c443897
Wallet: detect SQLite from opened files
0xGoethe Oct 11, 2026
9217801
Tests: fix Windows migration fixture contracts
0xGoethe Oct 11, 2026
2a56639
Tests: match Windows quarantine contracts
0xGoethe Oct 12, 2026
201de5e
Tests: expose native Windows failure context
0xGoethe Oct 12, 2026
f614663
Tests: check Windows deletion after reset
0xGoethe Oct 12, 2026
0b2e91e
Tests: preserve native Windows parity output
0xGoethe Oct 12, 2026
1d986f0
Tests: normalize migration backup parent paths
0xGoethe Oct 12, 2026
66bd593
Wallet: fix SQLite lifecycle review findings
0xGoethe Oct 15, 2026
1900906
Wallet: preserve upstream behavior after rebase
0xGoethe Oct 19, 2026
867c1f2
CI: align SQLite gates with build matrix
0xGoethe Oct 20, 2026
77227f5
Wallet: retain BDB handles for live cursors
0xGoethe Oct 26, 2026
fddf897
Wallet: abort BDB rewrite if cursor creation fails
0xGoethe Oct 28, 2026
6d111b2
Qt: handle Spark address persistence failures
0xGoethe Oct 28, 2026
23a093e
Spark: derive spend keys from the owning wallet
0xGoethe Oct 28, 2026
db8a6bb
Wallet: preserve Unicode backup destinations
0xGoethe Oct 28, 2026
38c359a
Depends: disable wallets when BDB is omitted
0xGoethe Oct 28, 2026
21c8a90
Wallet: remove unused batch during wallet import
0xGoethe Oct 28, 2026
a05cbee
Docs: explain cached depends feature options
0xGoethe Oct 28, 2026
9e3c76e
Wallet: retain SQLite locks after database creation
0xGoethe Oct 28, 2026
f616a64
Wallet: keep SQLite connections open during idle flushing
0xGoethe Oct 28, 2026
6947af0
Wallet: request shutdown when a live SQLite wallet is quarantined
0xGoethe Oct 28, 2026
4adea65
Wallet: resolve parent directories before SQLite file validation
0xGoethe Oct 28, 2026
d3fc5ff
Wallet: explain unsupported SQLite publication filesystems
0xGoethe Oct 28, 2026
4e34817
Qt: do not offer to overwrite SQLite wallet backups
0xGoethe Oct 28, 2026
14b70e8
Wallet: preserve encryption lock order during exception cleanup
0xGoethe Oct 28, 2026
5561991
Wallet: coexist with other process-wide SQLite users
0xGoethe Oct 28, 2026
e99be5e
Wallet: reject SQLite builds that force temporary files to disk
0xGoethe Oct 28, 2026
b1c00bb
Wallet: synchronize shared SQLite error reporting
0xGoethe Oct 28, 2026
ad8064f
Wallet: compact SQLite after removing rewrite records
0xGoethe Oct 28, 2026
acc52fd
Wallet: protect SQLite snapshots from shared-directory journal injection
0xGoethe Oct 28, 2026
1f9fcaf
Wallet: skip startup zap operations when no wallet exists
0xGoethe Oct 28, 2026
50621c4
Wallet: explain recovery after incomplete SQLite wallet creation
0xGoethe Oct 28, 2026
e6611da
Wallet: warn that migration backups retain their original secrets
0xGoethe Oct 28, 2026
b57afc1
Tests: fix SQLite regression-test scope guards
0xGoethe Oct 28, 2026
816672f
Wallet: reserve SQLite auxiliary filenames
0xGoethe Oct 28, 2026
d4b8408
Wallet: reject Windows filename aliases
0xGoethe Oct 28, 2026
ace82aa
Wallet: avoid rescanning verified SQLite backups
0xGoethe Oct 28, 2026
b59b561
Wallet: quarantine SQLite after failed encryption
0xGoethe Oct 28, 2026
a445346
Docs: specify system SQLite build requirements
0xGoethe Oct 28, 2026
15523ca
Docs: explain SQLite wallet downgrade limits
0xGoethe Oct 28, 2026
914ef0a
Docs: describe SQLite filesystem requirements
0xGoethe Oct 28, 2026
964bf62
Wallet: persist SQLite encryption cleanup obligations
0xGoethe Oct 28, 2026
3a67126
Wallet: defer migration transaction consensus checks
0xGoethe Oct 28, 2026
6c4b1f9
Wallet: batch SQLite record maintenance transactions
0xGoethe Oct 28, 2026
c8c4fed
Tests: use public wallet keypool accessors
0xGoethe Oct 28, 2026
73fd9dd
Docs: explain migration backup key exposure
0xGoethe Oct 28, 2026
2756336
Docs: state SQLite salvage limits
0xGoethe Oct 28, 2026
eda7624
Tests: read Unicode backup paths on Windows
0xGoethe Oct 28, 2026
9ac20e4
Wallet: describe retained recovery copies accurately
0xGoethe Oct 28, 2026
26038a5
Docs: explain required encryption cleanup
0xGoethe Oct 28, 2026
c8b29f8
Wallet: correct the recovered-source warning
0xGoethe Oct 28, 2026
3a885c2
Docs: state SQLite batch nesting restrictions
0xGoethe Oct 28, 2026
a1ca453
Style: indent the SQLite encryption lock scope
0xGoethe Oct 28, 2026
dc49dc1
Wallet: report keypool refill persistence errors
0xGoethe Oct 28, 2026
17f8b40
Wallet: batch reordering through the startup path
0xGoethe Oct 28, 2026
1b0b762
Tests: avoid CRT function attribute warnings
0xGoethe Oct 28, 2026
468c46f
Tests: initialize wallet reorder and RPC fixtures correctly
0xGoethe Oct 28, 2026
23be176
Tests: accept repeated migration notices for the same backup
0xGoethe Oct 28, 2026
c68a6dd
Tests: initialize reorder fixture through the public batch API
0xGoethe Oct 28, 2026
1277cdc
Wallet: keep BDB as the default database format
0xGoethe Oct 28, 2026
0ed6b96
Wallet: allow ordinary SQLite use in group-writable directories
0xGoethe Oct 28, 2026
0091c44
Qt: honor backup overwrite policy on macOS
0xGoethe Oct 28, 2026
6671e11
Wallet: preserve legacy filenames in BDB-only builds
0xGoethe Oct 28, 2026
fdc9361
Tests: handle Unicode Windows paths in wallet database helpers
0xGoethe Oct 28, 2026
ad8548c
Tests: hold cs_wallet for keypool size checks
0xGoethe Oct 30, 2026
7242c21
Tests: expect journal removal after SQLite reopen
0xGoethe Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/clientversion.cpp export-subst
depends/patches/sqlite/autosetup-fixup.patch whitespace=-space-before-tab
300 changes: 297 additions & 3 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:

env PKG_CONFIG_PATH="$(realpath depends/$HOST_TRIPLET/lib/pkgconfig):$PKG_CONFIG_PATH" \
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(realpath depends/$HOST_TRIPLET/toolchain.cmake) \
-DBUILD_CLI=ON -DBUILD_TESTS=ON -DENABLE_CRASH_HOOKS=ON -DBUILD_GUI=ON \
-DBUILD_CLI=ON -DBUILD_TESTS=ON -DENABLE_CRASH_HOOKS=ON -DBUILD_GUI=ON -DENABLE_SQLITE_WALLET=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
$CMAKE_EXTRA_FLAGS \
-S$(realpath .) -B$(realpath build)
Expand All @@ -259,11 +259,55 @@ jobs:

env PKG_CONFIG_PATH="$(realpath depends/$HOST_TRIPLET/lib/pkgconfig):$PKG_CONFIG_PATH" \
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(realpath depends/$HOST_TRIPLET/toolchain.cmake) \
-DBUILD_CLI=ON -DBUILD_TESTS=OFF -DENABLE_CRASH_HOOKS=ON \
-DBUILD_CLI=ON -DBUILD_TESTS=ON -DENABLE_CRASH_HOOKS=ON -DENABLE_SQLITE_WALLET=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
$CMAKE_EXTRA_FLAGS \
-DBUILD_GUI=ON -S$(realpath .) -B$(realpath build)
cd build && ninja
- name: Build BDB-only Wallet Tests (Windows RelWithDebInfo)
if: matrix.is_windows && matrix.build_type == 'RelWithDebInfo'
run: |
set -exo pipefail
export HOST_TRIPLET=$(x86_64-w64-mingw32-gcc -dumpmachine)
BDB_JOBS=$(nproc)
if [ "$BDB_JOBS" -gt 20 ]; then
BDB_JOBS=20
fi

make -C depends -j$BDB_JOBS HOST=$HOST_TRIPLET NO_SQLITE=1
test ! -e "depends/$HOST_TRIPLET/include/sqlite3.h"
test ! -e "depends/$HOST_TRIPLET/lib/libsqlite3.a"

env PKG_CONFIG_PATH="$(realpath depends/$HOST_TRIPLET/lib/pkgconfig):$PKG_CONFIG_PATH" \
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(realpath depends/$HOST_TRIPLET/toolchain.cmake) \
-DBUILD_CLI=OFF -DBUILD_DAEMON=OFF -DBUILD_GUI=OFF -DBUILD_TESTS=ON \
-DENABLE_CRASH_HOOKS=ON -DENABLE_SQLITE_WALLET=OFF -DWITH_BDB=ON \
-DCLIENT_VERSION_IS_RELEASE=true -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-S$(realpath .) -B$(realpath build-windows-bdb-only)
cmake --build build-windows-bdb-only --target test_firo --parallel "$BDB_JOBS"

BDB_AUDIT_DIR=$(mktemp -d)
x86_64-w64-mingw32-ar -t build-windows-bdb-only/lib/libfiro_wallet.a \
> "$BDB_AUDIT_DIR/wallet-members"
x86_64-w64-mingw32-nm -C build-windows-bdb-only/lib/libfiro_wallet.a \
> "$BDB_AUDIT_DIR/wallet-symbols"
x86_64-w64-mingw32-objdump -p build-windows-bdb-only/bin/test_firo.exe \
> "$BDB_AUDIT_DIR/test-firo-pe"
if grep -Eiq 'sqlite\.cpp|win32_file_lifecycle' \
"$BDB_AUDIT_DIR/wallet-members"; then
echo "BDB-only Windows wallet archive contains a SQLite wallet object"
exit 1
fi
if grep -Eq 'sqlite3_|(^|[^[:alnum:]_])SQLite(Database|Batch)(::|\()|win32_wallet::' \
"$BDB_AUDIT_DIR/wallet-symbols"; then
echo "BDB-only Windows wallet archive contains a SQLite wallet symbol"
exit 1
fi
if grep -Eiq 'DLL Name:.*sqlite' \
"$BDB_AUDIT_DIR/test-firo-pe"; then
echo "BDB-only Windows test executable imports SQLite"
exit 1
fi
- name: Build Firo (Mac)
if: matrix.is_mac
run: |
Expand All @@ -279,11 +323,67 @@ jobs:

env PKG_CONFIG_PATH="$(pwd)/depends/$HOST_TRIPLET/lib/pkgconfig:$PKG_CONFIG_PATH" \
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(pwd)/depends/$HOST_TRIPLET/toolchain.cmake \
-DBUILD_CLI=ON -DBUILD_TESTS=OFF -DENABLE_CRASH_HOOKS=ON -DBUILD_GUI=ON \
-DBUILD_CLI=ON -DBUILD_TESTS=ON -DENABLE_CRASH_HOOKS=ON -DBUILD_GUI=ON -DENABLE_SQLITE_WALLET=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
$CMAKE_EXTRA_FLAGS \
-S$(pwd) -B$(pwd)/build
cd build && ninja
- name: Run Wallet Database Tests (Mac)
if: matrix.is_mac
run: |
set -exo pipefail
WALLET_TEST_PARENT=$(mktemp -d)
export TMPDIR="$(cd "$WALLET_TEST_PARENT" && pwd -P)"
build/bin/test_firo \
--run_test=wallet_database_factory_preopen_policy,wallet_database_tests,macos_wallet_permissions_tests \
--catch_system_error=no --log_level=message -- DEBUG_LOG_OUT
- name: Run BDB-only Wallet Database Tests (Mac RelWithDebInfo)
if: matrix.is_mac && matrix.build_type == 'RelWithDebInfo'
run: |
set -exo pipefail
BDB_JOBS=$NJOBS
if [ "$BDB_JOBS" -gt 20 ]; then
BDB_JOBS=20
fi
make -C depends -j$BDB_JOBS NO_SQLITE=1
export HOST_TRIPLET=$(depends/config.guess)
test ! -e "depends/$HOST_TRIPLET/include/sqlite3.h"
test ! -e "depends/$HOST_TRIPLET/lib/libsqlite3.a"

env PKG_CONFIG_PATH="$(pwd)/depends/$HOST_TRIPLET/lib/pkgconfig:$PKG_CONFIG_PATH" \
cmake -G Ninja \
-DCMAKE_TOOLCHAIN_FILE="$(pwd)/depends/$HOST_TRIPLET/toolchain.cmake" \
-DBUILD_CLI=OFF -DBUILD_DAEMON=OFF -DBUILD_GUI=OFF \
-DBUILD_TESTS=ON -DENABLE_SQLITE_WALLET=OFF -DWITH_BDB=ON \
-DCLIENT_VERSION_IS_RELEASE=true -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-S"$(pwd)" -B"$(pwd)/build-mac-bdb-only"
cmake --build build-mac-bdb-only --target test_firo --parallel "$BDB_JOBS"

BDB_AUDIT_DIR=$(mktemp -d)
ar -t build-mac-bdb-only/lib/libfiro_wallet.a \
> "$BDB_AUDIT_DIR/wallet-members"
nm -C build-mac-bdb-only/lib/libfiro_wallet.a \
> "$BDB_AUDIT_DIR/wallet-symbols"
otool -L build-mac-bdb-only/bin/test_firo \
> "$BDB_AUDIT_DIR/test-firo-libraries"
if grep -Eiq 'sqlite\.cpp|win32_file_lifecycle' \
"$BDB_AUDIT_DIR/wallet-members"; then
echo "BDB-only macOS wallet archive contains a SQLite wallet object"
exit 1
fi
if grep -Eq 'sqlite3_|(^|[^[:alnum:]_])SQLite(Database|Batch)(::|\()|win32_wallet::' \
"$BDB_AUDIT_DIR/wallet-symbols"; then
echo "BDB-only macOS wallet archive contains a SQLite wallet symbol"
exit 1
fi
if grep -qi sqlite "$BDB_AUDIT_DIR/test-firo-libraries"; then
echo "BDB-only macOS test executable links SQLite"
exit 1
fi

build-mac-bdb-only/bin/test_firo \
--run_test=wallet_database_factory_preopen_policy,wallet_database_tests \
--catch_system_error=no --log_level=test_suite -- DEBUG_LOG_OUT
- name: Run Unit Tests
if: matrix.is_linux
run: |
Expand All @@ -297,6 +397,16 @@ jobs:
set -exo pipefail
cp -rf build/bin/* build/src/
qa/pull-tester/rpc-tests.py -extended
- name: Upload Windows SQLite Wallet Test Runtime
if: matrix.is_windows && matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v6
with:
name: windows-sqlite-wallet-test-runtime-${{ env.COMMIT_HASH }}
path: |
build/bin/test_firo.exe
build-windows-bdb-only/bin/test_firo.exe
if-no-files-found: error
retention-days: 1
- name: Prepare Files for Artifact
run: |
set -exo pipefail
Expand Down Expand Up @@ -330,6 +440,190 @@ jobs:
name: test-${{ matrix.platform }}-cmake-${{ matrix.build_type }}-logs-${{ env.COMMIT_HASH }}
path: ${{ env.TEST_LOG_ARTIFACT_DIR }}

windows-native-sqlite-wallet-tests:
name: windows-native-sqlite-wallet-tests-RelWithDebInfo
needs: [get-commit-hash, cmake-build]
if: ${{ !cancelled() && needs.get-commit-hash.result == 'success' }}
runs-on: windows-latest
steps:
- name: Download Windows SQLite Wallet Test Runtime
uses: actions/download-artifact@v7
with:
name: windows-sqlite-wallet-test-runtime-${{ needs.get-commit-hash.outputs.short_sha }}
path: wallet-tests
- name: Run SQLite Wallet Tests on Native NTFS
shell: pwsh
working-directory: wallet-tests
run: |
$ErrorActionPreference = 'Stop'
$testTemp = Join-Path $env:LOCALAPPDATA "FiroSQLiteWalletTests-$PID"
New-Item -ItemType Directory -Path $testTemp | Out-Null
$currentSid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User
$identityBefore = [System.Security.Principal.WindowsIdentity]::GetCurrent()
try {
$tokenOwnerBefore = $identityBefore.Owner
} finally {
$identityBefore.Dispose()
}
$tokenOwnerBeforeCategory = if (
$null -ne $tokenOwnerBefore -and
$tokenOwnerBefore.Equals($currentSid)
) {
'current-user'
} else {
'non-current-user'
}

Add-Type -TypeDefinition @'
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security.Principal;
using Microsoft.Win32.SafeHandles;

public static class FiroTestTokenOwner
{
private const uint TOKEN_ADJUST_DEFAULT = 0x0080;
private const int TOKEN_OWNER_CLASS = 4;

[StructLayout(LayoutKind.Sequential)]
private struct TokenOwner
{
public IntPtr Owner;
}

[DllImport("kernel32.dll")]
private static extern IntPtr GetCurrentProcess();

[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool OpenProcessToken(
IntPtr process,
uint desiredAccess,
out SafeAccessTokenHandle token);

[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool SetTokenInformation(
SafeAccessTokenHandle token,
int informationClass,
ref TokenOwner information,
int informationLength);

public static void SetCurrentUserAsDefaultOwner()
{
SafeAccessTokenHandle token;
if (!OpenProcessToken(
GetCurrentProcess(),
TOKEN_ADJUST_DEFAULT,
out token)) {
throw new Win32Exception(
Marshal.GetLastWin32Error(),
"OpenProcessToken(TOKEN_ADJUST_DEFAULT) failed");
}

using (token)
using (WindowsIdentity identity = WindowsIdentity.GetCurrent()) {
SecurityIdentifier user = identity.User;
if (user == null) {
throw new InvalidOperationException(
"The current process token has no user SID.");
}
byte[] userBytes = new byte[user.BinaryLength];
user.GetBinaryForm(userBytes, 0);
GCHandle pinnedUser = GCHandle.Alloc(
userBytes,
GCHandleType.Pinned);
try {
TokenOwner owner = new TokenOwner {
Owner = pinnedUser.AddrOfPinnedObject()
};
if (!SetTokenInformation(
token,
TOKEN_OWNER_CLASS,
ref owner,
Marshal.SizeOf(typeof(TokenOwner)))) {
throw new Win32Exception(
Marshal.GetLastWin32Error(),
"SetTokenInformation(TokenOwner) failed");
}
} finally {
pinnedUser.Free();
}
}
}
}
'@
[FiroTestTokenOwner]::SetCurrentUserAsDefaultOwner()
$identityAfter = [System.Security.Principal.WindowsIdentity]::GetCurrent()
try {
$tokenOwnerAfter = $identityAfter.Owner
} finally {
$identityAfter.Dispose()
}
if (
$null -eq $tokenOwnerAfter -or
!$tokenOwnerAfter.Equals($currentSid)
) {
throw 'Failed to normalize the test process token owner'
}

$inheritance = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [System.Security.AccessControl.InheritanceFlags]::ObjectInherit
$accessRule = [System.Security.AccessControl.FileSystemAccessRule]::new(
$currentSid,
[System.Security.AccessControl.FileSystemRights]::FullControl,
$inheritance,
[System.Security.AccessControl.PropagationFlags]::None,
[System.Security.AccessControl.AccessControlType]::Allow
)
$privateAcl = [System.Security.AccessControl.DirectorySecurity]::new()
$privateAcl.SetAccessRuleProtection($true, $false)
$privateAcl.SetOwner($currentSid)
$privateAcl.AddAccessRule($accessRule)
Set-Acl -LiteralPath $testTemp -AclObject $privateAcl

$ownerProbe = Join-Path $testTemp 'child-token-owner-probe'
try {
& "$env:SystemRoot\System32\cmd.exe" /d /c "mkdir `"$ownerProbe`""
if ($LASTEXITCODE -ne 0) {
throw "Child token-owner probe failed with exit code $LASTEXITCODE"
}
$probeOwner = (Get-Acl -LiteralPath $ownerProbe).GetOwner(
[System.Security.Principal.SecurityIdentifier]
)
if (!$probeOwner.Equals($currentSid)) {
throw 'The normalized token owner was not inherited by a child process'
}
} finally {
if ([System.IO.Directory]::Exists($ownerProbe)) {
[System.IO.Directory]::Delete($ownerProbe, $false)
}
}
Write-Output (
'::notice title=Windows test token-owner normalization::before={0}; after=current-user; child-probe=current-user' -f
$tokenOwnerBeforeCategory
)

$env:TEMP = $testTemp
$env:TMP = $env:TEMP
$env:FIRO_TEST_REQUIRE_WIN32_REPARSE = '1'
$drive = (Get-Item $env:TEMP).PSDrive.Name
if ((Get-Volume -DriveLetter $drive).FileSystem -ne 'NTFS') {
throw "SQLite Windows tests require NTFS"
}

function Invoke-FiroTest(
[string]$Executable,
[string]$Filter
) {
& $Executable "--run_test=$Filter" "--catch_system_error=no" "--log_level=test_suite" "--" "DEBUG_LOG_OUT"
if ($LASTEXITCODE -ne 0) {
throw "$Executable failed for $Filter with exit code $LASTEXITCODE"
}
}

Invoke-FiroTest '.\build\bin\test_firo.exe' 'wallet_database_tests/sqlite_win32_*'
Invoke-FiroTest '.\build\bin\test_firo.exe' 'wallet_database_factory_preopen_policy,wallet_database_tests'
Invoke-FiroTest '.\build-windows-bdb-only\bin\test_firo.exe' 'wallet_database_factory_preopen_policy,wallet_database_tests'

guix-build:
needs: get-commit-hash
name: guix-${{ matrix.host }}
Expand Down
Loading
Loading