Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0] Add additional tests for mapped_private #1887

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
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
12 changes: 10 additions & 2 deletions tests/db_modes_test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# This test is intended to verify that switching between DB modes "just works". Addtionally
# it tries to make sure the dirty bit behaves as expected even in heap mode.
# This test is intended to verify that switching between DB modes "just works". Additionally
# it tries to make sure the dirty bit behaves as expected even in heap and mapped_private mode.

set -euo pipefail

Expand Down Expand Up @@ -79,6 +79,10 @@ run_expect_failure() {
run_expect_success --delete-all-blocks
#use previous DB with heap mode
run_expect_success --database-map-mode heap
#use previous DB with mapped_private mode
run_expect_success --database-map-mode mapped_private
#use previous DB with heap mode
run_expect_success --database-map-mode heap
#test lock mode if enabled
if (( $TEST_LOCKED_MODE == 1 )); then
run_expect_success --database-map-mode locked
Expand All @@ -94,11 +98,15 @@ run_and_kill
run_expect_failure
#should also still be dirty in heap mode
run_expect_failure --database-map-mode heap
#should also still be dirty in mapped_private mode
run_expect_failure --database-map-mode mapped_private

#start over again! but this time start with heap mode
run_expect_success --delete-all-blocks --database-map-mode heap
#Then switch back to mapped
run_expect_success
#Then switch back to mapped_private
run_expect_success --database-map-mode mapped_private
#try killing it while in heap mode
run_and_kill --database-map-mode heap
#should be dirty if we run in either mode node
Expand Down