Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Loading