kfdtest: Implement SuspendAndWakeUp()

Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 9048fb5a1a]
Dieser Commit ist enthalten in:
Yong Zhao
2019-08-14 20:34:44 -04:00
committet von Yong Zhao
Ursprung b8c767b42a
Commit 9b1e0f5a5e
3 geänderte Dateien mit 28 neuen und 7 gelöschten Zeilen
@@ -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) {