Re: [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file)

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

 



Vincenzo Mezzela <vincenzo.mezzela@xxxxxxxxx> writes:

> Replace use of 'test -f' with 'test_path_is_file' helper functions from

Before "helper functions", we'd need another pair, e.g.

    and 'test ! -f' with 'test_path_is_missing'

otherwise the plurals in the remainder of the paragraph would not
make much sense.

> test-lib-functions.sh. These functions perform identical operations
> while enhancing debugging capabilities in case of test failures.



>
> In the context of this file, 'test ! -f' is meant to check if the file
> has been correctly cleaned, so it should be 'test ! -e'.
> Thus its usage is replaced with 'test_path_is_missing' instead of 
> '! test_path_is_file'.

Even if the test meant not to complain when there is something not a
regular file (e.g. a directory), "! test_path_is_file" is not the
right way to express it, so the way this paragraph is written is
somewhat misleading.  Something like

    The original used `test ! -f` but it did not mean that the tests
    are happy if a directory exists there.  It should have used
    `test ! -e`, and using test_path_is_missing matches the intent.

perhaps.





[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