public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] tst_device: Print info about acquiring device
@ 2024-05-27 20:28 Petr Vorel
  2024-05-27 20:28 ` [LTP] [PATCH 2/2] tst_test: Don't print hints if failed to acquire Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Petr Vorel @ 2024-05-27 20:28 UTC (permalink / raw)
  To: ltp

Print how much space is being acquired. Also print hint on ENOSPC.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/tst_device.c b/lib/tst_device.c
index d659b54cf..635b39d08 100644
--- a/lib/tst_device.c
+++ b/lib/tst_device.c
@@ -289,8 +289,10 @@ const char *tst_acquire_loop_device(unsigned int size, const char *filename)
 {
 	unsigned int acq_dev_size = size ? size : DEV_SIZE_MB;
 
+	tst_resm(TINFO, "Acquiring loop device %u MB", acq_dev_size);
 	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?)" : "");
 		return NULL;
 	}
 
-- 
2.43.0


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-30 14:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox