X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ffunctional%2Fipc_shm.c;h=980743697a072e949cb9a734bf86048b3df6e1cb;hb=05b75aa5eb2a9908495c341300a2acc19e9eaf4b;hp=6863ad57a4780750193548fceee106a71decd529;hpb=cfa23cc1bd01f5c44d7746b8b1839f84d5e1b6eb;p=libc-test diff --git a/src/functional/ipc_shm.c b/src/functional/ipc_shm.c index 6863ad5..9807436 100644 --- a/src/functional/ipc_shm.c +++ b/src/functional/ipc_shm.c @@ -12,7 +12,7 @@ #include "test.h" static const char path[] = "."; -static const int id = 'x'; +static const int id = 'h'; #define T(f) do{ \ if ((f)+1 == 0) \ @@ -62,7 +62,9 @@ static void set() EQ((long)shmid_ds.shm_atime, 0, "got %ld, want %d"); EQ((long)shmid_ds.shm_dtime, 0, "got %ld, want %d"); if (shmid_ds.shm_ctime < t) - t_error("shmid_ds.shm_ctime >= t failed: got %ld, want %ld\n", (long)shmid_ds.shm_ctime, (long)t); + t_error("shmid_ds.shm_ctime >= t failed: got %ld, want >= %ld\n", (long)shmid_ds.shm_ctime, (long)t); + if (shmid_ds.shm_ctime > t+5) + t_error("shmid_ds.shm_ctime <= t+5 failed: got %ld, want <= %ld\n", (long)shmid_ds.shm_ctime, (long)t+5); /* test attach */ if ((p=shmat(shmid, 0, 0)) == 0) @@ -72,6 +74,8 @@ static void set() EQ(shmid_ds.shm_lpid, getpid(), "got %d, want %d"); if (shmid_ds.shm_atime < t) t_error("shm_atime is %ld want >= %ld\n", (long)shmid_ds.shm_atime, (long)t); + if (shmid_ds.shm_atime > t+5) + t_error("shm_atime is %ld want <= %ld\n", (long)shmid_ds.shm_atime, (long)t+5); strcpy(p, "test data"); T(shmdt(p)); }