juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.86k stars 958 forks source link

ltp syscall failed with utime03 case #2415

Open sanwan opened 2 years ago

sanwan commented 2 years ago

What happened: The utime03 case failed .

utime03.c:82: TFAIL: utime() did not set expected atime utime03.c:85: TFAIL: utime() did not set expected mtime tst_test.c:1431: TINFO: Testing on tmpfs tst_test.c:932: TINFO: Skipping mkfs for TMPFS filesystem tst_test.c:913: TINFO: Limiting tmpfs size to 32MB tst_test.c:1363: TINFO: Timeout per run is 0h 05m 00s utime03.c:76: TPASS: utime(TEMP_FILE, NULL) passed

Summary: passed 7 failed 2 broken 0 skipped 0 warnings 0

What you expected to happen: The utime03 case passed . How to reproduce it (as minimally and precisely as possible): Follow the action https://github.com/juicedata/test-ci/runs/7539542848?check_suite_focus=true . Anything else we need to know? No .

SandyXSD commented 2 years ago

Hard to reproduce. Related test code:

    mintime = tst_get_fs_timestamp();
    TST_EXP_PASS(utime(TEMP_FILE, NULL));
    maxtime = tst_get_fs_timestamp();
    SAFE_STAT(TEMP_FILE, &statbuf);

    if (statbuf.st_atime < mintime || statbuf.st_atime > maxtime)
        tst_res(TFAIL, "utime() did not set expected atime");

    if (statbuf.st_mtime < mintime || statbuf.st_mtime > maxtime)
        tst_res(TFAIL, "utime() did not set expected mtime");

Looks like something went wrong when handling setattr(atime=Now, mtime=Now).