8000 test · util-linux/util-linux@8bbceea · GitHub
[go: up one dir, main page]

Skip to content

Commit 8bbceea

Browse files
committed
test
1 parent 64d2ed1 commit 8bbceea

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

misc-utils/fincore.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <getopt.h>
2626
#include <stdio.h>
2727
#include <string.h>
28+
#include <gnu/libc-version.h>
2829

2930
#ifdef HAVE_FTS_OPEN
3031
#include <fts.h>
@@ -562,15 +563,19 @@ int main(int argc, char ** argv)
562563

563564
if (ctl.recursive) {
564565
#ifdef HAVE_FTS_OPEN
566+
printf("recursive with fts_open(), libc version: %s\n", gnu_get_libc_version());
565567
FTS *fts = fts_open(argv + optind, FTS_PHYSICAL, NULL);
566568
FTSENT *ent;
567569

568570
if (!fts) {
569571
warn(_("failed to iterate tree"));
570572
rc = EXIT_FAILURE;
571573
} else {
574+
printf("fts_open\n");
572575
while ((ent = fts_read(fts)) != NULL) {
576+
printf("fts_read: fts_path: '%s', fts_info: %x\n", ent->fts_path, ent->fts_info);
573577
if (ent->fts_info == FTS_F || ent->fts_info == FTS_DEFAULT) {
578+
printf("ent: %s\n", ent->fts_path);
574579
/* fts changes directory when iterating,
575580
* so we need to use .fts_accpath to access
576581
* the file named .fts_path */

tests/ts/fincore/count

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,46 @@ if [ -n "$RECURSIVE" ]; then
257257
run_dd_test "dir/JUST PAGESIZE(incore)" $(( PAGE_SIZE ))
258258
} >> $TS_OUTPUT 2>> $TS_ERRLOG
259259

260+
echo ' -------------------- DEBUG ---------------------- '
261+
262+
echo 'uname -a'
263+
uname -a
264+
265+
echo 'dpkg -l libc6'
266+
dpkg -l libc6
267+
268+
echo 'cat /proc/cpuinfo'
269+
cat /proc/cpuinfo
270+
271+
echo "ldd /bin/cat"
272+
ldd /bin/cat
273+
274+
echo 'cat /proc/mounts'
275+
cat /proc/mounts
276+
277+
echo "stat -f $PWD"
278+
stat -f "$PWD"
279+
280+
echo 'ls -lhA i_dir'
281+
ls -lhA i_dir
282+
283+
echo 'find i_dir -ls'
284+
find i_dir -ls
285+
286+
echo "RUN: $TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --raw i_dir/*"
287+
$TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --raw i_dir/*
288+
echo "END: EXIT $?"
289+
290+
echo "RUN: $TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --recursive --raw i_dir |sort"
291+
$TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --recursive --raw i_dir |sort
292+
echo "END: EXIT $?"
293+
294+
echo "RUN: $TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --recursive --raw i_dir"
295+
$TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --recursive --raw i_dir
296+
echo "END: EXIT $?"
297+
298+
echo ' -------------------- /DEBUG ---------------------- '
299+
260300
ts_log_both "[ RECURSIVE SCAN ]"
261301
{
262302
$TS_CMD_FINCORE --raw --output $OUT_COLUMNS --bytes --recursive --raw i_dir |sort

0 commit comments

Comments
 (0)
0