tests: storage: Remove unused test modes

EXP_WARN and ALLOW_PROBE flags for the testStorageChain cases are no
longer used so we can remove them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2019-12-17 17:49:36 +01:00
parent 7e582fe995
commit a649369480

View File

@ -242,8 +242,6 @@ struct _testFileData
enum { enum {
EXP_PASS = 0, EXP_PASS = 0,
EXP_FAIL = 1, EXP_FAIL = 1,
EXP_WARN = 2,
ALLOW_PROBE = 4,
}; };
struct testChainData struct testChainData
@ -288,25 +286,15 @@ testStorageChain(const void *args)
fprintf(stderr, "call should have failed\n"); fprintf(stderr, "call should have failed\n");
return -1; return -1;
} }
if (data->flags & EXP_WARN) {
if (virGetLastErrorCode() == VIR_ERR_OK) { if (virGetLastErrorCode()) {
fprintf(stderr, "call should have warned\n"); fprintf(stderr, "call should not have reported error\n");
return -1; return -1;
} }
virResetLastError();
if (virStorageFileChainGetBroken(meta, &broken) || !broken) { if (virStorageFileChainGetBroken(meta, &broken) || broken) {
fprintf(stderr, "call should identify broken part of chain\n"); fprintf(stderr, "chain should not be identified as broken\n");
return -1; return -1;
}
} else {
if (virGetLastErrorCode()) {
fprintf(stderr, "call should not have warned\n");
return -1;
}
if (virStorageFileChainGetBroken(meta, &broken) || broken) {
fprintf(stderr, "chain should not be identified as broken\n");
return -1;
}
} }
elt = meta; elt = meta;