[PATCH] Print cwd path to AT_FDCWD when -y (--decode-fd=path) flag is used
Dmitry V. Levin
ldv at altlinux.org
Mon Nov 29 16:11:13 UTC 2021
On Wed, Oct 06, 2021 at 08:36:33PM +0200, Renaud Métrich wrote:
> Hi,
>
> This set of patches enables to resolve the AT_FDCWD dirfd, which is very
> useful when syscalls perform an operation on the cwd and relative
> pathname, avoiding the need to search for the pwd, which is sometimes
> just not available.
>
> Also available as a PR: https://github.com/strace/strace/pull/194
This is now merged into master, thanks for the nice feature!
> The patch is split into 4 pieces for now because I found out that the
> filter on --decode-fds=path isn't used at all in current strace code:
> paths get decoded as soon as --decode-fds=<something> is used.
>
> Since I don't know if this is really the expected behaviour, I kept the
> commits separated in case we just want decoding when --decode-fd=path is
> specified only:
>
> - 0001 only decodes when --decode-fd=path is specified
>
> - 0002 decodes whenever --decode-fd=<something> is specified
>
> The other commits are unit tests.
We have a policy that no commit should knowingly break the test suite, so
when the strace output changes, test suite has to be adjusted in the same
commit. I did it for you this time, but next time please remember not to
break the test suite by intermediate commits.
--
ldv
More information about the Strace-devel
mailing list