blog icon indicating copy to clipboard operation
blog copied to clipboard

Problems with scripts/dd_ibs_test.sh and scripts/dd_obs_test.sh

Open MartyMacGyver opened this issue 7 years ago • 2 comments

First, thanks for the handy scripts! Needed to tweak them to make them work though...

Testing this with bash 4.3 on Raspbian, the scripts silently exit without running the tests.

Seems the following line is the problem: [ -e "$TEST_FILE" ]; TEST_FILE_EXISTS=$?

This test appears to be entirely redundant (and for some reason it causes an early exit as well).

With that, the last line would also simplify from [ $TEST_FILE_EXISTS -ne 0 ] && rm $TEST_FILE to rm $TEST_FILE

Now, I wonder what the purpose of that problematic line above was, exactly? It seems like if a file exists 'ibs' will early exit anyway (with a message), and 'obs' doesn't even have the (working) existence check seen in 'ibs'. Thoughts?

MartyMacGyver avatar Oct 19 '16 08:10 MartyMacGyver