This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/5] tests: Add test to check for unknown DWARF codes.

> Lets see if we can make the tool output nicer first in the other patch.
> I don't think printing unknown is ugly.

On purely aesthetic matters, it's objective fact that I am right. ;-)

> Will fix indentation. Now I am confused about the "$@" vs $* though.

"$@" alone (with quotes) is special.  It matters when you're using it where
it expands to multiple words, like for arguments.  When it's: echo "foo $*
bar" then it makes no difference to use $@ or $* but $* is canonical.

	foo() { printf '|%s|%s|\n' "$@"; }
	foo 'a b' 'c d'
	bar() { printf '|%s|%s|\n' $*; }
	bar 'a b' 'c d'
	baz() { printf '|%s|%s|\n' "$*"; }
	baz 'a b' 'c d'

> I think this was just cargo cult from testrun_out () above.
> But I don't know precisely what you mean by running testrun,
> we also do need to capture the output. But I'll look into rephrasing the
> function.

I meant 'testrun ... > $tempfile' rather than 'testrun ... | ...'.
With a pipeline you can't distinguish which part of the pipeline failed.

testrun_out also redirects stderr, and ignores errors with '|| :'.
It's for cases where we're matching the whole output including stderr,
so we can match expected error/warning messages or verify that there
were none.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]