echo "Sometime between 2022-07-01 and 2022-10-01 MIRI stopped exposing its vtable"
echo "simulation, so any tests using the queue/flat.rs implementation will fail."
echo "Those tests are now skipped. This means that it's no longer possible to check"
echo "for undefined behaviour in that queue implementation, unless you use an old "
echo "nightly. (It does pass with 2022-07-01 nightlies, though.)"
echo ""
export MIRIFLAGS=-Zmiri-disable-isolation
./run-feature-combinations | while read FEATURES
do
echo === $FEATURES
case "$FEATURES" in
*no-unsafe*) ;;
*)
echo "*** SKIPPING test that uses queue/flat.rs because MIRI no longer exposes vtable simulation ***"
continue;;
esac
case "$FEATURES" in
*multi-*)
cargo +nightly miri test $FEATURES || exit 1
continue;;
esac
COMMAND="cargo +nightly miri test --lib $FEATURES"
echo "*** Applying work-around for testing single-threaded tests ***"
FLAG_FAILED=/tmp/stakker-run-test-all-aux-$$-flag
FLAG_TESTED=/tmp/stakker-run-test-all-aux-$$-tested
TMPOUT=/tmp/stakker-run-test-all-aux-$$-out
rm -f $FLAG_FAILED >&/dev/null
rm -f $FLAG_TESTED >&/dev/null
$COMMAND -- --list 2>/dev/null |
grep ': test' |
perl -pe 's/: test$//;' |
while read xx
do
if $COMMAND -- --exact "$xx" >$TMPOUT 2>&1
then
grep "test .* [.][.][.]" $TMPOUT || cat $TMPOUT
else
echo "=== $xx"
cat $TMPOUT
touch $FLAG_FAILED
fi
rm $TMPOUT
touch $FLAG_TESTED
done
[ ! -f $FLAG_TESTED ] && {
$COMMAND -- --list
echo "NO TESTS WERE FOUND. Check run-miri-test-all script. Maybe output of --list has changed?"
rm -f $FLAG_FAILED >&/dev/null
exit 1
}
rm -f $FLAG_TESTED >&/dev/null
[ -f $FLAG_FAILED ] && {
rm $FLAG_FAILED
exit 1
}
cargo +nightly miri test --doc $FEATURES || exit 1
done