Bug 14906

Summary: find -atime does not follow the actual atime
Product: Busybox Reporter: Gordon <zhaoyitengfs>
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.35.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Gordon 2022-07-11 05:01:24 UTC
The integrated find -atime option does not follow the access time of the file. I believe it is still referencing the mtime from my testing. The GNU version (findutils) does not have this issue.

Output:
/test # find --help
BusyBox v1.35.0 (2022-05-09 17:27:12 UTC) multi-call binary.

Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]
...
/test # stat old
  File: old
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 0,107   Inode: 692229      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-07-09 03:26:00.000000000 +0000
Modify: 2022-07-01 03:26:00.000000000 +0000
Change: 2022-07-11 03:36:15.549088648 +0000
 Birth: -
/test # date
Mon Jul 11 03:36:27 UTC 2022
/test # find . -atime +1
./old
/test # find . -atime +3
./old
/test # find . -atime +10
/test #

Expected:
/test # find . -atime +1
./old
/test # find . -atime +3
/test # 

Environment:
Alpine Linux 3.16.0 (Docker Image/Busybox v1.35.0) w/ Kernel 5.17.11