Test "Wait for LWK to run at shutdown." on arm64
Change-Id: I96785dda7a1a7eb36ceeb31401d71b4e40efb185 Refs: #898 Refs: #928
This commit is contained in:
30
test/mng_mod/issues/898_928/arm64/ct_okng.h
Normal file
30
test/mng_mod/issues/898_928/arm64/ct_okng.h
Normal 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 */
|
||||
Reference in New Issue
Block a user