summaryrefslogtreecommitdiff
path: root/tests/test-core.js
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2021-04-28 21:13:15 -0600
committerDan Nicholson <dbn@endlessos.org>2021-06-05 09:07:39 -0600
commitc3ada6fa7a1db488fced6acde5faaaf435e09aba (patch)
tree118332e42d3c47d1963ab9b26ff4f93d3242903f /tests/test-core.js
parent0f36d8c2219decbb5794ff19b5259d15d3d8d791 (diff)
downloadostree-c3ada6fa7a1db488fced6acde5faaaf435e09aba.tar.gz
repo: Require lock type in ostree_repo_lock_pop
This simplifies the lock state management considerably since the previously pushed type doesn't need to be tracked. Instead, 2 counters are kept to track how many times each lock type has been pushed. When the number of exclusive locks drops to 0, the lock transitions back to shared.
Diffstat (limited to 'tests/test-core.js')
-rwxr-xr-xtests/test-core.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-core.js b/tests/test-core.js
index 7d871c1f..b804e007 100755
--- a/tests/test-core.js
+++ b/tests/test-core.js
@@ -137,9 +137,9 @@ assertEquals(actual_checksum, networks_checksum)
// Basic locking API sanity test
repo.lock_push(OSTree.RepoLockType.SHARED, null);
repo.lock_push(OSTree.RepoLockType.SHARED, null);
-repo.lock_pop(null);
-repo.lock_pop(null);
+repo.lock_pop(OSTree.RepoLockType.SHARED, null);
+repo.lock_pop(OSTree.RepoLockType.SHARED, null);
repo.lock_push(OSTree.RepoLockType.EXCLUSIVE, null);
-repo.lock_pop(null);
+repo.lock_pop(OSTree.RepoLockType.EXCLUSIVE, null);
print("ok test-core");