summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/core/txns/kill_op_on_txn_expiry.js1
-rw-r--r--jstests/core/txns/prepare_conflict.js1
-rw-r--r--jstests/core/txns/speculative_snapshot_includes_all_writes.js2
-rw-r--r--jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js1
-rw-r--r--jstests/libs/write_concern_util.js2
-rw-r--r--jstests/noPassthrough/aggregation_log_namespace.js1
-rw-r--r--jstests/noPassthrough/characterize_index_builds_on_restart.js1
-rw-r--r--jstests/noPassthrough/commit_quorum.js1
-rw-r--r--jstests/noPassthrough/create_indexes_in_txn_errors_if_already_in_progress.js1
-rw-r--r--jstests/noPassthrough/dropdatabase_respect_maxtimems.js2
-rw-r--r--jstests/noPassthrough/flow_control_logging.js2
-rw-r--r--jstests/noPassthrough/hybrid_index_build_on_state_transition.js1
-rw-r--r--jstests/noPassthrough/hybrid_index_with_updates.js2
-rw-r--r--jstests/noPassthrough/hybrid_unique_index_with_updates.js2
-rw-r--r--jstests/noPassthrough/index_secondary_commit_after_scan_error.js1
-rw-r--r--jstests/noPassthrough/index_secondary_wait_for_abort.js1
-rw-r--r--jstests/noPassthrough/index_stepdown_after_init.js1
-rw-r--r--jstests/noPassthrough/index_stepdown_duplicate.js1
-rw-r--r--jstests/noPassthrough/index_stepdown_failover.js1
-rw-r--r--jstests/noPassthrough/index_stepdown_unique.js1
-rw-r--r--jstests/noPassthrough/indexbg2.js2
-rw-r--r--jstests/noPassthrough/indexbg_killop_primary_after_init.js1
-rw-r--r--jstests/noPassthrough/indexbg_shutdown.js1
-rw-r--r--jstests/noPassthrough/initial_sync_wt_cache_full.js1
-rw-r--r--jstests/noPassthrough/latency_includes_lock_acquisition_time.js1
-rw-r--r--jstests/noPassthrough/log_find_getmore.js1
-rw-r--r--jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js1
-rw-r--r--jstests/noPassthrough/profile_interrupted_op.js2
-rw-r--r--jstests/noPassthrough/recovery_wt_cache_full.js1
-rw-r--r--jstests/noPassthrough/step_down_during_drop_database.js2
-rw-r--r--jstests/noPassthrough/transaction_write_with_snapshot_unavailable.js1
-rw-r--r--jstests/noPassthroughWithMongod/background_validation_with_ddl_ops.js1
-rw-r--r--jstests/noPassthroughWithMongod/create_indexes_waits_for_already_in_progress.js1
-rw-r--r--jstests/noPassthroughWithMongod/restart_catalog_interrupts_background_validation.js1
-rw-r--r--jstests/replsets/abort_in_progress_transactions_on_step_up.js1
-rw-r--r--jstests/replsets/avg_num_catchup_ops.js1
-rw-r--r--jstests/replsets/awaitdata_getmore_new_last_committed_optime.js1
-rw-r--r--jstests/replsets/catchup.js1
-rw-r--r--jstests/replsets/change_stream_speculative_majority_secondary_batch_application.js1
-rw-r--r--jstests/replsets/create_drop_database_different_casing.js1
-rw-r--r--jstests/replsets/ddl_op_behind_transaction_fails_in_shutdown.js1
-rw-r--r--jstests/replsets/disallow_adding_initialized_node1.js1
-rw-r--r--jstests/replsets/disallow_adding_initialized_node2.js1
-rw-r--r--jstests/replsets/drop_collections_two_phase_rename_drop_target.js1
-rw-r--r--jstests/replsets/drop_databases_two_phase.js1
-rw-r--r--jstests/replsets/initial_sync_applier_error.js1
-rw-r--r--jstests/replsets/initial_sync_drop_collection.js1
-rw-r--r--jstests/replsets/initial_sync_during_stepdown.js1
-rw-r--r--jstests/replsets/initial_sync_fcv.js1
-rw-r--r--jstests/replsets/initial_sync_fetch_from_oldest_active_transaction_timestamp_no_oplog_application.js1
-rw-r--r--jstests/replsets/initial_sync_oplog_hole.js1
-rw-r--r--jstests/replsets/initial_sync_replicates_prepare_received_during_another_initial_sync.js1
-rw-r--r--jstests/replsets/initial_sync_test_fixture_test.js1
-rw-r--r--jstests/replsets/initial_sync_update_missing_doc.js1
-rw-r--r--jstests/replsets/initial_sync_update_missing_doc_with_prepare.js1
-rw-r--r--jstests/replsets/initial_sync_update_missing_field.js1
-rw-r--r--jstests/replsets/kill_ttl_on_stepdown.js1
-rw-r--r--jstests/replsets/last_error_reported_after_stepdown.js2
-rw-r--r--jstests/replsets/libs/election_handoff.js1
-rw-r--r--jstests/replsets/libs/initial_sync_test.js1
-rw-r--r--jstests/replsets/log_secondary_oplog_application.js1
-rw-r--r--jstests/replsets/mr_nonrepl_coll_in_local_db.js2
-rw-r--r--jstests/replsets/no_flapping_during_network_partition.js2
-rw-r--r--jstests/replsets/not_master_unacknowledged_write.js3
-rw-r--r--jstests/replsets/read_after_optime.js1
-rw-r--r--jstests/replsets/read_operations_during_step_down.js1
-rw-r--r--jstests/replsets/read_operations_during_step_up.js1
-rw-r--r--jstests/replsets/reconstruct_prepared_transactions_initial_sync_no_oplog_application.js1
-rw-r--r--jstests/replsets/recovery_preserves_active_txns.js1
-rw-r--r--jstests/replsets/rollback_drop_database.js1
-rw-r--r--jstests/replsets/rollback_unprepared_transactions.js1
-rw-r--r--jstests/replsets/rollback_via_refetch_survives_nonexistent_collection_drop.js1
-rw-r--r--jstests/replsets/rollback_waits_for_bgindex_completion.js1
-rw-r--r--jstests/replsets/rollback_with_socket_error_then_steady_state.js1
-rw-r--r--jstests/replsets/server_status_metrics.js1
-rw-r--r--jstests/replsets/step_down_on_secondary.js1
-rw-r--r--jstests/replsets/tla_plus_trace_checking.js1
-rw-r--r--jstests/replsets/transient_txn_error_labels_with_write_concern.js1
-rw-r--r--jstests/replsets/unconditional_step_down.js2
-rw-r--r--jstests/sharding/allow_partial_results_nshards.js2
-rw-r--r--jstests/sharding/change_streams_establishment_finds_new_shards.js1
-rw-r--r--jstests/sharding/comment_field.js1
-rw-r--r--src/mongo/scripting/engine.cpp2
-rw-r--r--src/mongo/shell/SConscript1
-rw-r--r--src/mongo/shell/check_log.js (renamed from jstests/libs/check_log.js)0
85 files changed, 3 insertions, 98 deletions
diff --git a/jstests/core/txns/kill_op_on_txn_expiry.js b/jstests/core/txns/kill_op_on_txn_expiry.js
index daabb1048ce..154dc9ec5c5 100644
--- a/jstests/core/txns/kill_op_on_txn_expiry.js
+++ b/jstests/core/txns/kill_op_on_txn_expiry.js
@@ -3,7 +3,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
load('jstests/libs/parallelTester.js');
diff --git a/jstests/core/txns/prepare_conflict.js b/jstests/core/txns/prepare_conflict.js
index 0ddc5aaf74c..b2c2071584c 100644
--- a/jstests/core/txns/prepare_conflict.js
+++ b/jstests/core/txns/prepare_conflict.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
const dbName = "test";
const collName = "prepare_conflict";
diff --git a/jstests/core/txns/speculative_snapshot_includes_all_writes.js b/jstests/core/txns/speculative_snapshot_includes_all_writes.js
index 15cb154b100..edb97ddeb79 100644
--- a/jstests/core/txns/speculative_snapshot_includes_all_writes.js
+++ b/jstests/core/txns/speculative_snapshot_includes_all_writes.js
@@ -6,8 +6,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const dbName = "test";
const collName = "speculative_snapshot_includes_all_writes_1";
const collName2 = "speculative_snapshot_includes_all_writes_2";
diff --git a/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js b/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
index f15d3d39f2e..fce4e205d88 100644
--- a/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
+++ b/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
@@ -38,7 +38,6 @@ TestData.otherDocFilter = {
* certain reads and that prepare conflicts block other types of reads.
*/
const readThreadFunc = function(readFunc, _collName, timesEntered) {
- load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
// Do not start reads until we are blocked in 'prepareTransaction'.
diff --git a/jstests/libs/write_concern_util.js b/jstests/libs/write_concern_util.js
index ed2678ff3f0..90832a858d8 100644
--- a/jstests/libs/write_concern_util.js
+++ b/jstests/libs/write_concern_util.js
@@ -2,8 +2,6 @@
* Utilities for testing writeConcern.
*/
-load("jstests/libs/check_log.js");
-
// Shards a collection with 'numDocs' documents and creates 2 chunks, one on each of two shards.
function shardCollectionWithChunks(st, coll, numDocs) {
var _db = coll.getDB();
diff --git a/jstests/noPassthrough/aggregation_log_namespace.js b/jstests/noPassthrough/aggregation_log_namespace.js
index a45a3a96597..274bbc3d0d0 100644
--- a/jstests/noPassthrough/aggregation_log_namespace.js
+++ b/jstests/noPassthrough/aggregation_log_namespace.js
@@ -5,7 +5,6 @@
'use strict';
load("jstests/aggregation/extras/merge_helpers.js"); // For withEachKindOfWriteStage.
-load("jstests/libs/check_log.js"); // For checkLogs.containsWithCount.
// Runs the given 'pipeline' and verifies that the namespace is correctly logged in the global
// log for the aggregate command. The 'comment' parameter is used to match a log entry against
diff --git a/jstests/noPassthrough/characterize_index_builds_on_restart.js b/jstests/noPassthrough/characterize_index_builds_on_restart.js
index 1ab3432563c..12cba5339b6 100644
--- a/jstests/noPassthrough/characterize_index_builds_on_restart.js
+++ b/jstests/noPassthrough/characterize_index_builds_on_restart.js
@@ -11,7 +11,6 @@
(function() {
'use strict';
-load("jstests/libs/check_log.js");
load('jstests/noPassthrough/libs/index_build.js');
load("jstests/replsets/rslib.js");
diff --git a/jstests/noPassthrough/commit_quorum.js b/jstests/noPassthrough/commit_quorum.js
index 0bc0c30d34a..9c38c7d08f7 100644
--- a/jstests/noPassthrough/commit_quorum.js
+++ b/jstests/noPassthrough/commit_quorum.js
@@ -5,7 +5,6 @@
*/
(function() {
load("jstests/noPassthrough/libs/index_build.js");
-load("jstests/libs/check_log.js");
const replSet = new ReplSetTest({
nodes: [
diff --git a/jstests/noPassthrough/create_indexes_in_txn_errors_if_already_in_progress.js b/jstests/noPassthrough/create_indexes_in_txn_errors_if_already_in_progress.js
index 9480277a528..e0607145e90 100644
--- a/jstests/noPassthrough/create_indexes_in_txn_errors_if_already_in_progress.js
+++ b/jstests/noPassthrough/create_indexes_in_txn_errors_if_already_in_progress.js
@@ -12,7 +12,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/parallel_shell_helpers.js");
load('jstests/libs/test_background_ops.js');
diff --git a/jstests/noPassthrough/dropdatabase_respect_maxtimems.js b/jstests/noPassthrough/dropdatabase_respect_maxtimems.js
index 3e3f7f819a2..63ca53cf888 100644
--- a/jstests/noPassthrough/dropdatabase_respect_maxtimems.js
+++ b/jstests/noPassthrough/dropdatabase_respect_maxtimems.js
@@ -24,8 +24,6 @@ const dropDB = rst.getPrimary().getDB("drop");
})();
(function assertDatabaseDropCanBeInterrupted() {
- load("jstests/libs/check_log.js");
-
assert.commandWorked(dropDB.bar.insert({}));
assert.commandWorked(rst.getPrimary().adminCommand(
diff --git a/jstests/noPassthrough/flow_control_logging.js b/jstests/noPassthrough/flow_control_logging.js
index bd3478aa7dd..b2bf68fc674 100644
--- a/jstests/noPassthrough/flow_control_logging.js
+++ b/jstests/noPassthrough/flow_control_logging.js
@@ -10,8 +10,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const replSet = new ReplSetTest({name: "flow_control_logging", nodes: 3});
replSet.startSet({
setParameter: {
diff --git a/jstests/noPassthrough/hybrid_index_build_on_state_transition.js b/jstests/noPassthrough/hybrid_index_build_on_state_transition.js
index bfa40d5e555..01cf765d550 100644
--- a/jstests/noPassthrough/hybrid_index_build_on_state_transition.js
+++ b/jstests/noPassthrough/hybrid_index_build_on_state_transition.js
@@ -17,7 +17,6 @@
* uses_prepare_transaction,
* ]
*/
-load("jstests/libs/check_log.js");
load('jstests/noPassthrough/libs/index_build.js');
load("jstests/replsets/rslib.js");
load("jstests/core/txns/libs/prepare_helpers.js");
diff --git a/jstests/noPassthrough/hybrid_index_with_updates.js b/jstests/noPassthrough/hybrid_index_with_updates.js
index 3b9c2d89f7a..4786cc0d3f2 100644
--- a/jstests/noPassthrough/hybrid_index_with_updates.js
+++ b/jstests/noPassthrough/hybrid_index_with_updates.js
@@ -7,8 +7,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
let conn = MongoRunner.runMongod();
let testDB = conn.getDB('test');
diff --git a/jstests/noPassthrough/hybrid_unique_index_with_updates.js b/jstests/noPassthrough/hybrid_unique_index_with_updates.js
index 38a83b30a37..4674ac784a7 100644
--- a/jstests/noPassthrough/hybrid_unique_index_with_updates.js
+++ b/jstests/noPassthrough/hybrid_unique_index_with_updates.js
@@ -8,8 +8,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
let replSetTest = new ReplSetTest({name: "hybrid_updates", nodes: 2});
replSetTest.startSet();
replSetTest.initiate();
diff --git a/jstests/noPassthrough/index_secondary_commit_after_scan_error.js b/jstests/noPassthrough/index_secondary_commit_after_scan_error.js
index 55eb378db4e..55570c3b819 100644
--- a/jstests/noPassthrough/index_secondary_commit_after_scan_error.js
+++ b/jstests/noPassthrough/index_secondary_commit_after_scan_error.js
@@ -9,7 +9,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/index_secondary_wait_for_abort.js b/jstests/noPassthrough/index_secondary_wait_for_abort.js
index bcf7c393902..06bb07bc4f1 100644
--- a/jstests/noPassthrough/index_secondary_wait_for_abort.js
+++ b/jstests/noPassthrough/index_secondary_wait_for_abort.js
@@ -9,7 +9,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/index_stepdown_after_init.js b/jstests/noPassthrough/index_stepdown_after_init.js
index 96ed6619e98..f1f4f63b5eb 100644
--- a/jstests/noPassthrough/index_stepdown_after_init.js
+++ b/jstests/noPassthrough/index_stepdown_after_init.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/index_stepdown_duplicate.js b/jstests/noPassthrough/index_stepdown_duplicate.js
index ae1b973ff12..6117b1cab40 100644
--- a/jstests/noPassthrough/index_stepdown_duplicate.js
+++ b/jstests/noPassthrough/index_stepdown_duplicate.js
@@ -8,7 +8,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/index_stepdown_failover.js b/jstests/noPassthrough/index_stepdown_failover.js
index 717d07edaec..595b3cc0887 100644
--- a/jstests/noPassthrough/index_stepdown_failover.js
+++ b/jstests/noPassthrough/index_stepdown_failover.js
@@ -8,7 +8,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/index_stepdown_unique.js b/jstests/noPassthrough/index_stepdown_unique.js
index cbdbe6408fc..fd50fd1aa33 100644
--- a/jstests/noPassthrough/index_stepdown_unique.js
+++ b/jstests/noPassthrough/index_stepdown_unique.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/indexbg2.js b/jstests/noPassthrough/indexbg2.js
index ec873eccf7e..454e5f28c59 100644
--- a/jstests/noPassthrough/indexbg2.js
+++ b/jstests/noPassthrough/indexbg2.js
@@ -4,8 +4,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const conn = MongoRunner.runMongod({nojournal: ""});
assert.neq(null, conn, "mongod failed to start.");
diff --git a/jstests/noPassthrough/indexbg_killop_primary_after_init.js b/jstests/noPassthrough/indexbg_killop_primary_after_init.js
index dc596e165c2..87ce6562c42 100644
--- a/jstests/noPassthrough/indexbg_killop_primary_after_init.js
+++ b/jstests/noPassthrough/indexbg_killop_primary_after_init.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
const rst = new ReplSetTest({
diff --git a/jstests/noPassthrough/indexbg_shutdown.js b/jstests/noPassthrough/indexbg_shutdown.js
index 1dcfbf37dab..ef130bc2bce 100644
--- a/jstests/noPassthrough/indexbg_shutdown.js
+++ b/jstests/noPassthrough/indexbg_shutdown.js
@@ -12,7 +12,6 @@
(function() {
"use strict";
-load('jstests/libs/check_log.js');
load('jstests/noPassthrough/libs/index_build.js');
var dbname = 'bgIndexSec';
diff --git a/jstests/noPassthrough/initial_sync_wt_cache_full.js b/jstests/noPassthrough/initial_sync_wt_cache_full.js
index fb47472a674..843f870a34d 100644
--- a/jstests/noPassthrough/initial_sync_wt_cache_full.js
+++ b/jstests/noPassthrough/initial_sync_wt_cache_full.js
@@ -4,7 +4,6 @@
*/
(function() {
'use strict';
-load('jstests/libs/check_log.js');
const rst = new ReplSetTest({
nodes: [
diff --git a/jstests/noPassthrough/latency_includes_lock_acquisition_time.js b/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
index 1532954f96a..fa6e0e9f1ca 100644
--- a/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
+++ b/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
@@ -24,7 +24,6 @@ function runWithWait(millis, func) {
}));
}
-load("jstests/libs/check_log.js");
load("jstests/libs/profiler.js");
let hangMillis = 200;
diff --git a/jstests/noPassthrough/log_find_getmore.js b/jstests/noPassthrough/log_find_getmore.js
index a3a2ecf7d7d..0545dddc895 100644
--- a/jstests/noPassthrough/log_find_getmore.js
+++ b/jstests/noPassthrough/log_find_getmore.js
@@ -7,7 +7,6 @@
"use strict";
// For checkLog and getLatestProfilerEntry.
-load("jstests/libs/check_log.js");
load("jstests/libs/profiler.js");
function assertLogLineContains(conn, parts) {
diff --git a/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js b/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js
index 0d48ac404d7..9de22e79de5 100644
--- a/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js
+++ b/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js
@@ -12,7 +12,6 @@
TestData.disableImplicitSessions = true;
load("jstests/libs/fixture_helpers.js"); // For FixtureHelpers.
-load("jstests/libs/check_log.js"); // For formatAsLogLine.
// Prevent the mongo shell from gossiping its cluster time, since this will increase the amount
// of data logged for each op. For some of the testcases below, including the cluster time would
diff --git a/jstests/noPassthrough/profile_interrupted_op.js b/jstests/noPassthrough/profile_interrupted_op.js
index f49a126731d..f0fff91b734 100644
--- a/jstests/noPassthrough/profile_interrupted_op.js
+++ b/jstests/noPassthrough/profile_interrupted_op.js
@@ -8,8 +8,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js"); // For checkLog.
-
//
// Start mongo with profiling disabled, create an empty database, and populate it with a
// collection that has one document.
diff --git a/jstests/noPassthrough/recovery_wt_cache_full.js b/jstests/noPassthrough/recovery_wt_cache_full.js
index 72e36a13eb1..68345580306 100644
--- a/jstests/noPassthrough/recovery_wt_cache_full.js
+++ b/jstests/noPassthrough/recovery_wt_cache_full.js
@@ -5,7 +5,6 @@
*/
(function() {
'use strict';
-load('jstests/libs/check_log.js');
const rst = new ReplSetTest({
nodes: [
diff --git a/jstests/noPassthrough/step_down_during_drop_database.js b/jstests/noPassthrough/step_down_during_drop_database.js
index e31d876ad6a..40b566de806 100644
--- a/jstests/noPassthrough/step_down_during_drop_database.js
+++ b/jstests/noPassthrough/step_down_during_drop_database.js
@@ -8,8 +8,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const dbName = "test";
const collName = "coll";
diff --git a/jstests/noPassthrough/transaction_write_with_snapshot_unavailable.js b/jstests/noPassthrough/transaction_write_with_snapshot_unavailable.js
index 48de0c880c8..65ec2a0f9a0 100644
--- a/jstests/noPassthrough/transaction_write_with_snapshot_unavailable.js
+++ b/jstests/noPassthrough/transaction_write_with_snapshot_unavailable.js
@@ -10,7 +10,6 @@
*/
(function() {
"use strict";
-load("jstests/libs/check_log.js");
const name = "transaction_write_with_snapshot_unavailable";
const replTest = new ReplSetTest({name: name, nodes: 1});
diff --git a/jstests/noPassthroughWithMongod/background_validation_with_ddl_ops.js b/jstests/noPassthroughWithMongod/background_validation_with_ddl_ops.js
index 6c0d42df0b2..6e7b24fad85 100644
--- a/jstests/noPassthroughWithMongod/background_validation_with_ddl_ops.js
+++ b/jstests/noPassthroughWithMongod/background_validation_with_ddl_ops.js
@@ -13,7 +13,6 @@
*/
(function() {
"use strict";
-load("jstests/libs/check_log.js");
const dbName = "background_validation_with_ddl_ops";
const dbNameRename = "background_validation_with_ddl_ops_rename";
diff --git a/jstests/noPassthroughWithMongod/create_indexes_waits_for_already_in_progress.js b/jstests/noPassthroughWithMongod/create_indexes_waits_for_already_in_progress.js
index 08c3b26f5c4..b5704d2e84c 100644
--- a/jstests/noPassthroughWithMongod/create_indexes_waits_for_already_in_progress.js
+++ b/jstests/noPassthroughWithMongod/create_indexes_waits_for_already_in_progress.js
@@ -25,7 +25,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/parallel_shell_helpers.js");
load('jstests/libs/test_background_ops.js');
diff --git a/jstests/noPassthroughWithMongod/restart_catalog_interrupts_background_validation.js b/jstests/noPassthroughWithMongod/restart_catalog_interrupts_background_validation.js
index 7c6c67f77ca..99d79a847f7 100644
--- a/jstests/noPassthroughWithMongod/restart_catalog_interrupts_background_validation.js
+++ b/jstests/noPassthroughWithMongod/restart_catalog_interrupts_background_validation.js
@@ -7,7 +7,6 @@
*/
(function() {
"use strict";
-load("jstests/libs/check_log.js");
const dbName = "restart_catalog_interrupts_background_validation";
const collName = "test";
diff --git a/jstests/replsets/abort_in_progress_transactions_on_step_up.js b/jstests/replsets/abort_in_progress_transactions_on_step_up.js
index e233e2ed97e..7c4f37c4769 100644
--- a/jstests/replsets/abort_in_progress_transactions_on_step_up.js
+++ b/jstests/replsets/abort_in_progress_transactions_on_step_up.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
load("jstests/replsets/rslib.js"); // For reconnect()
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
function getTxnTableEntry(db) {
diff --git a/jstests/replsets/avg_num_catchup_ops.js b/jstests/replsets/avg_num_catchup_ops.js
index 4d3feae0d28..3b194e700ab 100644
--- a/jstests/replsets/avg_num_catchup_ops.js
+++ b/jstests/replsets/avg_num_catchup_ops.js
@@ -5,7 +5,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/write_concern_util.js");
load("jstests/replsets/libs/election_metrics.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/awaitdata_getmore_new_last_committed_optime.js b/jstests/replsets/awaitdata_getmore_new_last_committed_optime.js
index 0f76df2dfe5..9f79df71499 100644
--- a/jstests/replsets/awaitdata_getmore_new_last_committed_optime.js
+++ b/jstests/replsets/awaitdata_getmore_new_last_committed_optime.js
@@ -5,7 +5,6 @@
(function() {
'use strict';
load('jstests/replsets/rslib.js');
-load('jstests/libs/check_log.js');
const name = 'awaitdata_getmore_new_last_committed_optime';
const replSet = new ReplSetTest({name: name, nodes: 5, settings: {chainingAllowed: false}});
diff --git a/jstests/replsets/catchup.js b/jstests/replsets/catchup.js
index 2ae5e09e732..d565fa2b5d5 100644
--- a/jstests/replsets/catchup.js
+++ b/jstests/replsets/catchup.js
@@ -3,7 +3,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/write_concern_util.js");
load("jstests/replsets/libs/election_metrics.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/change_stream_speculative_majority_secondary_batch_application.js b/jstests/replsets/change_stream_speculative_majority_secondary_batch_application.js
index 9fa0cf055c0..ff583286519 100644
--- a/jstests/replsets/change_stream_speculative_majority_secondary_batch_application.js
+++ b/jstests/replsets/change_stream_speculative_majority_secondary_batch_application.js
@@ -9,7 +9,6 @@
"use strict";
load("jstests/libs/write_concern_util.js"); // for [stop|restart]ServerReplication.
-load("jstests/libs/check_log.js"); // for checkLog.
const name = "speculative_majority_secondary";
const replTest = new ReplSetTest({
diff --git a/jstests/replsets/create_drop_database_different_casing.js b/jstests/replsets/create_drop_database_different_casing.js
index d0709700053..571563a43cf 100644
--- a/jstests/replsets/create_drop_database_different_casing.js
+++ b/jstests/replsets/create_drop_database_different_casing.js
@@ -16,7 +16,6 @@
(function() {
'use strict';
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
const rst = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0}}]});
diff --git a/jstests/replsets/ddl_op_behind_transaction_fails_in_shutdown.js b/jstests/replsets/ddl_op_behind_transaction_fails_in_shutdown.js
index 676817cb31b..8d063c6b1bb 100644
--- a/jstests/replsets/ddl_op_behind_transaction_fails_in_shutdown.js
+++ b/jstests/replsets/ddl_op_behind_transaction_fails_in_shutdown.js
@@ -19,7 +19,6 @@
"use strict";
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
load("jstests/libs/parallel_shell_helpers.js");
load('jstests/libs/test_background_ops.js');
diff --git a/jstests/replsets/disallow_adding_initialized_node1.js b/jstests/replsets/disallow_adding_initialized_node1.js
index 7123070bf92..d9b953d874a 100644
--- a/jstests/replsets/disallow_adding_initialized_node1.js
+++ b/jstests/replsets/disallow_adding_initialized_node1.js
@@ -6,7 +6,6 @@
(function() {
'use strict';
-load("jstests/libs/check_log.js");
var name = 'disallow_adding_initialized_node1';
var replSetA = new ReplSetTest({
diff --git a/jstests/replsets/disallow_adding_initialized_node2.js b/jstests/replsets/disallow_adding_initialized_node2.js
index 12de734b411..63817f6ca49 100644
--- a/jstests/replsets/disallow_adding_initialized_node2.js
+++ b/jstests/replsets/disallow_adding_initialized_node2.js
@@ -11,7 +11,6 @@
(function() {
'use strict';
-load("jstests/libs/check_log.js");
var name = 'disallow_adding_initialized_node2';
var replSetA = new ReplSetTest({
diff --git a/jstests/replsets/drop_collections_two_phase_rename_drop_target.js b/jstests/replsets/drop_collections_two_phase_rename_drop_target.js
index 78f7436853e..2a334814114 100644
--- a/jstests/replsets/drop_collections_two_phase_rename_drop_target.js
+++ b/jstests/replsets/drop_collections_two_phase_rename_drop_target.js
@@ -7,7 +7,6 @@
'use strict';
load('jstests/replsets/libs/two_phase_drops.js'); // For TwoPhaseDropCollectionTest.
-load('jstests/libs/check_log.js'); // For checkLog.contains().
// Return a list of all indexes for a given collection. Use 'args' as the
// 'listIndexes' command arguments.
diff --git a/jstests/replsets/drop_databases_two_phase.js b/jstests/replsets/drop_databases_two_phase.js
index 219edac1a94..5fdcc1a74c4 100644
--- a/jstests/replsets/drop_databases_two_phase.js
+++ b/jstests/replsets/drop_databases_two_phase.js
@@ -18,7 +18,6 @@
"use strict";
load('jstests/replsets/libs/two_phase_drops.js'); // For TwoPhaseDropCollectionTest.
-load('jstests/libs/check_log.js');
load("jstests/replsets/rslib.js");
// Returns a list of all collections in a given database. Use 'args' as the
diff --git a/jstests/replsets/initial_sync_applier_error.js b/jstests/replsets/initial_sync_applier_error.js
index 637625b6fb9..70e3225a107 100644
--- a/jstests/replsets/initial_sync_applier_error.js
+++ b/jstests/replsets/initial_sync_applier_error.js
@@ -11,7 +11,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
var name = 'initial_sync_applier_error';
diff --git a/jstests/replsets/initial_sync_drop_collection.js b/jstests/replsets/initial_sync_drop_collection.js
index b5b1e83b6a0..cd6b6aaee08 100644
--- a/jstests/replsets/initial_sync_drop_collection.js
+++ b/jstests/replsets/initial_sync_drop_collection.js
@@ -11,7 +11,6 @@ return;
// Skip db hash check because secondary cannot complete initial sync.
TestData.skipCheckDBHashes = true;
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
load('jstests/replsets/libs/two_phase_drops.js');
load("jstests/libs/uuid_util.js");
diff --git a/jstests/replsets/initial_sync_during_stepdown.js b/jstests/replsets/initial_sync_during_stepdown.js
index 6462f69fb6a..e5f407ac872 100644
--- a/jstests/replsets/initial_sync_during_stepdown.js
+++ b/jstests/replsets/initial_sync_during_stepdown.js
@@ -4,7 +4,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/curop_helpers.js"); // for waitForCurOpByFailPoint().
load("jstests/libs/fail_point_util.js");
diff --git a/jstests/replsets/initial_sync_fcv.js b/jstests/replsets/initial_sync_fcv.js
index 3f4ffb410f8..b9deac57a66 100644
--- a/jstests/replsets/initial_sync_fcv.js
+++ b/jstests/replsets/initial_sync_fcv.js
@@ -7,7 +7,6 @@
(function() {
'use strict';
-load('jstests/libs/check_log.js');
load("jstests/libs/fail_point_util.js");
const rst = new ReplSetTest({nodes: 2});
diff --git a/jstests/replsets/initial_sync_fetch_from_oldest_active_transaction_timestamp_no_oplog_application.js b/jstests/replsets/initial_sync_fetch_from_oldest_active_transaction_timestamp_no_oplog_application.js
index 9a4ed0368a5..0d278aa01cb 100644
--- a/jstests/replsets/initial_sync_fetch_from_oldest_active_transaction_timestamp_no_oplog_application.js
+++ b/jstests/replsets/initial_sync_fetch_from_oldest_active_transaction_timestamp_no_oplog_application.js
@@ -20,7 +20,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/core/txns/libs/prepare_helpers.js");
const replTest = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0, votes: 0}}]});
diff --git a/jstests/replsets/initial_sync_oplog_hole.js b/jstests/replsets/initial_sync_oplog_hole.js
index 63635d471f9..148de959e7b 100644
--- a/jstests/replsets/initial_sync_oplog_hole.js
+++ b/jstests/replsets/initial_sync_oplog_hole.js
@@ -6,7 +6,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/initial_sync_replicates_prepare_received_during_another_initial_sync.js b/jstests/replsets/initial_sync_replicates_prepare_received_during_another_initial_sync.js
index 4c147802fbd..80012cab607 100644
--- a/jstests/replsets/initial_sync_replicates_prepare_received_during_another_initial_sync.js
+++ b/jstests/replsets/initial_sync_replicates_prepare_received_during_another_initial_sync.js
@@ -16,7 +16,6 @@
(function() {
"use strict";
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
load("jstests/replsets/rslib.js");
/**
diff --git a/jstests/replsets/initial_sync_test_fixture_test.js b/jstests/replsets/initial_sync_test_fixture_test.js
index 9d7f57b19c6..748e5e36a5b 100644
--- a/jstests/replsets/initial_sync_test_fixture_test.js
+++ b/jstests/replsets/initial_sync_test_fixture_test.js
@@ -16,7 +16,6 @@
"use strict";
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
load("jstests/replsets/libs/initial_sync_test.js");
/**
diff --git a/jstests/replsets/initial_sync_update_missing_doc.js b/jstests/replsets/initial_sync_update_missing_doc.js
index 532e82ab3bd..76fcdee0893 100644
--- a/jstests/replsets/initial_sync_update_missing_doc.js
+++ b/jstests/replsets/initial_sync_update_missing_doc.js
@@ -12,7 +12,6 @@
(function() {
load("jstests/replsets/libs/initial_sync_update_missing_doc.js");
-load("jstests/libs/check_log.js");
const replSet = new ReplSetTest({nodes: 1});
diff --git a/jstests/replsets/initial_sync_update_missing_doc_with_prepare.js b/jstests/replsets/initial_sync_update_missing_doc_with_prepare.js
index 2f86c8d5454..61242d6f01c 100644
--- a/jstests/replsets/initial_sync_update_missing_doc_with_prepare.js
+++ b/jstests/replsets/initial_sync_update_missing_doc_with_prepare.js
@@ -14,7 +14,6 @@
(function() {
load("jstests/core/txns/libs/prepare_helpers.js");
load("jstests/replsets/libs/initial_sync_update_missing_doc.js");
-load("jstests/libs/check_log.js");
function doTest(doTransactionWork, numDocuments) {
const replSet = new ReplSetTest({nodes: 1});
diff --git a/jstests/replsets/initial_sync_update_missing_field.js b/jstests/replsets/initial_sync_update_missing_field.js
index 9f9948899fc..9e7a9449d5f 100644
--- a/jstests/replsets/initial_sync_update_missing_field.js
+++ b/jstests/replsets/initial_sync_update_missing_field.js
@@ -13,7 +13,6 @@
(function() {
load("jstests/replsets/libs/initial_sync_update_missing_doc.js");
-load("jstests/libs/check_log.js");
const replSet = new ReplSetTest({nodes: 1});
diff --git a/jstests/replsets/kill_ttl_on_stepdown.js b/jstests/replsets/kill_ttl_on_stepdown.js
index 31d8174ffd5..65f489e1332 100644
--- a/jstests/replsets/kill_ttl_on_stepdown.js
+++ b/jstests/replsets/kill_ttl_on_stepdown.js
@@ -7,7 +7,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
const dbName = "kill_ttl_on_stepdown";
diff --git a/jstests/replsets/last_error_reported_after_stepdown.js b/jstests/replsets/last_error_reported_after_stepdown.js
index bfd0e43bb8a..0947473aed1 100644
--- a/jstests/replsets/last_error_reported_after_stepdown.js
+++ b/jstests/replsets/last_error_reported_after_stepdown.js
@@ -5,8 +5,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const rst = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0}}]});
rst.startSet();
rst.initiate();
diff --git a/jstests/replsets/libs/election_handoff.js b/jstests/replsets/libs/election_handoff.js
index f29f55853bd..895aeda7522 100644
--- a/jstests/replsets/libs/election_handoff.js
+++ b/jstests/replsets/libs/election_handoff.js
@@ -5,7 +5,6 @@
*/
var ElectionHandoffTest = (function() {
- load("jstests/libs/check_log.js");
load("jstests/replsets/rslib.js");
const kStepDownPeriodSecs = 30;
diff --git a/jstests/replsets/libs/initial_sync_test.js b/jstests/replsets/libs/initial_sync_test.js
index 5a5b6a7bc56..26fee339490 100644
--- a/jstests/replsets/libs/initial_sync_test.js
+++ b/jstests/replsets/libs/initial_sync_test.js
@@ -14,7 +14,6 @@
"use strict";
-load("jstests/libs/check_log.js");
load('jstests/replsets/rslib.js');
/**
diff --git a/jstests/replsets/log_secondary_oplog_application.js b/jstests/replsets/log_secondary_oplog_application.js
index 66b9be5daf7..c252be6f5ac 100644
--- a/jstests/replsets/log_secondary_oplog_application.js
+++ b/jstests/replsets/log_secondary_oplog_application.js
@@ -7,7 +7,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
let name = "log_secondary_oplog_application";
let rst = ReplSetTest({name: name, nodes: 2});
diff --git a/jstests/replsets/mr_nonrepl_coll_in_local_db.js b/jstests/replsets/mr_nonrepl_coll_in_local_db.js
index 5edce6d6a87..8289d7ee576 100644
--- a/jstests/replsets/mr_nonrepl_coll_in_local_db.js
+++ b/jstests/replsets/mr_nonrepl_coll_in_local_db.js
@@ -9,8 +9,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
const name = "mr_nonrepl_coll_in_local_db";
const replSet = new ReplSetTest({name: name, nodes: 2});
replSet.startSet();
diff --git a/jstests/replsets/no_flapping_during_network_partition.js b/jstests/replsets/no_flapping_during_network_partition.js
index e6f705c5a4a..1303e6baf2a 100644
--- a/jstests/replsets/no_flapping_during_network_partition.js
+++ b/jstests/replsets/no_flapping_during_network_partition.js
@@ -13,8 +13,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
var name = "no_flapping_during_network_partition";
var replTest = new ReplSetTest({name: name, nodes: 3, useBridge: true});
diff --git a/jstests/replsets/not_master_unacknowledged_write.js b/jstests/replsets/not_master_unacknowledged_write.js
index ac7b4cf2ef5..087361c8bc3 100644
--- a/jstests/replsets/not_master_unacknowledged_write.js
+++ b/jstests/replsets/not_master_unacknowledged_write.js
@@ -5,8 +5,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
-
function getNotMasterUnackWritesCounter() {
return assert.commandWorked(primaryDB.adminCommand({serverStatus: 1}))
.metrics.repl.network.notMasterUnacknowledgedWrites;
@@ -55,7 +53,6 @@ assert.commandWorked(primaryDB.adminCommand({
var command =
`
- load("jstests/libs/check_log.js");
checkLog.contains(db.getMongo(), "hangAfterCollectionInserts fail point enabled");
db.adminCommand({replSetStepDown: 60, force: true});`;
diff --git a/jstests/replsets/read_after_optime.js b/jstests/replsets/read_after_optime.js
index ef2b736ab83..63b049414f6 100644
--- a/jstests/replsets/read_after_optime.js
+++ b/jstests/replsets/read_after_optime.js
@@ -2,7 +2,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
var replTest = new ReplSetTest({nodes: 2});
replTest.startSet();
diff --git a/jstests/replsets/read_operations_during_step_down.js b/jstests/replsets/read_operations_during_step_down.js
index 43e1f736d4d..96fa2651237 100644
--- a/jstests/replsets/read_operations_during_step_down.js
+++ b/jstests/replsets/read_operations_during_step_down.js
@@ -2,7 +2,6 @@
* Test that the read operations are not killed and their connections are also not
* closed during step down.
*/
-load("jstests/libs/check_log.js");
load('jstests/libs/parallelTester.js');
load("jstests/libs/curop_helpers.js"); // for waitForCurOpByFailPoint().
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/read_operations_during_step_up.js b/jstests/replsets/read_operations_during_step_up.js
index f778790821f..54ab8bde447 100644
--- a/jstests/replsets/read_operations_during_step_up.js
+++ b/jstests/replsets/read_operations_during_step_up.js
@@ -2,7 +2,6 @@
* Test that the read operations are not killed and their connections are also not
* closed during step up.
*/
-load("jstests/libs/check_log.js");
load('jstests/libs/parallelTester.js');
load("jstests/libs/curop_helpers.js"); // for waitForCurOpByFailPoint().
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/reconstruct_prepared_transactions_initial_sync_no_oplog_application.js b/jstests/replsets/reconstruct_prepared_transactions_initial_sync_no_oplog_application.js
index cf388620e20..dbc2c05dfff 100644
--- a/jstests/replsets/reconstruct_prepared_transactions_initial_sync_no_oplog_application.js
+++ b/jstests/replsets/reconstruct_prepared_transactions_initial_sync_no_oplog_application.js
@@ -11,7 +11,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/core/txns/libs/prepare_helpers.js");
const replTest = new ReplSetTest({nodes: 2});
diff --git a/jstests/replsets/recovery_preserves_active_txns.js b/jstests/replsets/recovery_preserves_active_txns.js
index 005286cf152..80c6070928f 100644
--- a/jstests/replsets/recovery_preserves_active_txns.js
+++ b/jstests/replsets/recovery_preserves_active_txns.js
@@ -13,7 +13,6 @@
(function() {
"use strict";
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
// A new replica set for both the commit and abort tests to ensure the same clean state.
function doTest(commitOrAbort) {
diff --git a/jstests/replsets/rollback_drop_database.js b/jstests/replsets/rollback_drop_database.js
index 15f26cceee1..e4783266296 100644
--- a/jstests/replsets/rollback_drop_database.js
+++ b/jstests/replsets/rollback_drop_database.js
@@ -11,7 +11,6 @@
(function() {
load("jstests/replsets/libs/rollback_test.js");
-load("jstests/libs/check_log.js");
const testName = "rollback_drop_database";
const oldDbName = "oldDatabase";
diff --git a/jstests/replsets/rollback_unprepared_transactions.js b/jstests/replsets/rollback_unprepared_transactions.js
index ba49df4af86..fa716cf3fd0 100644
--- a/jstests/replsets/rollback_unprepared_transactions.js
+++ b/jstests/replsets/rollback_unprepared_transactions.js
@@ -5,7 +5,6 @@
(function() {
'use strict';
-load('jstests/libs/check_log.js');
load('jstests/replsets/libs/rollback_test.js');
load('jstests/replsets/libs/rollback_files.js');
load("jstests/libs/uuid_util.js");
diff --git a/jstests/replsets/rollback_via_refetch_survives_nonexistent_collection_drop.js b/jstests/replsets/rollback_via_refetch_survives_nonexistent_collection_drop.js
index 7cf47857d2a..acb8bea802b 100644
--- a/jstests/replsets/rollback_via_refetch_survives_nonexistent_collection_drop.js
+++ b/jstests/replsets/rollback_via_refetch_survives_nonexistent_collection_drop.js
@@ -11,7 +11,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/replsets/libs/rollback_test.js");
const dbName = "test";
diff --git a/jstests/replsets/rollback_waits_for_bgindex_completion.js b/jstests/replsets/rollback_waits_for_bgindex_completion.js
index d39ebb4fb60..0dea78760af 100644
--- a/jstests/replsets/rollback_waits_for_bgindex_completion.js
+++ b/jstests/replsets/rollback_waits_for_bgindex_completion.js
@@ -12,7 +12,6 @@
(function() {
'use strict';
-load('jstests/libs/check_log.js');
load("jstests/replsets/rslib.js");
load('jstests/replsets/libs/rollback_test.js');
diff --git a/jstests/replsets/rollback_with_socket_error_then_steady_state.js b/jstests/replsets/rollback_with_socket_error_then_steady_state.js
index 8ce86983224..a3bcbabbd4a 100644
--- a/jstests/replsets/rollback_with_socket_error_then_steady_state.js
+++ b/jstests/replsets/rollback_with_socket_error_then_steady_state.js
@@ -6,7 +6,6 @@
(function() {
'use strict';
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/server_status_metrics.js b/jstests/replsets/server_status_metrics.js
index e4648173cd8..baeb53c9146 100644
--- a/jstests/replsets/server_status_metrics.js
+++ b/jstests/replsets/server_status_metrics.js
@@ -2,7 +2,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/write_concern_util.js");
/**
diff --git a/jstests/replsets/step_down_on_secondary.js b/jstests/replsets/step_down_on_secondary.js
index 04cbed234d5..9bef6a2de10 100644
--- a/jstests/replsets/step_down_on_secondary.js
+++ b/jstests/replsets/step_down_on_secondary.js
@@ -17,7 +17,6 @@
load('jstests/libs/parallelTester.js');
load("jstests/libs/curop_helpers.js"); // for waitForCurOpByFailPoint().
load("jstests/core/txns/libs/prepare_helpers.js");
-load("jstests/libs/check_log.js");
load("jstests/libs/fail_point_util.js");
const dbName = "test";
diff --git a/jstests/replsets/tla_plus_trace_checking.js b/jstests/replsets/tla_plus_trace_checking.js
index f9dfcc5b1aa..8045102b1b6 100644
--- a/jstests/replsets/tla_plus_trace_checking.js
+++ b/jstests/replsets/tla_plus_trace_checking.js
@@ -4,7 +4,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
const failpointData = {
mode: 'alwaysOn',
diff --git a/jstests/replsets/transient_txn_error_labels_with_write_concern.js b/jstests/replsets/transient_txn_error_labels_with_write_concern.js
index 904fca12531..690aa39a982 100644
--- a/jstests/replsets/transient_txn_error_labels_with_write_concern.js
+++ b/jstests/replsets/transient_txn_error_labels_with_write_concern.js
@@ -3,7 +3,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js");
load("jstests/libs/write_concern_util.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/unconditional_step_down.js b/jstests/replsets/unconditional_step_down.js
index 4d5e37821db..d15e8ea6230 100644
--- a/jstests/replsets/unconditional_step_down.js
+++ b/jstests/replsets/unconditional_step_down.js
@@ -89,8 +89,6 @@ function runStepDownTest({testMsg, stepDownFn, toRemovedState}) {
}, primary.port);
const joinUnblockStepDown = startSafeParallelShell(() => {
- load("jstests/libs/check_log.js");
-
jsTestLog("Wait for step down to start killing operations");
checkLog.contains(db, "Starting to kill user operations");
diff --git a/jstests/sharding/allow_partial_results_nshards.js b/jstests/sharding/allow_partial_results_nshards.js
index bb808e10bcd..d87a3f71934 100644
--- a/jstests/sharding/allow_partial_results_nshards.js
+++ b/jstests/sharding/allow_partial_results_nshards.js
@@ -6,8 +6,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js"); // For formatAsLogLine.
-
// This test looks for exact matches in log output, which does not account for implicit sessions.
TestData.disableImplicitSessions = true;
diff --git a/jstests/sharding/change_streams_establishment_finds_new_shards.js b/jstests/sharding/change_streams_establishment_finds_new_shards.js
index d9c363c3246..8d8ae92b95a 100644
--- a/jstests/sharding/change_streams_establishment_finds_new_shards.js
+++ b/jstests/sharding/change_streams_establishment_finds_new_shards.js
@@ -44,7 +44,6 @@ assert.commandWorked(mongos.adminCommand(
// While opening the cursor, wait for the failpoint and add the new shard.
const awaitNewShard = startParallelShell(`
- load("jstests/libs/check_log.js");
checkLog.contains(db,
"shardedAggregateHangBeforeEstablishingShardCursors fail point enabled");
assert.commandWorked(
diff --git a/jstests/sharding/comment_field.js b/jstests/sharding/comment_field.js
index 7146711398c..fed2ff1cf5f 100644
--- a/jstests/sharding/comment_field.js
+++ b/jstests/sharding/comment_field.js
@@ -8,7 +8,6 @@
(function() {
"use strict";
-load("jstests/libs/check_log.js"); // For checkLog.* helper functions.
load("jstests/libs/fixture_helpers.js"); // For FixtureHelpers.
load("jstests/libs/profiler.js"); // For profilerHas*OrThrow helper functions.
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
index f677475246e..77017f455ae 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -299,6 +299,7 @@ ScriptingFunction Scope::createFunction(const char* code) {
namespace JSFiles {
extern const JSFile collection;
+extern const JSFile check_log;
extern const JSFile crud_api;
extern const JSFile db;
extern const JSFile explain_query;
@@ -323,6 +324,7 @@ void Scope::execCoreFiles() {
execSetup(JSFiles::query);
execSetup(JSFiles::bulk_api);
execSetup(JSFiles::error_codes);
+ execSetup(JSFiles::check_log);
execSetup(JSFiles::collection);
execSetup(JSFiles::crud_api);
execSetup(JSFiles::explain_query);
diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript
index 880acc3544f..6d53153625e 100644
--- a/src/mongo/shell/SConscript
+++ b/src/mongo/shell/SConscript
@@ -36,6 +36,7 @@ js_header = env.JSHeader(
source=[
"assert.js",
"bulk_api.js",
+ "check_log.js",
"collection.js",
"crud_api.js",
"db.js",
diff --git a/jstests/libs/check_log.js b/src/mongo/shell/check_log.js
index 9bc73b58438..9bc73b58438 100644
--- a/jstests/libs/check_log.js
+++ b/src/mongo/shell/check_log.js