]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openmp: Improve testsuite/libgomp.c/affinity-1.c testcase
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Oct 2021 21:39:27 +0000 (23:39 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 15 Oct 2021 21:39:27 +0000 (23:39 +0200)
I've noticed that while I have added hopefully sufficient test coverage
for the case where one uses simple number or !number as p-interval,
I haven't added any coverage for number:len:stride or number:len.

This patch adds that.

2021-10-15  Jakub Jelinek  <jakub@redhat.com>

* testsuite/libgomp.c/affinity-1.c (struct places): Change name field
type from char [50] to const char *.
(places_array): Add a testcase for simplified syntax place followed
by length or length and stride.

(cherry picked from commit a10794eafb151b9274d673dfae93459d437cbe4a)

libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.c/affinity-1.c

index c149bc9a88b876d6194811f66ea72565297138b6..12291307b649d256ed8d358eab276ad0eb0aa2a3 100644 (file)
@@ -1,3 +1,13 @@
+2021-10-15  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backported from master:
+       2021-10-15  Jakub Jelinek  <jakub@redhat.com>
+
+       * testsuite/libgomp.c/affinity-1.c (struct places): Change name field
+       type from char [50] to const char *.
+       (places_array): Add a testcase for simplified syntax place followed
+       by length or length and stride.
+
 2021-10-15  Tobias Burnus  <tobias@codesourcery.com>
 
        Backported from master:
index 1039e3b9c968f07ca45e645e6dca1b1681eda301..085526db634194fddbbfc364b4aedaef80989e2d 100644 (file)
@@ -48,7 +48,7 @@ struct place
 };
 struct places
 {
-  char name[50];
+  const char *name;
   int count;
   struct place places[8];
 } places_array[] = {
@@ -63,7 +63,8 @@ struct places
       { 4, 1 }, { 5, 1 }, { 6, 1 }, { 7, 1 } } },
   { "{0,1},{3,2,4},{6,5,!6},{6},{7:2:-1,!6}", 5,
     { { 0, 2 }, { 2, 3 }, { 5, 1 }, { 6, 1 }, { 7, 1 } } },
-  { "1,2,{2,3,!2},3,3,!3,!{5:3:-1,!4,!5},{4},5,!4,!5", 3,
+  { "1,2,{2,3,!2},3,3,!3,!{5:3:-1,!4,!5},{4},5,!4,!5,"
+    "1:2,!{1},!2,7:3:-2,!{5},!7,!3", 3,
     { { 1, 1 }, { 2, 1 }, { 3, 1 } } }
 };