Skip to contentSkip to conversation

aiodio: Skip tests on tmpfs

PATCH In review Petr Vorel 3 participants 7 messages Jan 21, 2022

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/2 aiodio: Skip tests on tmpfs

tmpfs does not support O_DIRECT.

Used only on newly rewritten tests (old are currently using hardcoded paths in the runtest files).

---
Changes v1->v2:
Fix commit message.

Kind regards,
Petr

 testcases/kernel/io/ltp-aiodio/aiodio_append.c | 10 ++++++++--
 testcases/kernel/io/ltp-aiodio/dio_append.c    |  4 ++++
 testcases/kernel/io/ltp-aiodio/dio_read.c      |  4 ++++
 testcases/kernel/io/ltp-aiodio/dio_sparse.c    | 10 ++++++++--
 testcases/kernel/io/ltp-aiodio/dio_truncate.c  | 10 ++++++++--
 5 files changed, 32 insertions(+), 6 deletions(-)
testcases/kernel/io/ltp-aiodio/aiodio_append.c +8 -2
index cb04b04a57..46cc74ee4e 100644
@@ -131,8 +131,10 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
 }
 
 static void run(void)
@@ -177,6 +179,10 @@ static struct tst_test test = {
 		{"b:", &str_numaio, "Number of async IO blocks (default 16)"},
 		{}
 	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
 };
 #else
 TST_TEST_TCONF("test requires libaio and its development packages");
testcases/kernel/io/ltp-aiodio/dio_append.c +4 -0
index 59fd710e70..c099793f6c 100644
@@ -93,4 +93,8 @@ static struct tst_test test = {
 		{"c:", &str_appends, "Number of appends (default 1000)"},
 		{}
 	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
 };
testcases/kernel/io/ltp-aiodio/dio_read.c +4 -0
index 2c2ec4bce0..67a28147fd 100644
@@ -177,4 +177,8 @@ static struct tst_test test = {
 		{"s:", &str_filesize, "File size (default 128M)"},
 		{}
 	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
 };
testcases/kernel/io/ltp-aiodio/dio_sparse.c +8 -2
index 4ee2fbab18..39fc895d65 100644
@@ -83,8 +83,10 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
 }
 
 static void run(void)
@@ -129,4 +131,8 @@ static struct tst_test test = {
 		{"o:", &str_offset, "File offset (default 0)"},
 		{}
 	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
 };
testcases/kernel/io/ltp-aiodio/dio_truncate.c +8 -2
index 4bf11c9588..1fbf83de06 100644
@@ -107,8 +107,10 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
 }
 
 static void run(void)
@@ -163,4 +165,8 @@ static struct tst_test test = {
 		{"c:", &str_numwrites, "Number of append & truncate (default 100)"},
 		{}
 	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
 };
Signature · 5 lines
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#1 lore raw

PATCH v2 2/2 dio_sparse: Set timeout 30 min

Originally only ADSP075 failed (dio_sparse -w 518192k -s 518192k -n 1000) but just in case increase timeout for all newly rewritten tests.

---
Changes v1->v2:
Prolong the timeout only for dio_sparse (Martin)

Kind regards,
Petr

 testcases/kernel/io/ltp-aiodio/dio_sparse.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/io/ltp-aiodio/dio_sparse.c +1 -0
index 39fc895d65..0039daa8d1 100644
@@ -135,4 +135,5 @@ static struct tst_test test = {
 		"tmpfs",
 		NULL
 	},
+	.timeout = 1800,
 };
Signature · 5 lines
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by Andrea Cervesato on v2 2/2
#2 lore raw

Re: [LTP] [v2 PATCH 2/2] dio_sparse: Set timeout 30 min

Hi,

Quoted 24 lines · Petr Vorel

Originally only ADSP075 failed (dio_sparse -w 518192k -s 518192k -n 1000) but just in case increase timeout for all newly rewritten tests.

---
Changes v1->v2:
Prolong the timeout only for dio_sparse (Martin)

Kind regards,
Petr

  testcases/kernel/io/ltp-aiodio/dio_sparse.c | 1 +
  1 file changed, 1 insertion(+)
testcases/kernel/io/ltp-aiodio/dio_sparse.c +1 -0
index 39fc895d65..0039daa8d1 100644
@@ -135,4 +135,5 @@ static struct tst_test test = {
  		"tmpfs",
  		NULL
  	},
+	.timeout = 1800,
  };
Signature · 2 lines
-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Acked-by on v2 2/2
#3 lore raw

