Skip to content

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

@MartyMacGyver

Description

@MartyMacGyver

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions