[LTP] [PATCH] tmpdir: rename tst_tmpdir_mkpath to tst_tmpdir_genpath
Cyril Hrubis
chrubis@suse.cz
Tue Sep 10 10:52:29 CEST 2024
Hi!
> When I reviewed the rename15 patch I felt confused a while on
> function like tst_tmpdir_mkpath (reminds me of: mkdir).
>
> Because the name could be misleading since it suggests that a
> file or directory is being created, when in fact it is simply
> constructing a path inside a temporary directory without
> actually creating any files.
Good catch, this is indeed confusing.
> To make the function's purpose clearer, the name should reflect
> that it is only constructing or generating a path, not creating
> any files or directories.
>
> So I think either 'tst_tmpdir_genpath' or 'tst_tmpdir_buildpath'
> would be concise and clear options.
Maybe tst_tmpdir_getpath()?
But I agree that any of these three is better than the original. Naming
API functions is hard...
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list