Re: [LTP] [v2 PATCH 2/2] dio_sparse: Set timeout 30 min

In reply to Petr Vorel

Hi,
the commit message needs an update due to changes but otherwise:

Quoted 24 lines · Petr Vorel

Originally only ADSP075 failed (dio_sparse -w 518192k -s 518192k -n 1000) but just in case increase timeout for all newly rewritten tests.

---
Changes v1->v2:
Prolong the timeout only for dio_sparse (Martin)

Kind regards,
Petr

 testcases/kernel/io/ltp-aiodio/dio_sparse.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/io/ltp-aiodio/dio_sparse.c +1 -0
index 39fc895d65..0039daa8d1 100644
@@ -135,4 +135,5 @@ static struct tst_test test = {
 		"tmpfs",
 		NULL
 	},
+	.timeout = 1800,
 };
Signature · 10 lines
Martin Doucha   [email protected]
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw

Re: [LTP] [v2 PATCH 2/2] dio_sparse: Set timeout 30 min

Hi Martin,

Quoted 2 lines

Hi,
the commit message needs an update due to changes but otherwise:

Thanks, again today!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Acked-by Andrea Cervesato on v2 1/2
#5 lore raw
In reply to Petr Vorel

Hi,

Quoted 128 lines · Petr Vorel

tmpfs does not support O_DIRECT.

Used only on newly rewritten tests (old are currently using hardcoded paths in the runtest files).

---
Changes v1->v2:
Fix commit message.

Kind regards,
Petr

  testcases/kernel/io/ltp-aiodio/aiodio_append.c | 10 ++++++++--
  testcases/kernel/io/ltp-aiodio/dio_append.c    |  4 ++++
  testcases/kernel/io/ltp-aiodio/dio_read.c      |  4 ++++
  testcases/kernel/io/ltp-aiodio/dio_sparse.c    | 10 ++++++++--
  testcases/kernel/io/ltp-aiodio/dio_truncate.c  | 10 ++++++++--
  5 files changed, 32 insertions(+), 6 deletions(-)
testcases/kernel/io/ltp-aiodio/aiodio_append.c +8 -2
index cb04b04a57..46cc74ee4e 100644
@@ -131,8 +131,10 @@ static void setup(void)
 
  static void cleanup(void)
  {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
  }
 
  static void run(void)
@@ -177,6 +179,10 @@ static struct tst_test test = {
  		{"b:", &str_numaio, "Number of async IO blocks (default 16)"},
  		{}
  	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
  };
  #else
  TST_TEST_TCONF("test requires libaio and its development packages");
testcases/kernel/io/ltp-aiodio/dio_append.c +4 -0
index 59fd710e70..c099793f6c 100644
@@ -93,4 +93,8 @@ static struct tst_test test = {
  		{"c:", &str_appends, "Number of appends (default 1000)"},
  		{}
  	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
  };
testcases/kernel/io/ltp-aiodio/dio_read.c +4 -0
index 2c2ec4bce0..67a28147fd 100644
@@ -177,4 +177,8 @@ static struct tst_test test = {
  		{"s:", &str_filesize, "File size (default 128M)"},
  		{}
  	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
  };
testcases/kernel/io/ltp-aiodio/dio_sparse.c +8 -2
index 4ee2fbab18..39fc895d65 100644
@@ -83,8 +83,10 @@ static void setup(void)
 
  static void cleanup(void)
  {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
  }
 
  static void run(void)
@@ -129,4 +131,8 @@ static struct tst_test test = {
  		{"o:", &str_offset, "File offset (default 0)"},
  		{}
  	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
  };
testcases/kernel/io/ltp-aiodio/dio_truncate.c +8 -2
index 4bf11c9588..1fbf83de06 100644
@@ -107,8 +107,10 @@ static void setup(void)
 
  static void cleanup(void)
  {
-	*run_child = 0;
-	SAFE_MUNMAP(run_child, sizeof(int));
+	if (run_child) {
+		*run_child = 0;
+		SAFE_MUNMAP(run_child, sizeof(int));
+	}
  }
 
  static void run(void)
@@ -163,4 +165,8 @@ static struct tst_test test = {
  		{"c:", &str_numwrites, "Number of append & truncate (default 100)"},
  		{}
  	},
+	.skip_filesystems = (const char *[]) {
+		"tmpfs",
+		NULL
+	},
  };
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#6 lore raw

Hi all,

thanks a lot for review, *this* patch merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp