[PATCH 1/4] testsuite: reorganize tests for compound literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Split the existing test in 2 as it contains 2 different cases.
Also move the test to 'linear/' subdir.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/{ => linear}/compound-literal00.c           |  0
 validation/linear/compound-literal01.c                 | 18 ++++++++++++++++++
 .../compound-literal02.c}                              | 10 +---------
 3 files changed, 19 insertions(+), 9 deletions(-)
 rename validation/{ => linear}/compound-literal00.c (100%)
 create mode 100644 validation/linear/compound-literal01.c
 rename validation/{compound-literal01.c => linear/compound-literal02.c} (61%)

diff --git a/validation/compound-literal00.c b/validation/linear/compound-literal00.c
similarity index 100%
rename from validation/compound-literal00.c
rename to validation/linear/compound-literal00.c
diff --git a/validation/linear/compound-literal01.c b/validation/linear/compound-literal01.c
new file mode 100644
index 000000000..e45fade37
--- /dev/null
+++ b/validation/linear/compound-literal01.c
@@ -0,0 +1,18 @@
+struct bfs {
+        int a: 2;
+        int b: 30;
+};
+
+int foo(void)
+{
+        struct bfs bf = { .a = 1, .b = 2 };
+        return (struct bfs[]){bf}[0].b;
+}
+
+/*
+ * check-name: compound-literal01.c
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-contains: ret\\..*\\$2
+ */
diff --git a/validation/compound-literal01.c b/validation/linear/compound-literal02.c
similarity index 61%
rename from validation/compound-literal01.c
rename to validation/linear/compound-literal02.c
index 8a4935ea7..87b98d76b 100644
--- a/validation/compound-literal01.c
+++ b/validation/linear/compound-literal02.c
@@ -3,12 +3,6 @@ struct bfs {
         int b: 30;
 };
 
-int foo(void)
-{
-        struct bfs bf = { .a = 1, .b = 2 };
-        return (struct bfs[]){bf}[0].b;
-}
-
 int bar(void)
 {
         struct bfs bf = { .a = 1, .b = 4 };
@@ -16,12 +10,10 @@ int bar(void)
 }
 
 /*
- * check-name: compound-literal01.c
+ * check-name: compound-literal02.c
  * check-command: test-linearize -Wno-decl $file
  *
  * check-known-to-fail
  * check-output-ignore
- * check-output-contains: ret\\..*\\$2
  * check-output-contains: ret\\..*\\$6
- * check-error-end
  */
-- 
2.16.2

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux