[LTP] Rename tst_test_* to tst_require_*

Li Wang liwang@redhat.com
Fri Oct 11 15:28:46 CEST 2019


On Fri, Oct 11, 2019 at 9:03 PM Clemens Famulla-Conrad <
cfamullaconrad@suse.de> wrote:

> On Fri, 2019-10-11 at 12:06 +0200, Petr Vorel wrote:
> > Hi,
> >
> > Cc: Li and Clemens
> >
> > > these patches rename tst_test_* to tst_require_*, to better
> > > describe
> > > their use. There is also tst_require_root, that has the same
> > > behavior: It also calls tst_brk in case of a failing requirement.
> > > You can also get this patch from the following repo:
> > > https://github.com/MofX/ltp/commits/rename_tst_test-tst_require
> >
> > sorry for not thinking first, I wonder if we want to sync
> > tst_test_* (function name) vs $TST_NEEDS_* (test API variable name),
> > e.g.: tst_require_drivers $TST_NEEDS_DRIVERS
>
> I fully agree with Petr that we must be consistent in naming between
> variable- and function-name.
>

+1


>
> >
> > i.e. either of these:
> > s/tst_test_/tst_needs_/
> > s/TST_NEEDS_/TST_REQUIRE_/
> >
> > I consider *require* as more descriptive than *needs*,
> > but changing to *require* would require more work :).
>
> If we use needs or require ? Hard question - when I search for synonyms
> from one or the other, I don't see a big different. Without looking on
> the impact, require sounds also more descriptive.
>

Yes, I have the same feeling here.

FYI:
  needs: because it's important
  require: because it's a necessity

https://www.englishcurrent.com/grammar/difference-need-require-verbs/

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191011/f0a81006/attachment-0001.htm>


More information about the ltp mailing list