Commit c9d17ad0 authored by Fam Zheng's avatar Fam Zheng Committed by Kevin Wolf
Browse files

qemu-iotests: Fail test if explicit test case number is unknown



When we expand a number range, we just print "$id - unknown test,
ignored", this is convenient if we want to run a range of tests.

When we designate a test case number explicitly, we shouldn't just
ignore it if the case script doesn't exist.

Print an error and fail the test.

Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 9aebf3b8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -376,10 +376,16 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \
                    echo $id >>$tmp.list
                else
                    # oops
                    if [ "$start" == "$end" -a "$id" == "$end" ]
                    then
                        echo "$id - unknown test"
                        exit 1
                    else
                        echo "$id - unknown test, ignored"
                    fi
                fi
        done
            fi
        done || exit 1
    fi

done