aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeihong Zhang <weihong.zhang@intel.com>2022-08-22 17:48:12 +0800
committerTony Luck <tony.luck@intel.com>2022-08-24 15:27:32 -0700
commitf5b2f7a2f16203c681b50f2ffe69d27399df0592 (patch)
tree0ec2eaecb8a02c6c5fd2f66ff82fb613a713b730
parent6f2cde4f206f8f52a6d7363853cfe70b3f2ebb83 (diff)
downloadmce-test-f5b2f7a2f16203c681b50f2ffe69d27399df0592.tar.gz
mce-test: Fix some typos in thugetlb.c
1) copy/paste in error message prints "put_semaphore" instead of "get_semaphore" 2) Spurious ";" on "if" statement means incorrect execution. Signed-off-by: Weihong Zhang <weihong.zhang@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--cases/function/hwpoison/thugetlb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cases/function/hwpoison/thugetlb.c b/cases/function/hwpoison/thugetlb.c
index 92dc7d2..32098f5 100644
--- a/cases/function/hwpoison/thugetlb.c
+++ b/cases/function/hwpoison/thugetlb.c
@@ -267,7 +267,8 @@ int main(int argc, char *argv[])
usleep(1000);
/* Wait for madvise() to be done */
if (get_semaphore(semid, &sembuffer))
- err("put_semaphore");
+ err("get_semaphore");
+
if (put_semaphore(semid, &sembuffer))
err("put_semaphore");
return 0;
@@ -294,7 +295,7 @@ int main(int argc, char *argv[])
goto cleanout;
}
- if (madvise_code != MADV_SOFT_OFFLINE);
+ if (madvise_code != MADV_SOFT_OFFLINE)
write_hugepage(addr, file_size, expected_addr);
read_hugepage(addr, file_size, expected_addr);