Re: [RFC PATCH v2 2/2] trace2: don't overload target directories
From: Josh Steadmon <hidden>
Date: 2019-08-05 18:09:10
From: Josh Steadmon <hidden>
Date: 2019-08-05 18:09:10
On 2019.08.05 20:01, SZEDER Gábor wrote:
On Fri, Aug 02, 2019 at 03:02:35PM -0700, Josh Steadmon wrote:quoted
+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.
Understood. Will remove in V3.