kfdtest: Implement SuspendAndWakeUp()

Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
이 커밋은 다음에 포함됨:
Yong Zhao 작성하고 Yong Zhao가 2019-09-06 11:11:49 -04:00를 커밋함
1 부모 01957d4da3
커밋 9048fb5a1a
3 파일이 변경됨
+28 -7

검색과 일치하는 파일 없음

+16 -2
파일 보기
@@ -87,8 +87,22 @@ HSAuint64 GetSystemTickCountInMicroSec() {
}
bool SuspendAndWakeUp() {
// TODO: Implement
return false;
printf("Please press any key after the system suspends....\n");
// Use "sudo apt install pm-utils" to install the "pm-suspend"
int ret = system("sudo pm-suspend");
if (ret == -1) {
printf("The system linux command could not be run!\n");
return false;
} else {
if (WEXITSTATUS(ret)) {
printf("Use 'sudo apt install pm-utils' to install 'pm-suspend' on Ubuntu\n");
return false;
}
}
return true;
}
void AcquirePrivilege(OS_PRIVILEGE priv) {