X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ffunctional%2Fipc_shm.c;h=980743697a072e949cb9a734bf86048b3df6e1cb;hb=05b75aa5eb2a9908495c341300a2acc19e9eaf4b;hp=2c87e2c5ac41d9913ef8122248747f2f534a5683;hpb=a5138aacb2d7b0cf08e6ac9d5ddb8d2841ae2c30;p=libc-test diff --git a/src/functional/ipc_shm.c b/src/functional/ipc_shm.c index 2c87e2c..9807436 100644 --- a/src/functional/ipc_shm.c +++ b/src/functional/ipc_shm.c @@ -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)); }