diff --git a/homework/scripts/grade-utils.sh b/homework/scripts/grade-utils.sh index aa1fa6ecd58..9823e9edeea 100755 --- a/homework/scripts/grade-utils.sh +++ b/homework/scripts/grade-utils.sh @@ -93,7 +93,7 @@ _run_tests_with() { local FAILED=0 for TEST in "${TESTS[@]}"; do local TEST_CMD="$CARGO test $* $TEST" - timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD 2>/dev/null" 1>&2 + timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD" 1>&2 case $? in 0) ;; 124) echo_err "Test timed out: $TEST_CMD"; FAILED=$((FAILED + 1));; diff --git a/homework/tests/list_set/main.rs b/homework/tests/list_set/main.rs index db72a84c744..bcd66be4754 100644 --- a/homework/tests/list_set/main.rs +++ b/homework/tests/list_set/main.rs @@ -1,2 +1,5 @@ +// optimistic_fine_grained on thread santizer has very unstable performance on gg. +#![feature(cfg_sanitize)] + mod fine_grained; mod optimistic_fine_grained; diff --git a/homework/tests/list_set/optimistic_fine_grained.rs b/homework/tests/list_set/optimistic_fine_grained.rs index 9b05e1a52a9..b87bbe79cb1 100644 --- a/homework/tests/list_set/optimistic_fine_grained.rs +++ b/homework/tests/list_set/optimistic_fine_grained.rs @@ -90,14 +90,14 @@ fn stress_sequential() { #[test] fn stress_concurrent() { - const THREADS: usize = 16; + const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 }; const STEPS: usize = 4096 * 16; set::stress_concurrent::>(THREADS, STEPS); } #[test] fn log_concurrent() { - const THREADS: usize = 16; + const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 }; const STEPS: usize = 4096 * 16; set::log_concurrent::>(THREADS, STEPS); } @@ -105,7 +105,7 @@ fn log_concurrent() { /// Check the consistency of iterator while other operations are running concurrently. #[test] fn iter_consistent() { - const THREADS: usize = 15; + const THREADS: usize = if cfg!(sanitize = "thread") { 3 } else { 15 }; const STEPS: usize = 4096 * 16; let set = OptimisticFineGrainedListSet::new();