mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
Remove CHAOS_MODE
This is dead code. It is never set to true.
This commit is contained in:
@@ -1360,9 +1360,6 @@ unsafe fn maybe_lock_file(file: &mut File, lock_type: libc::c_int) -> bool {
|
||||
if ABANDONED_LOCKING.load() {
|
||||
return false;
|
||||
}
|
||||
if CHAOS_MODE.load() {
|
||||
return false;
|
||||
}
|
||||
if path_get_data_remoteness() == DirRemoteness::remote {
|
||||
return false;
|
||||
}
|
||||
@@ -2084,7 +2081,3 @@ pub fn in_private_mode(vars: &dyn Environment) -> bool {
|
||||
|
||||
/// Whether to force the read path instead of mmap. This is useful for testing.
|
||||
static NEVER_MMAP: RelaxedAtomicBool = RelaxedAtomicBool::new(false);
|
||||
|
||||
/// Whether we're in maximum chaos mode, useful for testing.
|
||||
/// This causes things like locks to fail.
|
||||
pub static CHAOS_MODE: RelaxedAtomicBool = RelaxedAtomicBool::new(false);
|
||||
|
||||
@@ -272,8 +272,6 @@ fn test_history_races() {
|
||||
// Ensure history is clear.
|
||||
History::new(L!("race_test")).clear();
|
||||
|
||||
// history::CHAOS_MODE.store(true);
|
||||
|
||||
let mut children = Vec::with_capacity(RACE_COUNT);
|
||||
for i in 0..RACE_COUNT {
|
||||
children.push(std::thread::spawn(move || {
|
||||
@@ -295,7 +293,6 @@ fn test_history_races() {
|
||||
|
||||
// Ensure that we got sane, sorted results.
|
||||
let hist = History::new(L!("race_test"));
|
||||
history::CHAOS_MODE.store(false);
|
||||
|
||||
// History is enumerated from most recent to least
|
||||
// Every item should be the last item in some array
|
||||
|
||||
Reference in New Issue
Block a user