Re: [RFC PATCH v2 2/2] trace2: don't overload target directories
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Aug 5, 2019, 18:01 UTC
- Message-ID
- <20190805180135.GD20404@szeder.dev>
- In-Reply-To
- <a779e272df958702c0df06ab58f1f6d6f8086a30.1564771000.git.steadmon@google.com>
On Fri, Aug 02, 2019 at 03:02:35PM -0700, Josh Steadmon wrote:
Show 12 quoted lines
> +test_expect_success "don't overload target directory" ' > + mkdir trace_target_dir && > + test_when_finished "rm -r trace_target_dir" && > + ( > + GIT_TRACE2_MAX_FILES=5 && > + export GIT_TRACE2_MAX_FILES && > + cd trace_target_dir && > + test_seq $GIT_TRACE2_MAX_FILES >../expected_filenames.txt && > + xargs touch <../expected_filenames.txt && > + cd .. && > + ls trace_target_dir >first_ls_output.txt && > + test_cmp expected_filenames.txt first_ls_output.txt &&
Nit: what's the purpose of this 'ls' and 'test_cmp'?
It looks like they check that xargs created all the files it was told to create. I think that this falls into the category "We are not in the business of verifying that the world given to us sanely works." and is unnecessary.
Show 8 quoted lines
> + GIT_TRACE2="$(pwd)/trace_target_dir" test-tool trace2 001return 0 > + ) && > + echo git-trace2-overload >>expected_filenames.txt && > + ls trace_target_dir >second_ls_output.txt && > + test_cmp expected_filenames.txt second_ls_output.txt > +' > + > test_done