Skip to content

Commit 425bc4d

Browse files
authored
DAOS-16817 test: add some sleep in dfs mtime check to accomodate CI (#16443)
some CI clusters seem to have out of synch client and servers causing dfs mtime check to fail. add some sleeps to accomodate for that. Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@hpe.com>
1 parent f888247 commit 425bc4d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/tests/suite/dfs_unit_test.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ static dfs_t *dfs_mt;
2121
static bool
2222
check_ts(struct timespec l, struct timespec r)
2323
{
24-
if (l.tv_sec == r.tv_sec)
24+
if (l.tv_sec == r.tv_sec) {
25+
if (l.tv_nsec >= r.tv_nsec)
26+
print_error("timestamp difference of %09ld nsec\n", l.tv_nsec - r.tv_nsec);
2527
return l.tv_nsec < r.tv_nsec;
26-
else
28+
} else {
29+
if (l.tv_sec >= r.tv_sec)
30+
print_error("timestamp difference of %jd sec\n", l.tv_sec - r.tv_sec);
2731
return l.tv_sec < r.tv_sec;
32+
}
2833
}
2934

3035
static void
@@ -1580,7 +1585,7 @@ run_time_tests(dfs_obj_t *obj, char *name, int mode)
15801585

15811586
printf("Start Time:\n");
15821587
printtimespec(first_ts);
1583-
1588+
usleep(10000);
15841589
if (S_ISREG(mode)) {
15851590
d_iov_set(&iov, buf, 64);
15861591
sgl.sg_nr = 1;

0 commit comments

Comments
 (0)