0

I want to see the commands that are ran by the coreutils test commands. For example, assuming that I am running the inode.sh test of ls, I do:

 make check TESTS=tests/ls/inode.sh VERBOSE=yes SUBDIRS=.

I would like to see exactly which 'ls' commands the test is running. That is to say which ls commands are run by inode.sh. Any idea?

10
  • Are you trying to see the commands run by the tests/ls/inode.sh script? Or the commands run by make itself? What do you see when you run that command exactly? You could try adding SHELL+=-x to that command line to see more. Commented May 12, 2015 at 21:20
  • I would like to see the 'ls' commands run by tests. When I run the command above I just see the test result: OK or FAIL. Commented May 12, 2015 at 21:22
  • The SHELL+=-x argument might do that but probably won't. You can look at the script presumably or edit it to add set -x to the top. But beyond that if you can't control the execution of the script I'm not sure what else you can do. Commented May 12, 2015 at 21:25
  • I've just tried, I actually see a giant output, but no the ls commands Commented May 12, 2015 at 21:48
  • Can you not just look at the script in question directly? Commented May 12, 2015 at 22:03

1 Answer 1

1

How about:

strace -f -e execve -o execs.out \
make check TESTS=tests/ls/inode.sh VERBOSE=yes SUBDIRS=.
grep -F src/ execs.out
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.