\
if (!(cond)) { \
ut_fail(uts, __FILE__, __LINE__, __func__, #cond); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
if (!(cond)) { \
ut_failf(uts, __FILE__, __LINE__, __func__, #cond, \
fmt, ##args); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
#expr1 " == " #expr2, \
"Expected %#x (%d), got %#x (%d)", \
_val1, _val1, _val2, _val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
(unsigned long long)_val1, \
(unsigned long long)_val2, \
(unsigned long long)_val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
#expr1 " = " #expr2, \
"Expected \"%s\", got \"%s\"", _val1, _val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
#expr1 " = " #expr2, \
"Expected \"%.*s\", got \"%.*s\"", \
_len, _val1, _len, _val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
#expr1 " = " #expr2, \
"Expected \"%s\", got \"%s\"", \
__buf1, __buf2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
#expr1 " = " #expr2, \
"Expected %p, got %p", _val1, _val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
#expr1 " = " #expr2, \
"Expected %lx, got %lx", _val1, _val2); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
#expr " != NULL", \
"Expected NULL, got %p", _val); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
#expr " = NULL", \
"Expected non-null, got NULL"); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
#expr " = NULL", \
"Expected pointer, got error %ld", \
PTR_ERR(_val)); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
"console", "\nExpected '%s',\n got '%s'", \
uts->expect_str, uts->actual_str); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
"console", "\nExpected '%s',\n got '%s'", \
uts->expect_str, uts->actual_str); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
if (ut_check_skipline(uts)) { \
ut_failf(uts, __FILE__, __LINE__, __func__, \
"console", "\nExpected a line, got end"); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
"console", "\nExpected '%s',\n got to '%s'", \
uts->expect_str, uts->actual_str); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
ut_failf(uts, __FILE__, __LINE__, __func__, \
"console", "Expected no more output, got '%s'",\
uts->actual_str); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})
"console", \
"Expected dump of length %x bytes, got '%s'", \
total_bytes, uts->actual_str); \
- __ret = CMD_RET_FAILURE; \
+ return CMD_RET_FAILURE; \
} \
__ret; \
})