All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] Add tst_tmpdir_path() and tst_tmpdir_mkpath()
Date: Wed, 17 Jul 2024 10:31:16 +0200	[thread overview]
Message-ID: <20240717083116.GA587967@pevik> (raw)
In-Reply-To: <20240717082547.GA584952@pevik>

Hi Cyril,

...
> > +/**
> > + * tst_tmpdir_path - Returns a pointer to a tmpdir path.
> > + *
> > + * The returned path is allocated and initialized the first time this function is
> > + * called, each subsequent call will return the same pointer.
> > + *
> > + * @return A newly allocated path. The memory is freed automatically at the end
> Return must be 'return:', otherwise it's not recognised.

>     * return: A newly allocated path. The memory is freed automatically at the end

> > + *         of the test. If allocation fails the function calls tst_brk() and
> > + *         exits the test.
> > + */

Also, formatting other lines with indent makes " A newly allocated path. The
memory is freed automatically at the end" to be bold. The correct formatting is
therefore without indent:

/**
 * tst_tmpdir_path - Returns a pointer to a tmpdir path.
 *
 * The returned path is allocated and initialized the first time this function is
 * called, each subsequent call will return the same pointer.
 *
 * return: A newly allocated path. The memory is freed automatically at the end
 * of the test. If allocation fails the function calls tst_brk() and
 * exits the test.
 */
char *tst_tmpdir_path(void);

/**
 * tst_tmpdir_mkpath - Construct an absolute path pointing to a file inside tmpdir.
 *
 * Constructs a path inside tmpdir i.e. adds a prefix pointing to the current
 * test tmpdir to the string build by the printf-like format.
 *
 * @fmt: A printf-like format string.
 * @...: A printf-like parameter list.
 *
 * return: A newly allocated path. The memory is freed automatically at the end
 * of the test. If allocation fails the function calls tst_brk() and exits the
 * test.
 */
char *tst_tmpdir_mkpath(const char *fmt, ...)
	__attribute__((format(printf, 1, 2)));


Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-07-17  8:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 13:44 [LTP] [PATCH] Add tst_tmpdir_path() and tst_tmpdir_mkpath() Cyril Hrubis
2024-07-17  8:25 ` Petr Vorel
2024-07-17  8:31   ` Petr Vorel [this message]
2024-07-22 13:06     ` Petr Vorel
2024-07-22 13:10       ` Cyril Hrubis
2024-07-23 15:17         ` Andrea Cervesato via ltp
2024-07-24  7:42           ` Petr Vorel
2024-07-24  8:44             ` Cyril Hrubis
2024-07-24  9:01               ` Andrea Cervesato via ltp
2024-07-24  9:05                 ` Petr Vorel
2024-07-17  8:33   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240717083116.GA587967@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.