From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] tst_device: Print info about acquiring device
Date: Wed, 29 May 2024 17:34:44 +0200 [thread overview]
Message-ID: <ZldLFAP5vAAecFv8@yuki> (raw)
In-Reply-To: <20240527202858.350200-1-pvorel@suse.cz>
Hi!
> + tst_resm(TINFO, "Acquiring loop device %u MB", acq_dev_size);
^
Maybe "Preallocating device size=%uMB" ?
Since we are at the file preallocation step at this point in the code.
> if (tst_prealloc_file(filename, 1024 * 1024, acq_dev_size)) {
> - tst_resm(TWARN | TERRNO, "Failed to create %s", filename);
> + tst_resm(TWARN | TERRNO, "Failed to create %s%s", filename,
> + errno == ENOSPC ? " (not enough space in $TMPDIR?)" : "");
I guess that we could print the $TMPDIR value here as well with:
tst_resm(TWARN | TERRNO, "Failed to create %s", filename);
if (errno == ENOSPC)
tst_resm(TWARN, "Not enough space at '%s'?", tst_get_tmpdir())
This leaks the memory though, that's because the tst_get_tmpdir() is ugly
function from the old library...
> return NULL;
> }
>
> --
> 2.43.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-05-29 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 20:28 [LTP] [PATCH 1/2] tst_device: Print info about acquiring device Petr Vorel
2024-05-27 20:28 ` [LTP] [PATCH 2/2] tst_test: Don't print hints if failed to acquire Petr Vorel
2024-05-29 17:51 ` Cyril Hrubis
2024-05-30 14:49 ` Petr Vorel
2024-05-28 6:03 ` [LTP] [PATCH 1/2] tst_device: Print info about acquiring device Andrea Cervesato via ltp
2024-05-28 7:50 ` Wei Gao via ltp
2024-05-29 15:34 ` Cyril Hrubis [this message]
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=ZldLFAP5vAAecFv8@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox