* [LTP] [PATCH] lib/tst_mkfs: bugfix for lib/tst_mkfs.c
@ 2021-02-18 6:57 zhao gongyi
2021-02-18 10:26 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: zhao gongyi @ 2021-02-18 6:57 UTC (permalink / raw)
To: ltp
Tmpfs is the only one filesystem in many embedded system, so
LTP_DEV_FS_TYPE should be set to tmpfs in many testcases, for
example syscalls/chown04, and in these cases, tests will be failed
because there is no mkfs tool for tmpfs.
Signed-off-by: zhao gongyi <zhaogongyi@huawei.com>
---
lib/tst_mkfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/tst_mkfs.c b/lib/tst_mkfs.c
index 45dd83ad3..40141fead 100644
--- a/lib/tst_mkfs.c
+++ b/lib/tst_mkfs.c
@@ -44,6 +44,11 @@ void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void),
return;
}
+ if (!strcmp(fs_type, "tmpfs")) {
+ tst_resm_(file, lineno, TINFO, "Need not fomat for TMPFS filesystem");
+ return;
+ }
+
snprintf(mkfs, sizeof(mkfs), "mkfs.%s", fs_type);
if (fs_opts) {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] lib/tst_mkfs: bugfix for lib/tst_mkfs.c
2021-02-18 6:57 [LTP] [PATCH] lib/tst_mkfs: bugfix for lib/tst_mkfs.c zhao gongyi
@ 2021-02-18 10:26 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-02-18 10:26 UTC (permalink / raw)
To: ltp
Hi!
> + if (!strcmp(fs_type, "tmpfs")) {
> + tst_resm_(file, lineno, TINFO, "Need not fomat for TMPFS filesystem");
I've fixed typo and reworded this message a bit and pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-18 10:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-18 6:57 [LTP] [PATCH] lib/tst_mkfs: bugfix for lib/tst_mkfs.c zhao gongyi
2021-02-18 10:26 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox