Skip to content

DEBUG: fincore/count recursive debug #3551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

teknoraver
Copy link
Contributor

No description provided.

@teknoraver teknoraver force-pushed the fincore_mu_debug branch 4 times, most recently from b8f6ce3 to 55661c7 Compare May 5, 2025 16:38
teknoraver and others added 2 commits May 5, 2025 19:00
Add a --recursive flag to fincore which allows to recursively scan
directories.

Co-authored-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Matteo Croce <teknoraver@meta.com>
@teknoraver teknoraver force-pushed the fincore_mu_debug branch 3 times, most recently from 9ad8ecb to 3212a1b Compare May 5, 2025 18:24
@masatake
Copy link
Member

masatake commented May 5, 2025

strace has 'append-mode'. I guess it helps you.

      -A
       --output-append-mode
                   Open the file provided in the -o option in append mode.

@teknoraver
Copy link
Contributor Author

I created an armv7 locally and here the output is:

$ .libs/fincore -R i_dir
recursive
fts_open
fts_read: fts_path: 'i_dir', fts_info: 1
fts_read: fts_path: 'i_dir/EMPTY_FILE', fts_info: 8
ent: i_dir/EMPTY_FILE
fts_read: fts_path: 'i_dir/PAGESIZE_-1__incore_', fts_info: 8
ent: i_dir/PAGESIZE_-1__incore_
fts_read: fts_path: 'i_dir/JUST_PAGESIZE_incore_', fts_info: 8
ent: i_dir/JUST_PAGESIZE_incore_
fts_read: fts_path: 'i_dir', fts_info: 6
RES PAGES SIZE FILE
 0B     0   0B i_dir/EMPTY_FILE
 0B     0  32B i_dir/PAGESIZE_-1__incore_
 0B     0   4K i_dir/JUST_PAGESIZE_incore_

While in the CI is:

recursive
fts_open
fts_read: fts_path: 'i_dir', fts_info: 1
fts_read: fts_path: 'i_dir', fts_info: 6

The flags are respectively FTS_D and FTS_DP.
It's like fts_read() doesn't see the directory members in i_dir

@karelzak
Copy link
Collaborator

karelzak commented May 6, 2025

By the way, gnulib has a private FTS implementation that differs from glibc. https://github.com/coreutils/gnulib/blob/master/lib/fts.c

@teknoraver
Copy link
Contributor Author

By the way, gnulib has a private FTS implementation that differs from glibc. https://github.com/coreutils/gnulib/blob/master/lib/fts.c

I know, I faced it when doing the first mu implementation, which was based on du.
And the gnulib does some weird stuff, like ignoring FTS_NOSTAT etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants