Skip to content
Snippets Groups Projects
Commit 019bacbe authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

errinj: log error injection value

Let's log the new value when an error injection is set in orer to ease
debugging in tests.

NO_DOC=logging
NO_TEST=logging
NO_CHANGELOG=logging
parent 8a0013ea
No related branches found
No related tags found
No related merge requests found
...@@ -388,12 +388,15 @@ lbox_errinj_set(struct lua_State *L) ...@@ -388,12 +388,15 @@ lbox_errinj_set(struct lua_State *L)
switch (errinj->type) { switch (errinj->type) {
case ERRINJ_BOOL: case ERRINJ_BOOL:
errinj->bparam = lua_toboolean(L, 2); errinj->bparam = lua_toboolean(L, 2);
say_info("%s = %s", name, errinj->bparam ? "true" : "false");
break; break;
case ERRINJ_INT: case ERRINJ_INT:
errinj->iparam = luaT_checkint64(L, 2); errinj->iparam = luaT_checkint64(L, 2);
say_info("%s = %lld", name, (long long)errinj->iparam);
break; break;
case ERRINJ_DOUBLE: case ERRINJ_DOUBLE:
errinj->dparam = lua_tonumber(L, 2); errinj->dparam = lua_tonumber(L, 2);
say_info("%s = %g", name, errinj->dparam);
break; break;
default: default:
lua_pushfstring(L, "error: unknown injection type '%s'", name); lua_pushfstring(L, "error: unknown injection type '%s'", name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment