diff --git a/tests/run.sh b/tests/run.sh index 23c4fe5..9ae4071 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -73,7 +73,8 @@ $B -t -a 0x8123 | grep -q 'block 0x8000 + 0x1000' && echo "ok -a 0x8123: the t 2 "-t, protected by BP bits" MS_SR=1c0000 MS_PROTECT=1 $B -t t 2 "-t Macronix, BP3 alone protects" MS_MACRONIX=1 MS_SR=20ff07 MS_PROTECT=1 $B -t MS_MACRONIX=1 MS_SR=20ff07 $B -t | grep -q 'SR1 = 0x20: BP = 8' && echo "ok -t Macronix names BP3" || { echo "FAIL -t Macronix BP3"; fail=1; } -MS_MACRONIX=1 MS_SR=40ff07 $B -t | grep -q 'PROTECTED' && { echo "FAIL -t Macronix QE taken for protection"; fail=1; } || echo "ok -t Macronix: QE is not a protection, ff and 07 are not read as registers" +t 0 "-t Macronix: QE is not a protection, ff and 07 are not read as registers" MS_MACRONIX=1 MS_SR=40ff07 $B -t +t 1 "-t Macronix: an erase that fails is a failure, not protection" MS_MACRONIX=1 MS_SR=40ff07 MS_FAIL=erase $B -t cp before.img chip.img; MS_SR=1c0000 $B -t | grep -q 'PROTECTED, the registers protect part.*-u' && MS_SR=1c0000 $B -t | grep -q 'BP = 7, TB = 0' && cmp -s chip.img before.img && echo "ok says PROTECTED, the bits and -u, and erases nothing" || { echo "FAIL -t protected"; fail=1; } t 2 "-t, nothing changes, no bits set" MS_PROTECT=1 $B -t MS_PROTECT=1 $B -t | grep -q 'no register bit says so' && echo "ok a block that keeps its data with no bit set: told apart" || { echo "FAIL -t hidden protection"; fail=1; }