Test "Wait for LWK to run at shutdown." on arm64

Change-Id: I96785dda7a1a7eb36ceeb31401d71b4e40efb185
Refs: #898
Refs: #928
This commit is contained in:
Shiratori, Takehiro
2018-12-03 20:06:37 +09:00
parent de70eac619
commit 3f11c1aee5
34 changed files with 2825 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
/* ct_okng.h COPYRIGHT FUJITSU LIMITED 2018 */
#ifndef _CT_OKNG_H
#define _CT_OKNG_H
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
fflush(stdout); \
} \
else { \
char buf[65536]; \
char cmd[256]; \
FILE* fp = NULL; \
size_t nread = 0; \
\
printf("[NG] "); \
printf(__VA_ARGS__); \
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix); \
fp = popen(cmd, "r"); \
nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
fflush(stdout); \
goto fn_fail; \
} \
} while(0)
#endif /* _CTOKNG_H */