test: shmobj: fix test program for #1381

Limitations tested in #1381 have been removed in #1458

Change-Id: I35b7ee058a75abc98f2a2ad783fdba46087b0716
Refs: #1519
This commit is contained in:
Yoshihisa Morizumi
2021-02-12 20:47:50 +09:00
committed by Masamichi Takagi
parent 47aec70f5f
commit b380f0790d
2 changed files with 20 additions and 19 deletions

View File

@@ -52,13 +52,12 @@ int main(int argc, char **argv)
memset(addr, 'a', size);
errno = 0;
err = munmap(addr + size - ps, ps);
if (err == -1 && errno == EINVAL) {
printf("[OK] munmap returned %d and errno: EINVAL\n", err);
}
else {
printf("[NG] munamp succceeded\n");
if (err == 0 && errno == 0) {
printf("[OK] munamp succceeded\n");
} else {
printf("[NG] munmap returned %d and errno: %d\n",
err, errno);
ret = -1;
// goto out;
}
printf("** Case 2: size is aligned on large page\n");
@@ -72,13 +71,12 @@ int main(int argc, char **argv)
memset(addr, 'a', size);
errno = 0;
err = munmap(addr + size - ps, ps);
if (err == -1 && errno == EINVAL) {
printf("[OK] munmap returned %d and errno: EINVAL\n", err);
}
else {
printf("[NG] munamp succceeded\n");
if (err == 0 && errno == 0) {
printf("[OK] munamp succceeded\n");
} else {
printf("[NG] munmap returned %d and errno: %d\n",
err, errno);
ret = -1;
// goto out;
}
printf("** Case 3: size is NOT aligned on large page\n");