Re: [RFC PATCH v2 2/2] trace2: don't overload target directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 02, 2019 at 03:02:35PM -0700, Josh Steadmon wrote:
> +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.

> +		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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux