Re: [GSOC][RFC] microproject: use test_path_is_* functions in test scripts

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

 



Vincenzo MEZZELA <vincenzo.mezzela@xxxxxxxxx> writes:

> Approach:
>
> As far as I understood, The work consists in replacing the shell
> 'test' command in the test
> script under 't/' directory with the ones present in the
> t/test_lib_functions.sh as follows:
>
> - test -f --> test_path_is_file
>
> - test -d --> test_path_is_dir
>
> - test -e --> test_path_exists

One thing to note is that you'd need to make sure if "test -e" for
example originally written really means "we want to see something
there and it does not matter if it is a file or a directory" while
turning it into test_path_exists.  The operations that such a test
follows may be expected to create a file and never a directory, in
which case the condition the original code is testing may need to
be corrected first to expect a more specific type (e.g. "test -f").
The same comment applies for the other two.

Some tests check with "! test -f <path>", which often would want to
be turned into "test_path_is_missing", but you'd need to make sure
that is what the original test really meant to do.

A microproject is not about "doing the real work to help the
project".  It is a practice session to come up with a set of small
changes and explain them well, to send the result to the list to get
reviewed, to respond to reviews and possibly send updates, and to
repeat the cycle until completion.  So most likely you'd pick a
single file or two and do the above conversion, while leaving the
others as practice material for other GSoC participants.

Enjoy.





[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