Skip to content

Commit

Permalink
tst_test: Print used temporary dir and its filesystem
Browse files Browse the repository at this point in the history
It helps debugging to know used filesystem (and in case of
TST_ALL_FILESYSTEMS=1 the underlying filesystem). This follows
5cabf2b change in C API, using 'stat' which should work also on
busybox.

Missing 'stat' binary (or busybox symlink) does not break test (just the
output is mangled), thus 'stat' presence is not tested/required.

Link: https://lore.kernel.org/ltp/20240726095546.1041726-4-pvorel@suse.cz/
Reviewed-by: Avinesh Kumar <akumar@suse.de>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed Aug 21, 2024
1 parent a406d92 commit c139240
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions testcases/lib/tst_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ tst_run()

TST_STARTWD=$(pwd)
cd "$TST_TMPDIR"
tst_res TINFO "Using $TST_TMPDIR as tmpdir ($(stat -f -c '%T' $TST_TMPDIR) filesystem)"
fi

# needs to be after cd $TST_TMPDIR to keep test_dev.img under $TST_TMPDIR
Expand Down

0 comments on commit c139240

Please sign in to comment.