kfdtest: Implement SuspendAndWakeUp()

Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Yong Zhao authored and Yong Zhao committed 2019-09-06 11:11:49 -04:00
1 γονέας 01957d4da3
υποβολή 9048fb5a1a
3 files changed
+28 -7

No files matched your search

@@ -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) {