You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/10 13:50:02 UTC

[incubator-nuttx-apps] branch master updated (087b4da -> 0f68fb7)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


    from 087b4da  wireless: ieee802154: libmac: nxstyle fixes
     new 96938f8  LICENSE: add license for apps/wireless/wapi
     new 54f47f3  tools: update licenses to Apache
     new 590307e  testing: update licenses to Apache
     new 3378b8e  testing: ostest: nxstyle fixes
     new d2db78f  testing: smart_test: nxstyle fixes
     new 0f68fb7  testing: smp: nxstyle fixes

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 LICENSE                         |  33 ++++
 testing/mm/mm_main.c            |  76 ++++-----
 testing/ostest/aio.c            | 123 +++++++-------
 testing/ostest/barrier.c        |  39 ++---
 testing/ostest/cancel.c         | 201 +++++++++++++----------
 testing/ostest/cond.c           | 153 +++++++++--------
 testing/ostest/dev_null.c       |  41 ++---
 testing/ostest/fpu.c            |  39 ++---
 testing/ostest/mqueue.c         |  39 ++---
 testing/ostest/mutex.c          |  39 ++---
 testing/ostest/nsem.c           |  51 +++---
 testing/ostest/posixtimer.c     |  41 ++---
 testing/ostest/prioinherit.c    |  41 ++---
 testing/ostest/pthread_rwlock.c |  91 ++++++-----
 testing/ostest/restart.c        |  60 +++----
 testing/ostest/rmutex.c         |  97 ++++++-----
 testing/ostest/robust.c         |  84 +++++-----
 testing/ostest/roundrobin.c     |  95 +++++------
 testing/ostest/sem.c            | 109 +++++++------
 testing/ostest/semtimed.c       |  82 +++++-----
 testing/ostest/setvbuf.c        |  41 ++---
 testing/ostest/sigev_thread.c   |   2 +-
 testing/ostest/signest.c        |  39 ++---
 testing/ostest/sigprocmask.c    |  56 +++----
 testing/ostest/specific.c       |  39 ++---
 testing/ostest/suspend.c        |  69 +++-----
 testing/ostest/timedmqueue.c    |  41 ++---
 testing/ostest/timedmutex.c     |  39 ++---
 testing/ostest/timedwait.c      |  76 +++++----
 testing/ostest/tls.c            |  41 ++---
 testing/ostest/vfork.c          |  41 ++---
 testing/ostest/waitpid.c        | 163 ++++++++++---------
 testing/smart_test/smart_test.c | 352 +++++++++++++++++++++-------------------
 testing/smp/smp_main.c          |  67 ++++----
 tools/check-hash.sh             |  39 ++---
 tools/mkimport.sh               |  39 ++---
 tools/mkkconfig.bat             |  39 ++---
 tools/mkkconfig.sh              |  39 ++---
 tools/mkromfsimg.sh             |  39 ++---
 tools/mksymtab.sh               |  39 ++---
 40 files changed, 1294 insertions(+), 1540 deletions(-)

[incubator-nuttx-apps] 05/06: testing: smart_test: nxstyle fixes

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit d2db78f8bc6fc3c8a6f10a41627ba0a318830e60
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 12:29:20 2021 +0200

    testing: smart_test: nxstyle fixes
    
    Fixes for errors reported by nxstyle tool
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 testing/smart_test/smart_test.c | 311 ++++++++++++++++++++++------------------
 1 file changed, 169 insertions(+), 142 deletions(-)

diff --git a/testing/smart_test/smart_test.c b/testing/smart_test/smart_test.c
index e891876..0698fd1 100644
--- a/testing/smart_test/smart_test.c
+++ b/testing/smart_test/smart_test.c
@@ -40,16 +40,16 @@
  * Private data
  ****************************************************************************/
 
-static int *g_linePos;
-static int *g_lineLen;
-static int g_seekCount = 0;
-static int g_writeCount = 0;
-static int g_circCount = 0;
+static int *g_line_pos;
+static int *g_line_len;
+static int g_seek_count = 0;
+static int g_write_count = 0;
+static int g_circ_count = 0;
 
-static int g_lineCount = 2000;
-static int g_recordLen = 64;
-static int g_eraseCount = 32;
-static int g_totalRecords = 40000;
+static int g_line_count = 2000;
+static int g_record_len = 64;
+static int g_erase_count = 32;
+static int g_totalz_records = 40000;
 
 /****************************************************************************
  * Private Functions
@@ -86,13 +86,13 @@ static int smart_create_test_file(char *filename)
    * file where that file starts.
    */
 
-  printf("Writing test data.  %d lines to write\n", g_lineCount);
-  for (x = 0; x < g_lineCount; x++)
+  printf("Writing test data.  %d lines to write\n", g_line_count);
+  for (x = 0; x < g_line_count; x++)
     {
-      g_linePos[x] = ftell(fd);
+      g_line_pos[x] = ftell(fd);
 
-      sprintf(string, "This is line %d at offset %d\n", x, g_linePos[x]);
-      g_lineLen[x] = strlen(string);
+      sprintf(string, "This is line %d at offset %d\n", x, g_line_pos[x]);
+      g_line_len[x] = strlen(string);
       fprintf(fd, "%s", string);
 
       printf("\r%d", x);
@@ -131,25 +131,25 @@ static int smart_seek_test(char *filename)
       return -ENOENT;
     }
 
-  printf("Performing %d random seek tests\n", g_seekCount);
+  printf("Performing %d random seek tests\n", g_seek_count);
 
   srand(23);
-  for (x = 0; x < g_seekCount; x++)
+  for (x = 0; x < g_seek_count; x++)
     {
       /* Get random line to seek to */
 
       index = rand();
-      while (index >= g_lineCount)
+      while (index >= g_line_count)
         {
-          index -= g_lineCount;
+          index -= g_line_count;
         }
 
-      fseek(fd, g_linePos[index], SEEK_SET);
-      fread(readstring, 1, g_lineLen[index], fd);
-      readstring[g_lineLen[index]] = '\0';
+      fseek(fd, g_line_pos[index], SEEK_SET);
+      fread(readstring, 1, g_line_len[index], fd);
+      readstring[g_line_len[index]] = '\0';
 
       sprintf(cmpstring, "This is line %d at offset %d\n",
-              index, g_linePos[index]);
+              index, g_line_pos[index]);
 
       if (strcmp(readstring, cmpstring) != 0)
         {
@@ -252,25 +252,26 @@ static int smart_seek_with_write_test(char *filename)
     }
 
   printf("Performing %d random seek with write tests\n",
-         g_writeCount);
+         g_write_count);
 
   index = 0;
-  for (x = 0; x < g_writeCount; x++)
+  for (x = 0; x < g_write_count; x++)
     {
 #if 0
       /* Get a random value */
 
       index = rand();
-      while (index >= g_lineCount)
+      while (index >= g_line_count)
         {
-          index -= g_lineCount;
+          index -= g_line_count;
         }
 #endif
+
       /* Read the data into the buffer */
 
-      fseek(fd, g_linePos[index], SEEK_SET);
-      fread(readstring, 1, g_lineLen[index], fd);
-      readstring[g_lineLen[index]] = '\0';
+      fseek(fd, g_line_pos[index], SEEK_SET);
+      fread(readstring, 1, g_line_len[index], fd);
+      readstring[g_line_len[index]] = '\0';
 
       /* Scramble the data in the line */
 
@@ -287,24 +288,24 @@ static int smart_seek_with_write_test(char *filename)
 
       /* Now write the data back to the file */
 
-      fseek(fd, g_linePos[index], SEEK_SET);
-      fwrite(readstring, 1, g_lineLen[index], fd);
+      fseek(fd, g_line_pos[index], SEEK_SET);
+      fwrite(readstring, 1, g_line_len[index], fd);
       fflush(fd);
 
       /* Now read the data back and compare it */
 
-      fseek(fd, g_linePos[index], SEEK_SET);
-      fread(cmpstring, 1, g_lineLen[index], fd);
-      cmpstring[g_lineLen[index]] = '\0';
+      fseek(fd, g_line_pos[index], SEEK_SET);
+      fread(cmpstring, 1, g_line_len[index], fd);
+      cmpstring[g_line_len[index]] = '\0';
 
       if (strcmp(readstring, cmpstring) != 0)
         {
           printf("\nCompare failure on line %d, offset %d\n",
-                 index, g_linePos[index]);
+                 index, g_line_pos[index]);
           printf("\tExpected \"%s\"", cmpstring);
           printf("\rReceived \"%s\"", readstring);
-          fseek(fd, g_linePos[index], SEEK_SET);
-          fread(cmpstring, 1, g_lineLen[index], fd);
+          fseek(fd, g_line_pos[index], SEEK_SET);
+          fread(cmpstring, 1, g_line_len[index], fd);
           pass = FALSE;
           break;
         }
@@ -314,7 +315,7 @@ static int smart_seek_with_write_test(char *filename)
 
       /* On to next line */
 
-      if (++index >= g_lineCount)
+      if (++index >= g_line_count)
         {
           index = 0;
         }
@@ -354,14 +355,14 @@ static int smart_circular_log_test(char *filename)
   char      *cmpbuf;
   int       s1;
   int       x;
-  int       recordNo;
-  int       bufSize;
+  int       record_no;
+  int       buf_size;
   int       pass = TRUE;
 
   /* Calculate the size of our granular "erase record" writes */
 
-  bufSize = g_recordLen * g_eraseCount;
-  if (bufSize == 0)
+  buf_size = g_record_len * g_erase_count;
+  if (buf_size == 0)
     {
       printf("Invalid record parameters\n");
       return -EINVAL;
@@ -369,7 +370,7 @@ static int smart_circular_log_test(char *filename)
 
   /* Allocate memory for the record */
 
-  buffer = malloc(bufSize);
+  buffer = malloc(buf_size);
   if (buffer == NULL)
     {
       printf("Unable to allocate memory for record storage\n");
@@ -378,7 +379,7 @@ static int smart_circular_log_test(char *filename)
 
   /* Allocate memory for the compare buffer */
 
-  cmpbuf = malloc(g_recordLen);
+  cmpbuf = malloc(g_record_len);
   if (cmpbuf == NULL)
     {
       printf("Unable to allocate memory for record storage\n");
@@ -399,11 +400,11 @@ static int smart_circular_log_test(char *filename)
 
   /* Now fill the circular log with dummy 0xFF data */
 
-  printf("Creating circular log with %d records\n", g_totalRecords);
-  memset(buffer, 0xFF, g_recordLen);
-  for (x = 0; x < g_totalRecords; x++)
+  printf("Creating circular log with %d records\n", g_totalz_records);
+  memset(buffer, 0xff, g_record_len);
+  for (x = 0; x < g_totalz_records; x++)
     {
-      write(fd, buffer, g_recordLen);
+      write(fd, buffer, g_record_len);
     }
 
   close(fd);
@@ -420,67 +421,67 @@ static int smart_circular_log_test(char *filename)
     }
 
   printf("Performing %d circular log record update tests\n",
-         g_circCount);
+         g_circ_count);
 
   /* Start at record number zero and start updating log entries */
 
-  recordNo = 0;
-  for (x = 0; x < g_circCount; x++)
+  record_no = 0;
+  for (x = 0; x < g_circ_count; x++)
     {
       /* Fill a new record with random data */
 
-      for (s1=0; s1 < g_recordLen; s1++)
+      for (s1 = 0; s1 < g_record_len; s1++)
         {
-          buffer[s1] = rand() & 0xFF;
+          buffer[s1] = rand() & 0xff;
         }
 
       /* Set the first byte of the record (flag byte) to 0xFF */
 
-      buffer[0] = 0xFF;
+      buffer[0] = 0xff;
 
       /* Seek to the record location in the file */
 
-      lseek(fd, g_recordLen*recordNo, SEEK_SET);
+      lseek(fd, g_record_len * record_no, SEEK_SET);
 
       /* Write the new record to the file */
 
-      if ((recordNo & (g_eraseCount-1)) == 0)
+      if ((record_no & (g_erase_count - 1)) == 0)
         {
-          /* Every g_eraseCount records we will write a larger
+          /* Every g_erase_count records we will write a larger
            * buffer with our record and padded with 0xFF to
            * the end of our larger buffer.
            */
 
-          memset(&buffer[g_recordLen], 0xFF, bufSize-g_recordLen);
-          write(fd, buffer, bufSize);
+          memset(&buffer[g_record_len], 0xff, buf_size - g_record_len);
+          write(fd, buffer, buf_size);
         }
       else
         {
           /* Just write a single record */
 
-          write(fd, buffer, g_recordLen);
+          write(fd, buffer, g_record_len);
         }
 
       /* Now perform a couple of simulated flag updates */
 
-      lseek(fd, g_recordLen*recordNo, SEEK_SET);
-      buffer[0] = 0xFE;
+      lseek(fd, g_record_len * record_no, SEEK_SET);
+      buffer[0] = 0xfe;
       write(fd, buffer, 1);
-      lseek(fd, g_recordLen*recordNo, SEEK_SET);
-      buffer[0] = 0xFC;
+      lseek(fd, g_record_len * record_no, SEEK_SET);
+      buffer[0] = 0xfc;
       write(fd, buffer, 1);
 
       /* Now read the data back and compare it */
 
-      lseek(fd, g_recordLen*recordNo, SEEK_SET);
-      read(fd, cmpbuf, g_recordLen);
+      lseek(fd, g_record_len * record_no, SEEK_SET);
+      read(fd, cmpbuf, g_record_len);
 
-      for (s1 = 0; s1 < g_recordLen; s1++)
+      for (s1 = 0; s1 < g_record_len; s1++)
         {
           if (buffer[s1] != cmpbuf[s1])
             {
               printf("\nCompare failure in record %d, offset %d\n",
-                     recordNo, recordNo*g_recordLen+s1);
+                     record_no, record_no * g_record_len + s1);
               printf("\tExpected \"%02x\"", cmpbuf[s1]);
               printf("\rReceived \"%02x\"", buffer[s1]);
               pass = FALSE;
@@ -493,9 +494,9 @@ static int smart_circular_log_test(char *filename)
 
       /* Increment to the next record */
 
-      if (++recordNo >= g_totalRecords)
+      if (++record_no >= g_totalz_records)
         {
-          recordNo = 0;
+          record_no = 0;
         }
     }
 
@@ -523,48 +524,73 @@ static int smart_circular_log_test(char *filename)
 
 static void smart_usage(void)
 {
-  fprintf(stderr, "usage: smart_test [-c COUNT] [-s SEEKCOUNT] [-w WRITECOUNT] smart_mounted_filename\n\n");
+  fprintf(stderr, "usage: smart_test "
+    "[-c COUNT] [-s SEEKCOUNT] [-w WRITECOUNT] smart_mounted_filename\n\n");
 
   fprintf(stderr, "DESCRIPTION\n");
-  fprintf(stderr, "    Conducts various stress tests to validate SMARTFS operation.\n");
-  fprintf(stderr, "    Please choose one or more of -c, -s, or -w to conduct tests.\n\n");
+  fprintf(stderr,
+    "    Conducts various stress tests to validate SMARTFS operation.\n");
+  fprintf(stderr,
+    "    Please choose one or more of -c, -s, or -w to conduct tests.\n\n");
 
   fprintf(stderr, "OPTIONS\n");
   fprintf(stderr, "    -c COUNT\n");
-  fprintf(stderr, "          Performs a circular log style test where a fixed number of fixed\n");
-  fprintf(stderr, "          length records are written and then overwritten with new data.\n");
-  fprintf(stderr, "          Uses the -r, -e and -t options to specify the parameters of the \n");
-  fprintf(stderr, "          record geometry and update operation.  The COUNT parameter sets\n");
-  fprintf(stderr, "          the number of record updates to perform.\n\n");
+  fprintf(stderr, "          "
+    "Performs a circular log style test where a fixed number of fixed\n");
+  fprintf(stderr, "          "
+    "length records are written and then overwritten with new data.\n");
+  fprintf(stderr, "          "
+    "Uses the -r, -e and -t options to specify the parameters of the \n");
+  fprintf(stderr, "          "
+    "record geometry and update operation.  The COUNT parameter sets\n");
+  fprintf(stderr, "          "
+    "the number of record updates to perform.\n\n");
 
   fprintf(stderr, "    -s SEEKCOUNT\n");
-  fprintf(stderr, "          Performs a simple seek test where to validate the SMARTFS seek\n");
-  fprintf(stderr, "          operation.  Uses the -l option to specify the number of test\n");
-  fprintf(stderr, "          lines to write to the test file.  The SEEKCOUNT parameter sets\n");
-  fprintf(stderr, "          the number of seek/read operations to perform.\n\n");
+  fprintf(stderr, "          "
+    "Performs a simple seek test where to validate the SMARTFS seek\n");
+  fprintf(stderr, "          "
+    "operation.  Uses the -l option to specify the number of test\n");
+  fprintf(stderr, "          "
+    "lines to write to the test file.  The SEEKCOUNT parameter sets\n");
+  fprintf(stderr, "          "
+    "the number of seek/read operations to perform.\n\n");
 
   fprintf(stderr, "    -w WRITECOUNT\n");
-  fprintf(stderr, "          Performs a seek/write/seek/read test where to validate the SMARTFS\n");
-  fprintf(stderr, "          seek/write operation.  Uses the -l option to specify the number of\n");
-  fprintf(stderr, "          test lines to write to the test file.  The WRITECOUNT parameter sets\n");
-  fprintf(stderr, "          the number of seek/write operations to perform.\n\n");
+  fprintf(stderr, "          "
+    "Performs a seek/write/seek/read test where to validate the SMARTFS\n");
+  fprintf(stderr, "          "
+    "seek/write operation.  Uses the -l option to specify the number of\n");
+  fprintf(stderr, "          test lines "
+    "to write to the test file.  The WRITECOUNT parameter sets\n");
+  fprintf(stderr, "          "
+    "the number of seek/write operations to perform.\n\n");
 
   fprintf(stderr, "    -l LINECOUNT\n");
-  fprintf(stderr, "          Sets the number of lines of test data to write to the test file\n");
-  fprintf(stderr, "          during seek and seek/write tests.\n\n");
+  fprintf(stderr, "          "
+    "Sets the number of lines of test data to write to the test file\n");
+  fprintf(stderr, "          "
+    "during seek and seek/write tests.\n\n");
 
   fprintf(stderr, "    -r RECORDLEN\n");
-  fprintf(stderr, "          Sets the length of each log record during circular log tests.\n\n");
+  fprintf(stderr, "          "
+    "Sets the length of each log record during circular log tests.\n\n");
 
   fprintf(stderr, "    -e ERASECOUNT\n");
-  fprintf(stderr, "          Sets the erase granularity for overwriting old circular log entries.\n");
-  fprintf(stderr, "          Setting this value to 16, for instance, would cause every 16th record\n");
-  fprintf(stderr, "          update to write a single record followed by 15 records with all 0xFF\n");
-  fprintf(stderr, "          content.  This helps SMARTFS perform better wear leveling and reduces\n");
-  fprintf(stderr, "          the number of FLASH block erases significantly.\n\n");
+  fprintf(stderr, "          Sets the erase granularity"
+    " for overwriting old circular log entries.\n");
+  fprintf(stderr, "          Setting this value to 16, "
+    "for instance, would cause every 16th record\n");
+  fprintf(stderr, "          update "
+    "to write a single record followed by 15 records with all 0xFF\n");
+  fprintf(stderr, "          content.  "
+    "This helps SMARTFS perform better wear leveling and reduces\n");
+  fprintf(stderr, "          "
+    "the number of FLASH block erases significantly.\n\n");
 
   fprintf(stderr, "    -t TOTALRECORDS\n");
-  fprintf(stderr, "          Sets the total number of records in the circular log test file.\n\n");
+  fprintf(stderr, "          "
+    "Sets the total number of records in the circular log test file.\n\n");
 }
 
 /****************************************************************************
@@ -573,49 +599,50 @@ static void smart_usage(void)
 
 int main(int argc, FAR char *argv[])
 {
-  int ret, opt;
+  int ret;
+  int opt;
 
   /* Argument given? */
 
   while ((opt = getopt(argc, argv, "c:e:l:r:s:t:w:")) != -1)
-     {
-       switch (opt)
-         {
-           case 'c':
-             g_circCount = atoi(optarg);
-             break;
-
-           case 'e':
-             g_eraseCount = atoi(optarg);
-             break;
-
-           case 'l':
-             g_lineCount = atoi(optarg);
-             break;
-
-           case 'r':
-             g_recordLen = atoi(optarg);
-             break;
-
-           case 's':
-             g_seekCount = atoi(optarg);
-             break;
-
-           case 't':
-             g_totalRecords = atoi(optarg);
-             break;
-
-           case 'w':
-             g_writeCount = atoi(optarg);
-             break;
-
-           default: /* '?' */
-             smart_usage();
-             exit(EXIT_FAILURE);
-         }
+    {
+      switch (opt)
+        {
+          case 'c':
+            g_circ_count = atoi(optarg);
+            break;
+
+          case 'e':
+            g_erase_count = atoi(optarg);
+            break;
+
+          case 'l':
+            g_line_count = atoi(optarg);
+            break;
+
+          case 'r':
+            g_record_len = atoi(optarg);
+            break;
+
+          case 's':
+            g_seek_count = atoi(optarg);
+            break;
+
+          case 't':
+            g_totalz_records = atoi(optarg);
+            break;
+
+          case 'w':
+            g_write_count = atoi(optarg);
+            break;
+
+          default: /* '?' */
+            smart_usage();
+            exit(EXIT_FAILURE);
+      }
    }
 
-  if (argc < 2 || (g_seekCount + g_writeCount + g_circCount == 0))
+  if (argc < 2 || (g_seek_count + g_write_count + g_circ_count == 0))
     {
       smart_usage();
       return -1;
@@ -623,22 +650,22 @@ int main(int argc, FAR char *argv[])
 
   /* Allocate memory for the test */
 
-  g_linePos = malloc(g_lineCount * sizeof(int));
-  if (g_linePos == NULL)
+  g_line_pos = malloc(g_line_count * sizeof(int));
+  if (g_line_pos == NULL)
     {
       return -1;
     }
 
-  g_lineLen = malloc(g_lineCount * sizeof(int));
-  if (g_lineLen == NULL)
+  g_line_len = malloc(g_line_count * sizeof(int));
+  if (g_line_len == NULL)
     {
-      free(g_linePos);
+      free(g_line_pos);
       return -1;
     }
 
   /* Test if performing seek test or write test */
 
-  if (g_seekCount > 0 || g_writeCount > 0)
+  if (g_seek_count > 0 || g_write_count > 0)
     {
       /* Create a test file */
 
@@ -649,7 +676,7 @@ int main(int argc, FAR char *argv[])
 
       /* Conduct a seek test? */
 
-      if (g_seekCount > 0 )
+      if (g_seek_count > 0)
         {
           if ((ret = smart_seek_test(argv[optind])) < 0)
             {
@@ -666,7 +693,7 @@ int main(int argc, FAR char *argv[])
 
       /* Conduct a seek with write test? */
 
-      if (g_writeCount > 0)
+      if (g_write_count > 0)
         {
           if ((ret = smart_seek_with_write_test(argv[optind])) < 0)
             {
@@ -686,7 +713,7 @@ err_out_with_mem:
 
   /* Free the memory */
 
-  free(g_linePos);
-  free(g_lineLen);
+  free(g_line_pos);
+  free(g_line_len);
   return ret;
 }

[incubator-nuttx-apps] 03/06: testing: update licenses to Apache

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 590307e957f2710d8810867c9899220ae69900ea
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 07:51:27 2021 +0200

    testing: update licenses to Apache
    
    Gregory Nutt is has submitted the SGA
    
    Mark Schulte has submitted the ICLA
    
    Ken Pettit has submitted the ICLA
    
    as a result we can migrate the licenses to Apache.
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 testing/mm/mm_main.c            | 39 ++++++++++++---------------------------
 testing/ostest/aio.c            | 41 +++++++++++++----------------------------
 testing/ostest/barrier.c        | 39 ++++++++++++---------------------------
 testing/ostest/cancel.c         | 41 +++++++++++++----------------------------
 testing/ostest/cond.c           | 41 +++++++++++++----------------------------
 testing/ostest/dev_null.c       | 41 +++++++++++++----------------------------
 testing/ostest/fpu.c            | 39 ++++++++++++---------------------------
 testing/ostest/mqueue.c         | 39 ++++++++++++---------------------------
 testing/ostest/mutex.c          | 39 ++++++++++++---------------------------
 testing/ostest/nsem.c           | 41 +++++++++++++----------------------------
 testing/ostest/posixtimer.c     | 41 +++++++++++++----------------------------
 testing/ostest/prioinherit.c    | 41 +++++++++++++----------------------------
 testing/ostest/pthread_rwlock.c | 41 +++++++++++++----------------------------
 testing/ostest/restart.c        | 41 +++++++++++++----------------------------
 testing/ostest/rmutex.c         | 41 +++++++++++++----------------------------
 testing/ostest/robust.c         | 41 +++++++++++++----------------------------
 testing/ostest/roundrobin.c     | 41 +++++++++++++----------------------------
 testing/ostest/sem.c            | 41 +++++++++++++----------------------------
 testing/ostest/semtimed.c       | 39 ++++++++++++---------------------------
 testing/ostest/setvbuf.c        | 41 +++++++++++++----------------------------
 testing/ostest/sigev_thread.c   |  2 +-
 testing/ostest/signest.c        | 39 ++++++++++++---------------------------
 testing/ostest/sigprocmask.c    | 39 ++++++++++++---------------------------
 testing/ostest/specific.c       | 39 ++++++++++++---------------------------
 testing/ostest/suspend.c        | 39 ++++++++++++---------------------------
 testing/ostest/timedmqueue.c    | 39 ++++++++++++---------------------------
 testing/ostest/timedmutex.c     | 39 ++++++++++++---------------------------
 testing/ostest/timedwait.c      | 41 +++++++++++++----------------------------
 testing/ostest/tls.c            | 41 +++++++++++++----------------------------
 testing/ostest/vfork.c          | 41 +++++++++++++----------------------------
 testing/ostest/waitpid.c        | 41 +++++++++++++----------------------------
 testing/smart_test/smart_test.c | 41 +++++++++++++----------------------------
 testing/smp/smp_main.c          | 39 ++++++++++++---------------------------
 33 files changed, 404 insertions(+), 884 deletions(-)

diff --git a/testing/mm/mm_main.c b/testing/mm/mm_main.c
index 1147bbd..a08e2d9 100644
--- a/testing/mm/mm_main.c
+++ b/testing/mm/mm_main.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/mm/mm_main.c
  *
- *   Copyright (C) 2011, 2020 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/aio.c b/testing/ostest/aio.c
index d55e7a8..efb000e 100644
--- a/testing/ostest/aio.c
+++ b/testing/ostest/aio.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/aio.c
+ * apps/testing/ostest/aio.c
  *
- *   Copyright (C) 2014 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/barrier.c b/testing/ostest/barrier.c
index f13eb33..d30c294 100644
--- a/testing/ostest/barrier.c
+++ b/testing/ostest/barrier.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/barrier.c
  *
- *   Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/cancel.c b/testing/ostest/cancel.c
index b7494ca..932345e 100644
--- a/testing/ostest/cancel.c
+++ b/testing/ostest/cancel.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/cancel.c
+ * apps/testing/ostest/cancel.c
  *
- *   Copyright (C) 2007-2009, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/cond.c b/testing/ostest/cond.c
index f408345..93ffe82 100644
--- a/testing/ostest/cond.c
+++ b/testing/ostest/cond.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * cond.c
+ * apps/testing/ostest/cond.c
  *
- *   Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/dev_null.c b/testing/ostest/dev_null.c
index 874663a..e5820e1 100644
--- a/testing/ostest/dev_null.c
+++ b/testing/ostest/dev_null.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/dev_null.c
+ * apps/testing/ostest/dev_null.c
  *
- *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/fpu.c b/testing/ostest/fpu.c
index 4a98ce0..2daecc8 100644
--- a/testing/ostest/fpu.c
+++ b/testing/ostest/fpu.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/fpu.c
  *
- *   Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/mqueue.c b/testing/ostest/mqueue.c
index 8b3fdc8..3fe8e0f 100644
--- a/testing/ostest/mqueue.c
+++ b/testing/ostest/mqueue.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/mqueue.c
  *
- *   Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/mutex.c b/testing/ostest/mutex.c
index b1bc377..f4e983c 100644
--- a/testing/ostest/mutex.c
+++ b/testing/ostest/mutex.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/mutex.c
  *
- *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/nsem.c b/testing/ostest/nsem.c
index 83791f8..858d4a9 100644
--- a/testing/ostest/nsem.c
+++ b/testing/ostest/nsem.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * apps/testingnsem.c
+ * apps/testing/ostest/nsem.c
  *
- *   Copyright (C) 2014 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/posixtimer.c b/testing/ostest/posixtimer.c
index d5cd849..c9ca504 100644
--- a/testing/ostest/posixtimer.c
+++ b/testing/ostest/posixtimer.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/posixtimer.c
+ * apps/testing/ostest/posixtimer.c
  *
- *   Copyright (C) 2007-2009, 2011, 2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/prioinherit.c b/testing/ostest/prioinherit.c
index cfdff39..c6750f9 100644
--- a/testing/ostest/prioinherit.c
+++ b/testing/ostest/prioinherit.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/prioinherit.c
+ * apps/testing/ostest/prioinherit.c
  *
- *   Copyright (C) 2009, 2011, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/pthread_rwlock.c b/testing/ostest/pthread_rwlock.c
index 71fabee..d9af5d2 100644
--- a/testing/ostest/pthread_rwlock.c
+++ b/testing/ostest/pthread_rwlock.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/pthread_rwlock.c
+ * apps/testing/ostest/pthread_rwlock.c
  *
- *   Copyright (C) 2017 Mark Schulte. All rights reserved.
- *   Author: Mark Schulte <ma...@mjs.pw>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/restart.c b/testing/ostest/restart.c
index 40f2f79..40c1f3a 100644
--- a/testing/ostest/restart.c
+++ b/testing/ostest/restart.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/restart.c
+ * apps/testing/ostest/restart.c
  *
- *   Copyright (C) 2013 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/rmutex.c b/testing/ostest/rmutex.c
index c1be76b..1ff680a 100644
--- a/testing/ostest/rmutex.c
+++ b/testing/ostest/rmutex.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * rmutex.c
+ * apps/testing/ostest/rmutex.c
  *
- *   Copyright (C) 2008 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/robust.c b/testing/ostest/robust.c
index 1b1f1be..b595747 100644
--- a/testing/ostest/robust.c
+++ b/testing/ostest/robust.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/robust.c
+ * apps/testing/ostest/robust.c
  *
- *   Copyright (C) 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/roundrobin.c b/testing/ostest/roundrobin.c
index 6a6bc86..f7b7411 100644
--- a/testing/ostest/roundrobin.c
+++ b/testing/ostest/roundrobin.c
@@ -1,35 +1,20 @@
 /********************************************************************************
- * testing/ostest/roundrobin.c
+ * apps/testing/ostest/roundrobin.c
  *
- *   Copyright (C) 2007, 2008, 2012, 2015 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ********************************************************************************/
 
diff --git a/testing/ostest/sem.c b/testing/ostest/sem.c
index 584afa3..4ffe004 100644
--- a/testing/ostest/sem.c
+++ b/testing/ostest/sem.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * sem.c
+ * apps/testing/ostest/sem.c
  *
- *   Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/semtimed.c b/testing/ostest/semtimed.c
index 6486834..be4e85a 100644
--- a/testing/ostest/semtimed.c
+++ b/testing/ostest/semtimed.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/semtimed.c
  *
- *   Copyright (C) 2014-2015 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/setvbuf.c b/testing/ostest/setvbuf.c
index 2a7aa0b..fc33949 100644
--- a/testing/ostest/setvbuf.c
+++ b/testing/ostest/setvbuf.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/setvbuf.c
+ * apps/testing/ostest/setvbuf.c
  *
- *   Copyright (C) 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/sigev_thread.c b/testing/ostest/sigev_thread.c
index 2fcf9d1..1e95d77 100644
--- a/testing/ostest/sigev_thread.c
+++ b/testing/ostest/sigev_thread.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * testing/ostest/sigev_thread.c
+ * apps/testing/ostest/sigev_thread.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/testing/ostest/signest.c b/testing/ostest/signest.c
index 3548ee6..751d60c 100644
--- a/testing/ostest/signest.c
+++ b/testing/ostest/signest.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/signest.c
  *
- *   Copyright (C) 2015 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/sigprocmask.c b/testing/ostest/sigprocmask.c
index 4f5177f..5dce87c 100644
--- a/testing/ostest/sigprocmask.c
+++ b/testing/ostest/sigprocmask.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/sigprocmask.c
  *
- *   Copyright (C) 2015 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/specific.c b/testing/ostest/specific.c
index 1c91c5e..5807bb5 100644
--- a/testing/ostest/specific.c
+++ b/testing/ostest/specific.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/specific.c
  *
- *   Copyright (C) 2018 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/suspend.c b/testing/ostest/suspend.c
index a57f1b4..2d7dd41 100644
--- a/testing/ostest/suspend.c
+++ b/testing/ostest/suspend.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/suspend.c
  *
- *   Copyright (C) 2018 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/timedmqueue.c b/testing/ostest/timedmqueue.c
index 1f3abd8..2e76a89 100644
--- a/testing/ostest/timedmqueue.c
+++ b/testing/ostest/timedmqueue.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/mqueue.c
  *
- *   Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/timedmutex.c b/testing/ostest/timedmutex.c
index 58bf568..ed99595 100644
--- a/testing/ostest/timedmutex.c
+++ b/testing/ostest/timedmutex.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/ostest/timedmutex.c
  *
- *   Copyright (C) 2019 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/timedwait.c b/testing/ostest/timedwait.c
index cac9d4b..78c6f00 100644
--- a/testing/ostest/timedwait.c
+++ b/testing/ostest/timedwait.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/timedwait.c
+ * apps/testing/ostest/timedwait.c
  *
- *   Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/tls.c b/testing/ostest/tls.c
index 407eefa..84dfda2 100644
--- a/testing/ostest/tls.c
+++ b/testing/ostest/tls.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/tls.c
+ * apps/testing/ostest/tls.c
  *
- *   Copyright (C) 2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/vfork.c b/testing/ostest/vfork.c
index 31e0658..4147f2b 100644
--- a/testing/ostest/vfork.c
+++ b/testing/ostest/vfork.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/vfork.c
+ * apps/testing/ostest/vfork.c
  *
- *   Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/ostest/waitpid.c b/testing/ostest/waitpid.c
index 9874b17..b4d3bb2 100644
--- a/testing/ostest/waitpid.c
+++ b/testing/ostest/waitpid.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * testing/ostest/waitpid.c
+ * apps/testing/ostest/waitpid.c
  *
- *   Copyright (C) 2013 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/smart_test/smart_test.c b/testing/smart_test/smart_test.c
index 083624f..e891876 100644
--- a/testing/smart_test/smart_test.c
+++ b/testing/smart_test/smart_test.c
@@ -1,35 +1,20 @@
 /****************************************************************************
- * apps/system/smart_test/smart_test.c
+ * apps/testing/smart_test/smart_test.c
  *
- *   Copyright (C) 2013, 2015 Ken Pettit. All rights reserved.
- *   Author: Ken Pettit <pe...@gmail.com>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
diff --git a/testing/smp/smp_main.c b/testing/smp/smp_main.c
index d27c433..4f80deb 100644
--- a/testing/smp/smp_main.c
+++ b/testing/smp/smp_main.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * apps/testing/smp/smp_main.c
  *
- *   Copyright (C) 2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 

[incubator-nuttx-apps] 02/06: tools: update licenses to Apache

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 54f47f3168cf0a0d84be305dc08c3d7393339a02
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 07:37:15 2021 +0200

    tools: update licenses to Apache
    
    Gregory Nutt is has submitted the SGA
    
    Michal Lyszczek has submitted the ICLA
    
    as a result we can migrate the licenses to Apache.
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 tools/check-hash.sh | 39 ++++++++++++---------------------------
 tools/mkimport.sh   | 39 ++++++++++++---------------------------
 tools/mkkconfig.bat | 39 ++++++++++++---------------------------
 tools/mkkconfig.sh  | 39 ++++++++++++---------------------------
 tools/mkromfsimg.sh | 39 ++++++++++++---------------------------
 tools/mksymtab.sh   | 39 ++++++++++++---------------------------
 6 files changed, 72 insertions(+), 162 deletions(-)

diff --git a/tools/check-hash.sh b/tools/check-hash.sh
index 7163fbb..df5b2e5 100755
--- a/tools/check-hash.sh
+++ b/tools/check-hash.sh
@@ -2,35 +2,20 @@
 ############################################################################
 # apps/tools/check-hash.sh
 #
-#   Copyright (C) 2019 Michał Łyszczek. All rights reserved.
-#   Author: Michał Łyszczek <mi...@bofc.pl>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-#    used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
 #
 ############################################################################
 
diff --git a/tools/mkimport.sh b/tools/mkimport.sh
index 7ce1948..46c52df 100755
--- a/tools/mkimport.sh
+++ b/tools/mkimport.sh
@@ -1,35 +1,20 @@
 #!/usr/bin/env bash
 # apps/tools/mkimport.sh
 #
-#   Copyright (C) 2014 Gregory Nutt. All rights reserved.
-#   Author: Gregory Nutt <gn...@nuttx.org>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-#    used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
 #
 
 # Get the input parameter list
diff --git a/tools/mkkconfig.bat b/tools/mkkconfig.bat
index 23968e6..54bd2db 100755
--- a/tools/mkkconfig.bat
+++ b/tools/mkkconfig.bat
@@ -2,35 +2,20 @@
 
 REM apps/tools/mkkconfig.bat
 REM
-REM   Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
-REM   Author: Gregory Nutt <gn...@nuttx.org>
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements.  See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.  The
+REM ASF licenses this file to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance with the
+REM License.  You may obtain a copy of the License at
 REM
-REM Redistribution and use in source and binary forms, with or without
-REM modification, are permitted provided that the following conditions
-REM are met:
+REM   http://www.apache.org/licenses/LICENSE-2.0
 REM
-REM 1. Redistributions of source code must retain the above copyright
-REM    notice, this list of conditions and the following disclaimer.
-REM 2. Redistributions in binary form must reproduce the above copyright
-REM    notice, this list of conditions and the following disclaimer in
-REM    the documentation and/or other materials provided with the
-REM    distribution.
-REM 3. Neither the name NuttX nor the names of its contributors may be
-REM    used to endorse or promote products derived from this software
-REM    without specific prior written permission.
-REM
-REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-REM OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-REM AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-REM POSSIBILITY OF SUCH DAMAGE.
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+REM WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+REM License for the specific language governing permissions and limitations
+REM under the License.
 REM
 
 REM Parse command line arguments
diff --git a/tools/mkkconfig.sh b/tools/mkkconfig.sh
index b875a71..c4b90ba 100755
--- a/tools/mkkconfig.sh
+++ b/tools/mkkconfig.sh
@@ -1,35 +1,20 @@
 #!/usr/bin/env bash
 # apps/tools/mkkconfig.sh
 #
-#   Copyright (C) 2015 Gregory Nutt. All rights reserved.
-#   Author: Gregory Nutt <gn...@nuttx.org>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-#    used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
 #
 
 # Get the input parameter list
diff --git a/tools/mkromfsimg.sh b/tools/mkromfsimg.sh
index 48690b5..e7ae009 100755
--- a/tools/mkromfsimg.sh
+++ b/tools/mkromfsimg.sh
@@ -2,35 +2,20 @@
 ############################################################################
 # apps/tools/mkromfsimg.sh
 #
-#   Copyright (C) 2014 Gregory Nutt. All rights reserved.
-#   Author: Gregory Nutt <gn...@nuttx.org>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-#    used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
 #
 ############################################################################
 
diff --git a/tools/mksymtab.sh b/tools/mksymtab.sh
index 064907b..e7649bd 100755
--- a/tools/mksymtab.sh
+++ b/tools/mksymtab.sh
@@ -2,35 +2,20 @@
 ############################################################################
 # apps/tools/mksymtab.sh
 #
-#   Copyright (C) 2018 Gregory Nutt. All rights reserved.
-#   Author: Gregory Nutt <gn...@nuttx.org>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-#    used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
 #
 ############################################################################
 

[incubator-nuttx-apps] 04/06: testing: ostest: nxstyle fixes

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 3378b8ef5488476d5a8df9570a13cdae7dc50eb2
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 11:56:16 2021 +0200

    testing: ostest: nxstyle fixes
    
    Fixes for errors reported by nxstyle tool
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 testing/mm/mm_main.c            |  37 ++++++----
 testing/ostest/aio.c            |  82 +++++++++++---------
 testing/ostest/cancel.c         | 160 +++++++++++++++++++++++++---------------
 testing/ostest/cond.c           | 112 ++++++++++++++++++----------
 testing/ostest/nsem.c           |  10 ++-
 testing/ostest/pthread_rwlock.c |  50 ++++++++-----
 testing/ostest/restart.c        |  19 +++--
 testing/ostest/rmutex.c         |  56 ++++++++++----
 testing/ostest/robust.c         |  43 +++++++----
 testing/ostest/roundrobin.c     |  54 ++++++++------
 testing/ostest/sem.c            |  68 +++++++++++------
 testing/ostest/semtimed.c       |  43 +++++++----
 testing/ostest/sigprocmask.c    |  17 ++++-
 testing/ostest/suspend.c        |  30 ++++----
 testing/ostest/timedmqueue.c    |   2 +-
 testing/ostest/timedwait.c      |  35 ++++++---
 testing/ostest/waitpid.c        | 122 ++++++++++++++++++------------
 17 files changed, 598 insertions(+), 342 deletions(-)

diff --git a/testing/mm/mm_main.c b/testing/mm/mm_main.c
index a08e2d9..4517b6d 100644
--- a/testing/mm/mm_main.c
+++ b/testing/mm/mm_main.c
@@ -59,18 +59,18 @@
 
 static const int g_alloc_sizes[NTEST_ALLOCS] =
 {
-   1024,     12,    962,   5692, 10254,   111,   9932,    601,
+    1024,    12,    962,   5692, 10254,   111,   9932,    601,
     222,   2746,      3, 124321,    68,   776,   6750,    852,
-   4732,     28,    901,    480,  5011,  1536,   2011,  81647,
+    4732,    28,    901,    480,  5011,  1536,   2011,  81647,
     646,   1646,  69179,    194,  2590,     7,    969,     70
 };
 
 static const int g_realloc_sizes[NTEST_ALLOCS] =
 {
-     18,   3088,    963,    123,   511, 11666,   3723,     42,
-   9374,   1990,   1412,      6,   592,  4088,     11,   5040,
-   8663,  91255,     28,   4346,  9172,   168,    229,   4734,
-  59139,    221,   7830,  30421,  1666,     4,    812,    416
+    18,     3088,    963,    123,   511, 11666,   3723,     42,
+    9374,   1990,   1412,      6,   592,  4088,     11,   5040,
+    8663,  91255,     28,   4346,  9172,   168,    229,   4734,
+    59139,   221,   7830,  30421,  1666,     4,    812,    416
 };
 
 static const int g_random1[NTEST_ALLOCS] =
@@ -151,7 +151,8 @@ static void do_mallocs(FAR void **mem, FAR const int *size,
 
               if (allocsize > g_alloc_info.mxordblk)
                 {
-                  fprintf(stderr, "   Normal, largest free block is only %lu\n",
+                  fprintf(stderr,
+                          "   Normal, largest free block is only %lu\n",
                           (unsigned long)g_alloc_info.mxordblk);
                 }
               else
@@ -190,7 +191,8 @@ static void do_reallocs(FAR void **mem, FAR const int *oldsize,
         {
           int allocsize = MM_ALIGN_UP(newsize[j] + SIZEOF_MM_ALLOCNODE);
 
-          fprintf(stderr, "(%d)realloc failed for allocsize=%d\n", i, allocsize);
+          fprintf(stderr,
+                  "(%d)realloc failed for allocsize=%d\n", i, allocsize);
           if (allocsize > g_alloc_info.mxordblk)
             {
               fprintf(stderr, "   Normal, largest free block is only %lu\n",
@@ -212,7 +214,9 @@ static void do_reallocs(FAR void **mem, FAR const int *oldsize,
     }
 }
 
-static void do_memaligns(FAR void **mem, FAR const int *size, FAR const int *align,
+static void do_memaligns(FAR void **mem,
+                         FAR const int *size,
+                         FAR const int *align,
                          FAR const int *seq, int n)
 {
   int i;
@@ -229,9 +233,11 @@ static void do_memaligns(FAR void **mem, FAR const int *size, FAR const int *ali
 
       if (mem[j] == NULL)
         {
-          int allocsize = MM_ALIGN_UP(size[j] + SIZEOF_MM_ALLOCNODE) + 2*align[i];
+          int allocsize = MM_ALIGN_UP(size[j] + SIZEOF_MM_ALLOCNODE) +
+                                      2 * align[i];
 
-          fprintf(stderr, "(%d)memalign failed for allocsize=%d\n", i, allocsize);
+          fprintf(stderr,
+                  "(%d)memalign failed for allocsize=%d\n", i, allocsize);
           if (allocsize > g_alloc_info.mxordblk)
             {
               fprintf(stderr, "   Normal, largest free block is only %lu\n",
@@ -291,7 +297,8 @@ int main(int argc, FAR char *argv[])
 
   /* Re-allocate the memory */
 
-  do_reallocs(g_allocs, g_alloc_sizes, g_realloc_sizes, g_random2, NTEST_ALLOCS);
+  do_reallocs(g_allocs, g_alloc_sizes,
+              g_realloc_sizes, g_random2, NTEST_ALLOCS);
 
   /* Release the memory */
 
@@ -299,8 +306,10 @@ int main(int argc, FAR char *argv[])
 
   /* Allocate aligned memory */
 
-  do_memaligns(g_allocs, g_alloc_sizes, g_alignment, g_random2, NTEST_ALLOCS / 2);
-  do_memaligns(g_allocs, g_alloc_sizes, g_alignment, &g_random2[NTEST_ALLOCS / 2],
+  do_memaligns(g_allocs, g_alloc_sizes,
+               g_alignment, g_random2, NTEST_ALLOCS / 2);
+  do_memaligns(g_allocs, g_alloc_sizes,
+               g_alignment, &g_random2[NTEST_ALLOCS / 2],
                NTEST_ALLOCS / 2);
 
   /* Release aligned memory */
diff --git a/testing/ostest/aio.c b/testing/ostest/aio.c
index efb000e..fd08ff3 100644
--- a/testing/ostest/aio.c
+++ b/testing/ostest/aio.c
@@ -53,6 +53,7 @@
 /****************************************************************************
  * Private Data
  ****************************************************************************/
+
 /* Constant write buffers */
 
 static const char g_wrbuffer1[] = "This is write buffer #1\n";
@@ -61,8 +62,7 @@ static char g_rdbuffer[AIO_RDBUFFER_SIZE];
 
 /* AIO control blocks:  write, nop, write, NULL, read */
 
-
-static struct aiocb g_aiocbs[AIO_NCTRLBLKS-1];
+static struct aiocb g_aiocbs[AIO_NCTRLBLKS - 1];
 static struct aiocb *g_aiocb[AIO_NCTRLBLKS];
 
 static struct aiocb * const g_aiocb_init[AIO_NCTRLBLKS] =
@@ -70,7 +70,6 @@ static struct aiocb * const g_aiocb_init[AIO_NCTRLBLKS] =
   &g_aiocbs[0], &g_aiocbs[1], &g_aiocbs[2], NULL, &g_aiocbs[3]
 };
 
-
 static FAR void * const g_buffers[AIO_NCTRLBLKS] =
 {
   (FAR void *)g_wrbuffer1,
@@ -110,7 +109,7 @@ static void init_aiocb(bool signal)
   FAR struct aiocb *aiocbp;
   int i;
 
-  memset(g_aiocbs, 0xff, (AIO_NCTRLBLKS-1)*sizeof(struct aiocb));
+  memset(g_aiocbs, 0xff, (AIO_NCTRLBLKS - 1) * sizeof(struct aiocb));
   memset(g_rdbuffer, 0xff, AIO_RDBUFFER_SIZE);
 
   for (i = 0; i < AIO_NCTRLBLKS; i++)
@@ -120,7 +119,8 @@ static void init_aiocb(bool signal)
 
       if (aiocbp)
         {
-          aiocbp->aio_sigevent.sigev_notify = signal ? SIGEV_SIGNAL : SIGEV_NONE;
+          aiocbp->aio_sigevent.sigev_notify =
+                               signal ? SIGEV_SIGNAL : SIGEV_NONE;
           aiocbp->aio_sigevent.sigev_signo  = SIGUSR1;
 #ifdef CONFIG_SIG_EVTHREAD
           aiocbp->aio_sigevent.sigev_notify_function   = NULL;
@@ -133,7 +133,7 @@ static void init_aiocb(bool signal)
           aiocbp->aio_fildes     = g_fildes;
           aiocbp->aio_reqprio    = 0;
           aiocbp->aio_lio_opcode = g_opcode[i];
-         }
+        }
     }
 }
 
@@ -294,10 +294,11 @@ void aio_test(void)
   /* Case 1: Poll for transfer complete */
 
   printf("AIO test case 1: Poll for transfer complete\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+             AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -311,7 +312,7 @@ void aio_test(void)
 
   do
     {
-      usleep(500*1000);
+      usleep(500 * 1000);
       ret = check_done();
     }
   while (ret < 0);
@@ -325,13 +326,14 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
   printf("AIO test case 2: Use LIO_WAIT for transfer complete\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+             AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -359,13 +361,14 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
   printf("AIO test case 3: Use aio_suspend for transfer complete\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+              AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -381,7 +384,8 @@ void aio_test(void)
   for (i = 1; i <= AIO_NCTRLBLKS; i++)
     {
       printf("  Calling aio_suspend #%d\n", i);
-      ret = aio_suspend((FAR const struct aiocb *const *)g_aiocb, AIO_NCTRLBLKS, NULL);
+      ret = aio_suspend((FAR const struct aiocb *const *)g_aiocb,
+                         AIO_NCTRLBLKS, NULL);
       if (ret < 0)
         {
           printf("aio_test: ERROR: aio_suspend failed: %d\n", errno);
@@ -406,7 +410,8 @@ void aio_test(void)
 
   if (total != AIO_NCTRLBLKS)
     {
-      printf("aio_test: ERROR: Total is %d, should be %d\n", total, AIO_NCTRLBLKS);
+      printf("aio_test: ERROR: Total is %d, should be %d\n",
+              total, AIO_NCTRLBLKS);
       goto errout_with_fildes;
     }
 
@@ -419,13 +424,14 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
   printf("AIO test case 4: Use individual signals for transfer complete\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+              AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -456,7 +462,8 @@ void aio_test(void)
                 }
               else
                 {
-                  printf("aio_test: ERROR: sigwaitinfo failed: %d\n", errcode);
+                  printf("aio_test: ERROR: sigwaitinfo failed: %d\n",
+                          errcode);
                   goto errout_with_fildes;
                 }
             }
@@ -477,13 +484,15 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
-  printf("AIO test case 5: Use list complete signal for transfer complete\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  printf("AIO test case 5:"
+         " Use list complete signal for transfer complete\n");
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+              AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -518,10 +527,11 @@ void aio_test(void)
                 }
               else
                 {
-                  printf("aio_test: ERROR: sigwaitinfo failed: %d\n", errcode);
+                  printf("aio_test: ERROR: sigwaitinfo failed: %d\n",
+                          errcode);
                   goto errout_with_fildes;
                 }
-          }
+            }
         }
     }
   while (ret < 0);
@@ -535,13 +545,14 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
   printf("AIO test case 6: Cancel I/O by AIO control block\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+              AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -564,7 +575,7 @@ void aio_test(void)
 
   do
     {
-      usleep(500*1000);
+      usleep(500 * 1000);
       ret = check_done();
     }
   while (ret < 0);
@@ -578,13 +589,14 @@ void aio_test(void)
    * task end of the last test case -- especially the dangling SIGPOLL.
    */
 
-  usleep(500*1000);
+  usleep(500 * 1000);
 
   printf("AIO test case 7:Cancel I/O by file descriptor\n");
-  g_fildes = open(AIO_FILEPATH, O_RDWR|O_CREAT|O_TRUNC);
+  g_fildes = open(AIO_FILEPATH, O_RDWR | O_CREAT | O_TRUNC);
   if (g_fildes < 0)
     {
-      printf("aio_test: ERROR: Failed to open %s: %d\n", AIO_FILEPATH, errno);
+      printf("aio_test: ERROR: Failed to open %s: %d\n",
+              AIO_FILEPATH, errno);
       goto errout_with_procmask;
     }
 
@@ -607,7 +619,7 @@ void aio_test(void)
 
   do
     {
-      usleep(500*1000);
+      usleep(500 * 1000);
       ret = check_done();
     }
   while (ret < 0);
diff --git a/testing/ostest/cancel.c b/testing/ostest/cancel.c
index 932345e..353a806 100644
--- a/testing/ostest/cancel.c
+++ b/testing/ostest/cancel.c
@@ -69,7 +69,7 @@ static FAR void *sem_waiter(FAR void *parameter)
 
   for (i = 0; i < CONFIG_PTHREAD_CLEANUP_STACKSIZE ; i++)
     {
-      pthread_cleanup_push(sem_cleaner, (FAR void *)((uintptr_t)(i+1)));
+      pthread_cleanup_push(sem_cleaner, (FAR void *)((uintptr_t)(i + 1)));
     }
 #endif
 
@@ -79,7 +79,8 @@ static FAR void *sem_waiter(FAR void *parameter)
   status = pthread_mutex_lock(&mutex);
   if (status != 0)
     {
-       printf("sem_waiter: ERROR pthread_mutex_lock failed, status=%d\n", status);
+       printf("sem_waiter: ERROR pthread_mutex_lock failed, status=%d\n",
+               status);
     }
 
   printf("sem_waiter: Starting wait for condition\n");
@@ -92,7 +93,9 @@ static FAR void *sem_waiter(FAR void *parameter)
       status = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
       if (status != 0)
         {
-           printf("sem_waiter: ERROR pthread_setcancelstate failed, status=%d\n", status);
+           printf("sem_waiter: "
+                  "ERROR pthread_setcancelstate failed, status=%d\n",
+                   status);
         }
     }
 
@@ -103,7 +106,8 @@ static FAR void *sem_waiter(FAR void *parameter)
   status = pthread_cond_wait(&cond, &mutex);
   if (status != 0)
     {
-      printf("sem_waiter: ERROR pthread_cond_wait failed, status=%d\n", status);
+      printf("sem_waiter: ERROR pthread_cond_wait failed, status=%d\n",
+             status);
     }
 
   if (!parameter)
@@ -114,7 +118,9 @@ static FAR void *sem_waiter(FAR void *parameter)
       status = pthread_mutex_unlock(&mutex);
       if (status != 0)
         {
-          printf("sem_waiter: ERROR pthread_mutex_unlock failed, status=%d\n", status);
+          printf("sem_waiter: "
+                 "ERROR pthread_mutex_unlock failed, status=%d\n",
+                  status);
         }
 
       /* Set the cancelable state */
@@ -123,12 +129,14 @@ static FAR void *sem_waiter(FAR void *parameter)
       status = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
       if (status != 0)
         {
-          printf("sem_waiter: ERROR pthread_setcancelstate failed, status=%d\n", status);
+          printf("sem_waiter: "
+                 "ERROR pthread_setcancelstate failed, status=%d\n", status);
         }
     }
   else
     {
-      printf("sem_waiter: ERROR pthread_cond_wait returned after being cancelled!\n");
+      printf("sem_waiter: "
+             "ERROR pthread_cond_wait returned after being cancelled!\n");
     }
 
   /* Why is this here?  Because pthread_setcancelstate() is not a
@@ -180,7 +188,7 @@ static FAR void *mqueue_waiter(FAR void *parameter)
   attr.mq_msgsize = CONFIG_MQ_MAXMSGSIZE;
   attr.mq_flags   = 0;
 
-  mqcancel = mq_open("mqcancel", O_RDONLY|O_CREAT, 0666, &attr);
+  mqcancel = mq_open("mqcancel", O_RDONLY | O_CREAT, 0666, &attr);
   if (mqcancel < 0)
     {
       printf("mqueue_waiter: ERROR mq_open failed\n");
@@ -196,9 +204,9 @@ static FAR void *mqueue_waiter(FAR void *parameter)
   printf("mqueue_waiter: Awakened with %d\n", (int)nbytes);
 
   if (mq_close(mqcancel) < 0)
-   {
-     printf("mqueue_waiter: ERROR mq_close failed\n");
-   }
+    {
+      printf("mqueue_waiter: ERROR mq_close failed\n");
+    }
 
   printf("mqueue_waiter: Exit with status 0x12345678\n");
   pthread_exit((pthread_addr_t)0x12345678);
@@ -239,7 +247,8 @@ static FAR void *asynch_waiter(FAR void *parameter)
 
   for (i = 0; i < CONFIG_PTHREAD_CLEANUP_STACKSIZE ; i++)
     {
-      pthread_cleanup_push(sem_cleaner, (FAR void *)((uintptr_t)(i+1)));
+      pthread_cleanup_push(sem_cleaner,
+                          (FAR void *)((uintptr_t)(i + 1)));
     }
 #endif
 
@@ -249,7 +258,9 @@ static FAR void *asynch_waiter(FAR void *parameter)
   status = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
   if (status != 0)
     {
-       printf("asynch_waiter: ERROR pthread_setcancelstate failed, status=%d\n", status);
+       printf("asynch_waiter: "
+              "ERROR pthread_setcancelstate failed, status=%d\n",
+               status);
     }
 
   /* Set the asynchronous cancellation type */
@@ -258,14 +269,16 @@ static FAR void *asynch_waiter(FAR void *parameter)
   status = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
   if (status != 0)
     {
-       printf("asynch_waiter: ERROR pthread_setcanceltype failed, status=%d\n", status);
+       printf("asynch_waiter: "
+              "ERROR pthread_setcanceltype failed, status=%d\n",
+               status);
     }
 
-  /* Then wait a bit.  We should be canceled aynchronously while waiting, but the
-   * cancellation should pend because we are non-cancellable.
+  /* Then wait a bit.  We should be canceled aynchronously while waiting, but
+   * the cancellation should pend because we are non-cancellable.
    */
 
-  usleep(250*1000);
+  usleep(250 * 1000);
 
   /* We should be canceled when restore the cancelable state. */
 
@@ -278,7 +291,8 @@ static FAR void *asynch_waiter(FAR void *parameter)
 
   if (status != 0)
     {
-      printf("asynch_waiter: ERROR pthread_setcancelstate failed, status=%d\n",
+      printf("asynch_waiter: "
+             "ERROR pthread_setcancelstate failed, status=%d\n",
              status);
     }
 
@@ -302,7 +316,8 @@ static void start_thread(FAR void *(*entry)(FAR void *), pthread_t *waiter,
   status = pthread_mutex_init(&mutex, NULL);
   if (status != 0)
     {
-      printf("start_thread: ERROR pthread_mutex_init failed, status=%d\n", status);
+      printf("start_thread: "
+             "ERROR pthread_mutex_init failed, status=%d\n", status);
     }
 
   /* Initialize the condition variable */
@@ -311,7 +326,8 @@ static void start_thread(FAR void *(*entry)(FAR void *), pthread_t *waiter,
   status = pthread_cond_init(&cond, NULL);
   if (status != 0)
     {
-      printf("start_thread: ERROR pthread_cond_init failed, status=%d\n", status);
+      printf("start_thread: ERROR pthread_cond_init failed, status=%d\n",
+              status);
     }
 
   /* Set up attributes */
@@ -325,7 +341,8 @@ static void start_thread(FAR void *(*entry)(FAR void *), pthread_t *waiter,
   status = pthread_attr_setstacksize(&attr, STACKSIZE);
   if (status != 0)
     {
-      printf("start_thread: pthread_attr_setstacksize failed, status=%d\n", status);
+      printf("start_thread: pthread_attr_setstacksize failed, status=%d\n",
+              status);
     }
 
   /* Start the waiter thread  */
@@ -335,7 +352,8 @@ static void start_thread(FAR void *(*entry)(FAR void *), pthread_t *waiter,
                           (pthread_addr_t)((uintptr_t)cancelable));
   if (status != 0)
     {
-      printf("start_thread: ERROR pthread_create failed, status=%d\n", status);
+      printf("start_thread: ERROR pthread_create failed, status=%d\n",
+              status);
     }
 
   /* Make sure that the waiter thread gets a chance to run */
@@ -355,18 +373,21 @@ static void restart_thread(FAR void *(*entry)(FAR void *), pthread_t *waiter,
   status = pthread_cond_destroy(&cond);
   if (status != 0)
     {
-      printf("restart_thread: ERROR pthread_cond_destroy failed, status=%d\n", status);
+      printf("restart_thread: "
+             "ERROR pthread_cond_destroy failed, status=%d\n", status);
     }
 
-  /* Destroy the mutex. Note that this relies on non-portable NuttX assumption,
-   * that it is possible to destroy a locked mutex owned by a cancelled thread.
+  /* Destroy the mutex.
+   * Note that this relies on non-portable NuttX assumption, that it
+   * is possible to destroy a locked mutex owned by a cancelled thread.
    */
 
   printf("restart_thread: Destroying mutex\n");
   status = pthread_mutex_destroy(&mutex);
   if (status != 0)
     {
-      printf("restart_thread: ERROR pthread_mutex_destroy failed, status=%d\n", status);
+      printf("restart_thread: "
+             "ERROR pthread_mutex_destroy failed, status=%d\n", status);
     }
 
   /* Then restart the thread */
@@ -389,7 +410,8 @@ void cancel_test(void)
   void *result;
   int status;
 
-  /* Test 1: Normal Cancel *********************************************/
+  /* Test 1: Normal Cancel **************************************************/
+
   /* Start the waiter thread  */
 
   printf("cancel_test: Test 1a: Normal Cancellation\n");
@@ -400,13 +422,14 @@ void cancel_test(void)
    * make sure.
    */
 
-  usleep(75*1000);
+  usleep(75 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n",
+              status);
     }
 
   /* Then join to the thread to pick up the result (if we don't do
@@ -417,22 +440,25 @@ void cancel_test(void)
   status = pthread_join(waiter, &result);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_join failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_join failed, status=%d\n",
+              status);
     }
   else
     {
       printf("cancel_test: waiter exited with result=%p\n", result);
       if (result != PTHREAD_CANCELED)
         {
-          printf("cancel_test: ERROR expected result=%p\n", PTHREAD_CANCELED);
+          printf("cancel_test: ERROR expected result=%p\n",
+                  PTHREAD_CANCELED);
         }
       else
         {
-          printf("cancel_test: PASS thread terminated with PTHREAD_CANCELED\n");
+          printf("cancel_test:"
+                 " PASS thread terminated with PTHREAD_CANCELED\n");
         }
     }
 
-  /* Test 2: Asynchronous Cancel ***************************************/
+  /* Test 2: Asynchronous Cancel ********************************************/
 
   printf("cancel_test: Test 2: Asynchronous Cancellation\n");
 
@@ -453,13 +479,14 @@ void cancel_test(void)
    * bit to make sure.
    */
 
-  usleep(100*1000);
+  usleep(100 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n",
+              status);
     }
 
   /* Then join to the thread to pick up the result (if we don't do
@@ -470,25 +497,28 @@ void cancel_test(void)
   status = pthread_join(waiter, &result);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_join failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_join failed, status=%d\n",
+              status);
     }
   else
     {
       printf("cancel_test: waiter exited with result=%p\n", result);
       if (result != PTHREAD_CANCELED)
         {
-          printf("cancel_test: ERROR expected result=%p\n", PTHREAD_CANCELED);
+          printf("cancel_test: ERROR expected result=%p\n",
+                  PTHREAD_CANCELED);
         }
       else
         {
-          printf("cancel_test: PASS thread terminated with PTHREAD_CANCELED\n");
+          printf("cancel_test: "
+                 "PASS thread terminated with PTHREAD_CANCELED\n");
         }
     }
 #else
   printf("... Skipped\n");
 #endif
 
-  /* Test 3: Cancel Detached Thread ************************************/
+  /* Test 3: Cancel Detached Thread *****************************************/
 
   printf("cancel_test: Test 3: Cancellation of detached thread\n");
   printf("cancel_test: Re-starting thread\n");
@@ -506,13 +536,14 @@ void cancel_test(void)
    * bit to be certain.
    */
 
-  usleep(100*1000);
+  usleep(100 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n",
+              status);
     }
 
 #ifdef CONFIG_CANCELLATION_POINTS
@@ -521,7 +552,7 @@ void cancel_test(void)
    * before the cancellation.
    */
 
-  usleep(100*1000);
+  usleep(100 * 1000);
 #endif
 
   /* Join should now fail */
@@ -534,14 +565,17 @@ void cancel_test(void)
     }
   else if (status != ESRCH)
     {
-      printf("cancel_test: ERROR pthread_join failed but with wrong status=%d\n", status);
+      printf("cancel_test:"
+             " ERROR pthread_join failed but with wrong status=%d\n",
+             status);
     }
   else
     {
       printf("cancel_test: PASS pthread_join failed with status=ESRCH\n");
     }
 
-  /* Test 4: Non-cancelable threads ************************************/
+  /* Test 4: Non-cancelable threads *****************************************/
+
   /* This test currently depends on signals.  It doesn't have to and
    * could be re-designed so that it does not depend on signals.
    */
@@ -554,7 +588,7 @@ void cancel_test(void)
    * This is the dependency on signals:
    */
 
-  usleep(200*1000);
+  usleep(200 * 1000);
 
   /* Then cancel it.  It should be in the pthread_cond_wait now.  The
    * behavior here is non-standard:  when the thread is at a cancellation
@@ -563,13 +597,14 @@ void cancel_test(void)
    * The cancellation should succeed, because the cancellation is pending.
    */
 
-  usleep(100*1000);
+  usleep(100 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_cancel failed, status=%d\n",
+             status);
     }
 
   /* Signal the thread.  It should wake up and restore the cancelable state.
@@ -579,19 +614,22 @@ void cancel_test(void)
   status = pthread_mutex_lock(&mutex);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_mutex_lock failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_mutex_lock failed, status=%d\n",
+              status);
     }
 
   status = pthread_cond_signal(&cond);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_cond_signal failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_cond_signal failed, status=%d\n",
+             status);
     }
 
   status = pthread_mutex_unlock(&mutex);
   if (status != 0)
     {
-      printf("cancel_test: ERROR pthread_mutex_unlock failed, status=%d\n", status);
+      printf("cancel_test: ERROR pthread_mutex_unlock failed, status=%d\n",
+             status);
     }
 
   /* Then join to the thread to pick up the result (if we don't do
@@ -609,11 +647,13 @@ void cancel_test(void)
       printf("cancel_test: waiter exited with result=%p\n", result);
       if (result != PTHREAD_CANCELED)
         {
-          printf("cancel_test: ERROR expected result=%p\n", PTHREAD_CANCELED);
+          printf("cancel_test: ERROR expected result=%p\n",
+                  PTHREAD_CANCELED);
         }
       else
         {
-          printf("cancel_test: PASS thread terminated with PTHREAD_CANCELED\n");
+          printf("cancel_test: "
+                 "PASS thread terminated with PTHREAD_CANCELED\n");
         }
     }
 
@@ -629,7 +669,7 @@ void cancel_test(void)
   attr.mq_msgsize = CONFIG_MQ_MAXMSGSIZE;
   attr.mq_flags   = 0;
 
-  mqcancel = mq_open("mqcancel", O_WRONLY|O_CREAT, 0666, &attr);
+  mqcancel = mq_open("mqcancel", O_WRONLY | O_CREAT, 0666, &attr);
   if (mqcancel == (mqd_t)-1)
     {
       printf("sender_thread: ERROR mq_open failed\n");
@@ -644,7 +684,7 @@ void cancel_test(void)
    * make sure.
    */
 
-  usleep(75*1000);
+  usleep(75 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
@@ -675,7 +715,8 @@ void cancel_test(void)
         }
       else
         {
-          printf("cancel_test: PASS thread terminated with PTHREAD_CANCELED\n");
+          printf("cancel_test: "
+                 "PASS thread terminated with PTHREAD_CANCELED\n");
         }
     }
 
@@ -686,7 +727,7 @@ void cancel_test(void)
       printf("sender_thread: ERROR mq_close failed\n");
     }
 #else
-   printf("Skipped\n");
+  printf("Skipped\n");
 #endif
 
   printf("cancel_test: Test 7: Cancel signal wait\n");
@@ -701,7 +742,7 @@ void cancel_test(void)
    * make sure.
    */
 
-  usleep(75*1000);
+  usleep(75 * 1000);
 
   printf("cancel_test: Canceling thread\n");
   status = pthread_cancel(waiter);
@@ -732,10 +773,11 @@ void cancel_test(void)
         }
       else
         {
-          printf("cancel_test: PASS thread terminated with PTHREAD_CANCELED\n");
+          printf("cancel_test: "
+                 "PASS thread terminated with PTHREAD_CANCELED\n");
         }
     }
 #else
-   printf("Skipped\n");
+  printf("Skipped\n");
 #endif
 }
diff --git a/testing/ostest/cond.c b/testing/ostest/cond.c
index 93ffe82..8fc3432 100644
--- a/testing/ostest/cond.c
+++ b/testing/ostest/cond.c
@@ -18,16 +18,29 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
 #include <stdio.h>
 #include <pthread.h>
 #include <unistd.h>
 #include "ostest.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
 #ifndef NULL
 # define NULL (void*)0
 #endif
 
-static volatile enum { RUNNING, MUTEX_WAIT, COND_WAIT} waiter_state;
+static volatile enum
+{
+  RUNNING,
+  MUTEX_WAIT,
+  COND_WAIT
+} waiter_state;
 
 static pthread_mutex_t mutex;
 static pthread_cond_t  cond;
@@ -40,13 +53,17 @@ static int signaler_already = 0;
 static int signaler_state = 0;
 static int signaler_nerrors = 0;
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
 static void *thread_waiter(void *parameter)
 {
   int status;
 
   printf("waiter_thread: Started\n");
 
-  for (;;)
+  for (; ; )
     {
       /* Take the mutex */
 
@@ -56,7 +73,8 @@ static void *thread_waiter(void *parameter)
 
       if (status != 0)
         {
-          printf("waiter_thread: ERROR pthread_mutex_lock failed, status=%d\n", status);
+          printf("waiter_thread: "
+                 "ERROR pthread_mutex_lock failed, status=%d\n", status);
           waiter_nerrors++;
         }
 
@@ -66,24 +84,27 @@ static void *thread_waiter(void *parameter)
 
       if (!data_available)
         {
-           /* We are higher priority than the signaler thread so the
-            * only time that the signaler thread will have a chance to run is when
-            * we are waiting for the condition variable.  In this case, pthread_cond_wait
-            * will automatically release the mutex for the signaler (then re-acquire
-            * the mutex before returning.
-            */
-
-           waiter_state = COND_WAIT;
-           status       = pthread_cond_wait(&cond, &mutex);
-           waiter_state = RUNNING;
-
-           if (status != 0)
-             {
-               printf("waiter_thread: ERROR pthread_cond_wait failed, status=%d\n", status);
-               waiter_nerrors++;
-             }
-
-           waiter_waits++;
+          /* We are higher priority than the signaler thread so the
+           * only time that the signaler thread will have a chance to run
+           * is when we are waiting for the condition variable.
+           * In this case, pthread_cond_wait will automatically release
+           * the mutex for the signaler (then re-acquire the mutex before
+           * returning.
+           */
+
+          waiter_state = COND_WAIT;
+          status       = pthread_cond_wait(&cond, &mutex);
+          waiter_state = RUNNING;
+
+          if (status != 0)
+            {
+              printf("waiter_thread: "
+                     "ERROR pthread_cond_wait failed, status=%d\n",
+                     status);
+              waiter_nerrors++;
+            }
+
+          waiter_waits++;
         }
 
       /* Now data should be available */
@@ -103,7 +124,8 @@ static void *thread_waiter(void *parameter)
       status = pthread_mutex_unlock(&mutex);
       if (status != 0)
         {
-          printf("waiter_thread: ERROR waiter: pthread_mutex_unlock failed, status=%d\n", status);
+          printf("waiter_thread: ERROR waiter: "
+                 "pthread_mutex_unlock failed, status=%d\n", status);
           waiter_nerrors++;
         }
 
@@ -129,7 +151,8 @@ static void *thread_signaler(void *parameter)
       status = pthread_mutex_lock(&mutex);
       if (status != 0)
         {
-          printf("thread_signaler: ERROR pthread_mutex_lock failed, status=%d\n", status);
+          printf("thread_signaler: "
+                 "ERROR pthread_mutex_lock failed, status=%d\n", status);
           signaler_nerrors++;
         }
 
@@ -137,13 +160,16 @@ static void *thread_signaler(void *parameter)
 
       if (waiter_state != COND_WAIT)
         {
-          printf("thread_signaler: ERROR waiter state = %d != COND_WAITING\n", waiter_state);
+          printf("thread_signaler: "
+                 "ERROR waiter state = %d != COND_WAITING\n", waiter_state);
           signaler_state++;
         }
 
       if (data_available)
         {
-          printf("thread_signaler: ERROR data already available, waiter_state=%d\n", waiter_state);
+          printf("thread_signaler: "
+                 "ERROR data already available, waiter_state=%d\n",
+                  waiter_state);
           signaler_already++;
         }
 
@@ -153,16 +179,18 @@ static void *thread_signaler(void *parameter)
       status = pthread_cond_signal(&cond);
       if (status != 0)
         {
-          printf("thread_signaler: ERROR pthread_cond_signal failed, status=%d\n", status);
+          printf("thread_signaler: "
+                 "ERROR pthread_cond_signal failed, status=%d\n", status);
           signaler_nerrors++;
         }
 
-     /* Release the mutex */
+      /* Release the mutex */
 
       status = pthread_mutex_unlock(&mutex);
       if (status != 0)
         {
-          printf("thread_signaler: ERROR pthread_mutex_unlock failed, status=%d\n", status);
+          printf("thread_signaler: "
+                 "ERROR pthread_mutex_unlock failed, status=%d\n", status);
           signaler_nerrors++;
         }
 
@@ -207,7 +235,8 @@ void cond_test(void)
   status = pthread_mutex_init(&mutex, NULL);
   if (status != 0)
     {
-      printf("cond_test: ERROR pthread_mutex_init failed, status=%d\n", status);
+      printf("cond_test: "
+             "ERROR pthread_mutex_init failed, status=%d\n", status);
     }
 
   /* Initialize the condition variable */
@@ -216,7 +245,8 @@ void cond_test(void)
   status = pthread_cond_init(&cond, NULL);
   if (status != 0)
     {
-      printf("cond_test: ERROR pthread_condinit failed, status=%d\n", status);
+      printf("cond_test: "
+             "ERROR pthread_condinit failed, status=%d\n", status);
     }
 
   /* Start the waiter thread at higher priority */
@@ -233,14 +263,16 @@ void cond_test(void)
   prio_mid = (prio_min + prio_max) / 2;
 
   sparam.sched_priority = prio_mid;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("cond_test: pthread_attr_setschedparam failed, status=%d\n", status);
+      printf("cond_test: "
+             "pthread_attr_setschedparam failed, status=%d\n", status);
     }
   else
     {
-      printf("cond_test: Set thread 1 priority to %d\n", sparam.sched_priority);
+      printf("cond_test: Set thread 1 priority to %d\n",
+              sparam.sched_priority);
     }
 
   status = pthread_create(&waiter, &attr, thread_waiter, NULL);
@@ -257,14 +289,16 @@ void cond_test(void)
     }
 
   sparam.sched_priority = (prio_min + prio_mid) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("cond_test: pthread_attr_setschedparam failed, status=%d\n", status);
+      printf("cond_test: pthread_attr_setschedparam failed, status=%d\n",
+              status);
     }
   else
     {
-      printf("cond_test: Set thread 2 priority to %d\n", sparam.sched_priority);
+      printf("cond_test: Set thread 2 priority to %d\n",
+              sparam.sched_priority);
     }
 
   status = pthread_create(&signaler, &attr, thread_signaler, NULL);
@@ -290,8 +324,10 @@ void cond_test(void)
   printf("cond_test:\n");
   printf("cond_test: %d times, waiter did not have to wait for data\n",
           waiter_nloops - waiter_waits);
-  printf("cond_test: %d times, data was already available when the signaler run\n",
+  printf("cond_test: %d times, "
+         "data was already available when the signaler run\n",
           signaler_already);
-  printf("cond_test: %d times, the waiter was in an unexpected state when the signaler ran\n",
+  printf("cond_test: %d times, "
+         "the waiter was in an unexpected state when the signaler ran\n",
          signaler_state);
 }
diff --git a/testing/ostest/nsem.c b/testing/ostest/nsem.c
index 858d4a9..bc933be 100644
--- a/testing/ostest/nsem.c
+++ b/testing/ostest/nsem.c
@@ -73,7 +73,7 @@ static FAR void *nsem_peer(void *parameter)
   /* Open semaphore 2.  We will create that one */
 
   printf("nsem_peer: Create semaphore 2 with value == 0\n");
-  sem2 = sem_open(SEM2_NAME, O_CREAT|O_EXCL, 0644, 0);
+  sem2 = sem_open(SEM2_NAME, O_CREAT | O_EXCL, 0644, 0);
   if (sem1 == SEM_FAILED)
     {
       int errcode = errno;
@@ -118,7 +118,7 @@ void nsem_test(void)
   /* Open semaphore 2.  We will create that one */
 
   printf("nsem_test: Create semaphore 1 with value == 0\n");
-  sem1 = sem_open(SEM1_NAME, O_CREAT|O_EXCL, 0644, 0);
+  sem1 = sem_open(SEM1_NAME, O_CREAT | O_EXCL, 0644, 0);
   if (sem1 == SEM_FAILED)
     {
       int errcode = errno;
@@ -140,10 +140,12 @@ void nsem_test(void)
   prio_mid = (prio_min + prio_max) / 2;
 
   sparam.sched_priority = (prio_mid + prio_max) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("nsem_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("nsem_test: "
+             "ERROR: pthread_attr_setschedparam failed, status=%d\n",
+              status);
     }
   else
     {
diff --git a/testing/ostest/pthread_rwlock.c b/testing/ostest/pthread_rwlock.c
index d9af5d2..b88456d 100644
--- a/testing/ostest/pthread_rwlock.c
+++ b/testing/ostest/pthread_rwlock.c
@@ -40,6 +40,7 @@ struct race_cond_s
 /****************************************************************************
  * Private Data
  ****************************************************************************/
+
 static int g_race_cond_thread_pos;
 
 /****************************************************************************
@@ -85,7 +86,8 @@ static FAR void *race_cond_thread1(FAR void *data)
   status = pthread_rwlock_rdlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to open rwlock for reading. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to open rwlock for reading. Status: %d\n", status);
     }
 
   sem_wait(rc->sem1);
@@ -107,7 +109,8 @@ static FAR void *race_cond_thread1(FAR void *data)
   status = pthread_rwlock_rdlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to open rwlock for reading. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to open rwlock for reading. Status: %d\n", status);
     }
 
   sem_post(rc->sem2);
@@ -124,7 +127,8 @@ static FAR void *race_cond_thread1(FAR void *data)
   status = pthread_rwlock_unlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to unlock lock held for reading. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to unlock lock held for reading. Status: %d\n", status);
     }
 
   return NULL;
@@ -141,25 +145,31 @@ static FAR void *race_cond_thread2(FAR void *data)
 
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to wait on semaphore. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to wait on semaphore. Status: %d\n", status);
     }
 
   if (g_race_cond_thread_pos++ != 1)
     {
-      printf("pthread_rwlock: Thread order unexpected. Expected 1, got %d", g_race_cond_thread_pos);
+      printf("pthread_rwlock: "
+             "Thread order unexpected. Expected 1, got %d",
+              g_race_cond_thread_pos);
     }
 
   status = pthread_rwlock_tryrdlock(rc->rw_lock);
   if (status != EBUSY)
     {
-      printf("pthread_rwlock: Opened rw_lock for rd when locked for writing: %d\n", status);
+      printf("pthread_rwlock: "
+             "Opened rw_lock for rd when locked for writing: %d\n", status);
     }
 
   status = pthread_rwlock_trywrlock(rc->rw_lock);
   if (status != EBUSY)
     {
-      printf("pthread_rwlock: Opened rw_lock for wr when locked for writing: %d\n", status);
+      printf("pthread_rwlock: "
+             "Opened rw_lock for wr when locked for writing: %d\n", status);
     }
+
   sem_post(rc->sem1);
   status = pthread_rwlock_rdlock(rc->rw_lock);
 
@@ -167,7 +177,8 @@ static FAR void *race_cond_thread2(FAR void *data)
 
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to open rwlock for reading. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to open rwlock for reading. Status: %d\n", status);
     }
 
   if (g_race_cond_thread_pos++ != 3)
@@ -200,7 +211,8 @@ static FAR void *race_cond_thread2(FAR void *data)
 
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to open rwlock for reading. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to open rwlock for reading. Status: %d\n", status);
     }
 
   if (g_race_cond_thread_pos++ != 7)
@@ -212,7 +224,8 @@ static FAR void *race_cond_thread2(FAR void *data)
   status = pthread_rwlock_unlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to unlock lock held for writing. Status: %d\n", status);
+      printf("pthread_rwlock: "
+             "Failed to unlock lock held for writing. Status: %d\n", status);
     }
 
   return NULL;
@@ -231,7 +244,8 @@ static void test_two_threads(void)
   status = pthread_rwlock_init(&rw_lock, NULL);
   if (status != 0)
     {
-      printf("pthread_rwlock: ERROR pthread_rwlock_init failed, status=%d\n", status);
+      printf("pthread_rwlock: "
+             "ERROR pthread_rwlock_init failed, status=%d\n", status);
     }
 
   status = sem_init(&sem1, 0, 0);
@@ -265,7 +279,8 @@ static void * timeout_thread1(FAR void * data)
   status = pthread_rwlock_wrlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to acquire rw_lock. Status: %d\n", status);
+      printf("pthread_rwlock: Failed to acquire rw_lock. Status: %d\n",
+              status);
     }
 
   sem_wait(rc->sem1);
@@ -273,7 +288,8 @@ static void * timeout_thread1(FAR void * data)
   status = pthread_rwlock_unlock(rc->rw_lock);
   if (status != 0)
     {
-      printf("pthread_rwlock: Failed to unlock rw_lock. Status: %d\n", status);
+      printf("pthread_rwlock: Failed to unlock rw_lock. Status: %d\n",
+              status);
     }
 
   return NULL;
@@ -408,15 +424,15 @@ void pthread_rwlock_test(void)
   status = pthread_rwlock_trywrlock(&rw_lock);
   if (status != EBUSY)
     {
-      printf("pthread_rwlock: "
-             "ERROR able to acquire write lock when write lock already acquired\n");
+      printf("pthread_rwlock: ERROR "
+            "able to acquire write lock when write lock already acquired\n");
     }
 
   status = pthread_rwlock_tryrdlock(&rw_lock);
   if (status != EBUSY)
     {
-      printf("pthread_rwlock: "
-             "ERROR able to acquire read lock when write lock already acquired\n");
+      printf("pthread_rwlock: ERROR "
+             "able to acquire read lock when write lock already acquired\n");
     }
 
   status = pthread_rwlock_unlock(&rw_lock);
diff --git a/testing/ostest/restart.c b/testing/ostest/restart.c
index 40c1f3a..6bcb024 100644
--- a/testing/ostest/restart.c
+++ b/testing/ostest/restart.c
@@ -45,7 +45,7 @@
  * Private Data
  ****************************************************************************/
 
-static char * const g_argv[NARGS+1] =
+static char * const g_argv[NARGS + 1] =
 {
   "This is argument 1",
   "Argument 2 here",
@@ -78,16 +78,17 @@ static int restart_main(int argc, char *argv[])
   if (argc != NARGS + 1)
     {
       printf("restart_main: ERROR: Expected argc=%d got argc=%d\n",
-             NARGS+1, argc);
+             NARGS + 1, argc);
     }
 
   for (i = 0; i <= NARGS; i++)
     {
       printf("restart_main: argv[%d]=\"%s\"\n", i, argv[i]);
-      if (i > 0 && strcmp(argv[i], g_argv[i-1]) != 0)
+      if (i > 0 && strcmp(argv[i], g_argv[i - 1]) != 0)
         {
-          printf("restart_main: ERROR: Expected argv[%d]=\"%s\" got \"%s\"\n",
-                 i, argv[i], g_argv[i-1]);
+          printf("restart_main: ERROR: "
+                 "Expected argv[%d]=\"%s\" got \"%s\"\n",
+                 i, argv[i], g_argv[i - 1]);
         }
     }
 
@@ -102,8 +103,10 @@ static int restart_main(int argc, char *argv[])
         }
       else
         {
-          printf("restart_main: ERROR Variable=%s has the wrong value\n", g_varname);
-          printf("restart_main:       found=%s expected=%s\n", actual, g_varvalue);
+          printf("restart_main: ERROR Variable=%s has the wrong value\n",
+                 g_varname);
+          printf("restart_main:       found=%s expected=%s\n",
+                 actual, g_varvalue);
         }
     }
   else
@@ -122,7 +125,7 @@ static int restart_main(int argc, char *argv[])
 
       /* Now just wait to be restarted */
 
-      for (;;)
+      for (; ; )
         {
           sleep(2);
           printf("restart_main: I am still here\n");
diff --git a/testing/ostest/rmutex.c b/testing/ostest/rmutex.c
index 1ff680a..3fd10cd 100644
--- a/testing/ostest/rmutex.c
+++ b/testing/ostest/rmutex.c
@@ -18,16 +18,28 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
 #include <stdio.h>
 #include <pthread.h>
 #include "ostest.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
 #define NTHREADS    3
 #define NLOOPS      3
 #define NRECURSIONS 3
 
 static pthread_mutex_t mut;
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
 static void thread_inner(int id, int level)
 {
   int status;
@@ -39,9 +51,11 @@ static void thread_inner(int id, int level)
       status = pthread_mutex_lock(&mut);
       if (status != 0)
         {
-          printf("thread_inner[%d, %d]: ERROR pthread_mutex_lock failed: %d\n",
+          printf("thread_inner[%d, %d]: "
+                 "ERROR pthread_mutex_lock failed: %d\n",
                   id, level, status);
         }
+
       printf("thread_inner[%d, %d]: Locked\n", id, level);
 
       /* Try-lock already locked recursive mutex. */
@@ -49,7 +63,8 @@ static void thread_inner(int id, int level)
       status = pthread_mutex_trylock(&mut);
       if (status != 0)
         {
-          printf("thread_inner[%d, %d]: ERROR pthread_mutex_trylock failed: %d\n",
+          printf("thread_inner[%d, %d]: "
+                 "ERROR pthread_mutex_trylock failed: %d\n",
                   id, level, status);
         }
       else
@@ -59,15 +74,16 @@ static void thread_inner(int id, int level)
           status = pthread_mutex_unlock(&mut);
           if (status != 0)
             {
-              printf("thread_inner[%d, %d]: ERROR pthread_mutex_unlock after try-lock failed: %d\n",
-                 id, level, status);
+              printf("thread_inner[%d, %d]: ERROR "
+                     "pthread_mutex_unlock after try-lock failed: %d\n",
+                      id, level, status);
             }
         }
 
       /* Give the other threads a chance */
 
       pthread_yield();
-      thread_inner(id, level+1);
+      thread_inner(id, level + 1);
       pthread_yield();
 
       /* Unlock the mutex */
@@ -76,9 +92,11 @@ static void thread_inner(int id, int level)
       status = pthread_mutex_unlock(&mut);
       if (status != 0)
         {
-          printf("thread_inner[%d, %d]: ERROR pthread_mutex_unlock failed: %d\n",
+          printf("thread_inner[%d, %d]: "
+                 "ERROR pthread_mutex_unlock failed: %d\n",
                  id, level, status);
         }
+
       printf("thread_inner[%d, %d]: Unlocked\n", id, level);
       pthread_yield();
     }
@@ -118,17 +136,21 @@ void recursive_mutex_test(void)
   status = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
   if (status != 0)
     {
-      printf("recursive_mutex_test: ERROR pthread_mutexattr_settype failed, status=%d\n", status);
+      printf("recursive_mutex_test: "
+             "ERROR pthread_mutexattr_settype failed, status=%d\n", status);
     }
 
   status = pthread_mutexattr_gettype(&mattr, &type);
   if (status != 0)
     {
-      printf("recursive_mutex_test: ERROR pthread_mutexattr_gettype failed, status=%d\n", status);
+      printf("recursive_mutex_test: "
+             "ERROR pthread_mutexattr_gettype failed, status=%d\n", status);
     }
+
   if (type != PTHREAD_MUTEX_RECURSIVE)
     {
-      printf("recursive_mutex_test: ERROR pthread_mutexattr_gettype return type=%d\n", type);
+      printf("recursive_mutex_test: "
+             "ERROR pthread_mutexattr_gettype return type=%d\n", type);
     }
 
   /* Initialize the mutex */
@@ -137,23 +159,27 @@ void recursive_mutex_test(void)
   status = pthread_mutex_init(&mut, &mattr);
   if (status != 0)
     {
-      printf("recursive_mutex_test: ERROR pthread_mutex_init failed, status=%d\n", status);
+      printf("recursive_mutex_test: "
+             "ERROR pthread_mutex_init failed, status=%d\n", status);
     }
 
   /* Start the threads -- all at the same, default priority */
 
   for (i = 0; i < NTHREADS; i++)
     {
-      printf("recursive_mutex_test: Starting thread %d\n", i+1);
+      printf("recursive_mutex_test: Starting thread %d\n", i + 1);
 #ifdef SDCC
       pthread_attr_init(&attr);
-      status = pthread_create(&thread[i], &attr, thread_outer, (pthread_addr_t)((uintptr_t)i+1));
+      status = pthread_create(&thread[i], &attr, thread_outer,
+                             (pthread_addr_t)((uintptr_t)i + 1));
 #else
-      status = pthread_create(&thread[i], NULL, thread_outer, (pthread_addr_t)((uintptr_t)i+1));
+      status = pthread_create(&thread[i], NULL, thread_outer,
+                             (pthread_addr_t)((uintptr_t)i + 1));
 #endif
       if (status != 0)
         {
-          printf("recursive_mutex_test: ERROR thread#%d creation: %d\n", i+1, status);
+          printf("recursive_mutex_test: ERROR thread#%d creation: %d\n",
+                 i + 1, status);
         }
     }
 
@@ -161,7 +187,7 @@ void recursive_mutex_test(void)
 
   for (i = 0; i < NTHREADS; i++)
     {
-      printf("recursive_mutex_test: Waiting for thread %d\n", i+1);
+      printf("recursive_mutex_test: Waiting for thread %d\n", i + 1);
 #ifdef SDCC
       pthread_join(thread[i], &result[i]);
 #else
diff --git a/testing/ostest/robust.c b/testing/ostest/robust.c
index b595747..fef2700 100644
--- a/testing/ostest/robust.c
+++ b/testing/ostest/robust.c
@@ -51,12 +51,14 @@ static FAR void *robust_waiter(FAR void *parameter)
   status = pthread_mutex_lock(&g_robust_mutex);
   if (status != 0)
     {
-       printf("thread_waiter: ERROR: pthread_mutex_lock failed, status=%d\n", status);
+       printf("thread_waiter: ERROR: pthread_mutex_lock failed, status=%d\n",
+               status);
     }
 
   if (status != 0)
     {
-       printf("robust_waiter: ERROR: pthread_mutex_lock failed, status=%d\n", status);
+       printf("robust_waiter: ERROR: pthread_mutex_lock failed, status=%d\n",
+               status);
     }
   else
     {
@@ -87,7 +89,8 @@ void robust_test(void)
   status = pthread_mutexattr_init(&mattr);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutexattr_init failed, status=%d\n",
+      printf("robust_test: ERROR: "
+             "pthread_mutexattr_init failed, status=%d\n",
              status);
       nerrors++;
     }
@@ -95,7 +98,8 @@ void robust_test(void)
   status = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutexattr_setrobust failed, status=%d\n",
+      printf("robust_test: ERROR: "
+             "pthread_mutexattr_setrobust failed, status=%d\n",
              status);
       nerrors++;
     }
@@ -123,7 +127,8 @@ void robust_test(void)
   status = pthread_attr_setstacksize(&pattr, STACKSIZE);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_attr_setstacksize failed, status=%d\n",
+      printf("robust_test: ERROR: "
+             "pthread_attr_setstacksize failed, status=%d\n",
              status);
       nerrors++;
     }
@@ -135,7 +140,8 @@ void robust_test(void)
   status = pthread_create(&waiter, &pattr, robust_waiter, NULL);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_create failed, status=%d\n", status);
+      printf("robust_test: ERROR: "
+             "pthread_create failed, status=%d\n", status);
       printf("             ERROR: Terminating test\n");
       nerrors++;
       return;
@@ -157,12 +163,15 @@ void robust_test(void)
     }
   else if (status != EOWNERDEAD)
     {
-      printf("robust_test: ERROR: pthread_mutex_lock failed with %d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_lock failed with %d\n",
+              status);
       printf("             ERROR: expected %d (EOWNERDEAD)\n", EOWNERDEAD);
       nerrors++;
     }
 
-  /* Try again, this should return immediately, still failing with EOWNERDEAD */
+  /* Try again,
+   * this should return immediately, still failing with EOWNERDEAD
+   */
 
   printf("robust_test: Take the lock again\n");
   status = pthread_mutex_lock(&g_robust_mutex);
@@ -173,7 +182,8 @@ void robust_test(void)
     }
   else if (status != EOWNERDEAD)
     {
-      printf("robust_test: ERROR: pthread_mutex_lock failed with %d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_lock failed with %d\n",
+              status);
       printf("             ERROR: expected %d (EOWNERDEAD)\n", EOWNERDEAD);
       nerrors++;
     }
@@ -184,7 +194,8 @@ void robust_test(void)
   status = pthread_mutex_consistent(&g_robust_mutex);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutex_consistent failed: %d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_consistent failed: %d\n",
+              status);
       nerrors++;
     }
 
@@ -192,7 +203,8 @@ void robust_test(void)
   status = pthread_mutex_lock(&g_robust_mutex);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutex_lock failed with: %d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_lock failed with: %d\n",
+              status);
       nerrors++;
     }
 
@@ -212,7 +224,8 @@ void robust_test(void)
       printf("robust_test: waiter exited with result=%p\n", result);
       if (result != NULL)
         {
-          printf("robust_test: ERROR: expected result=%p\n", PTHREAD_CANCELED);
+          printf("robust_test: ERROR: expected result=%p\n",
+                  PTHREAD_CANCELED);
           nerrors++;
         }
     }
@@ -222,14 +235,16 @@ void robust_test(void)
   status = pthread_mutex_unlock(&g_robust_mutex);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutex_unlock failed, status=%d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_unlock failed, status=%d\n",
+              status);
       nerrors++;
     }
 
   status = pthread_mutex_destroy(&g_robust_mutex);
   if (status != 0)
     {
-      printf("robust_test: ERROR: pthread_mutex_unlock failed, status=%d\n", status);
+      printf("robust_test: ERROR: pthread_mutex_unlock failed, status=%d\n",
+              status);
       nerrors++;
     }
 
diff --git a/testing/ostest/roundrobin.c b/testing/ostest/roundrobin.c
index f7b7411..f46a8f4 100644
--- a/testing/ostest/roundrobin.c
+++ b/testing/ostest/roundrobin.c
@@ -39,7 +39,8 @@
 
 /* This numbers should be tuned for different processor speeds via .config file.
  * With default values the test takes about 30s on Cortex-M3 @ 24MHz. With 32767
- * range and 10 runs it takes ~320s. */
+ * range and 10 runs it takes ~320s.
+ */
 
 #ifndef CONFIG_TESTING_OSTEST_RR_RANGE
 #  define CONFIG_TESTING_OSTEST_RR_RANGE 10000
@@ -82,26 +83,26 @@ static void get_primes(int *count, int *last)
   *last = 0;    /* To make the compiler happy */
 
   for (number = 1; number < CONFIG_TESTING_OSTEST_RR_RANGE; number++)
-  {
-    int div;
-    bool is_prime = true;
+    {
+      int div;
+      bool is_prime = true;
 
-    for (div = 2; div <= number / 2; div++)
+      for (div = 2; div <= number / 2; div++)
       if (number % div == 0)
-      {
-        is_prime = false;
-        break;
-      }
-
-    if (is_prime)
-    {
-      local_count++;
-      *last = number;
+        {
+          is_prime = false;
+          break;
+        }
+
+      if (is_prime)
+        {
+          local_count++;
+          *last = number;
 #if 0 /* We don't really care what the numbers are */
-      printf(" Prime %d: %d\n", local_count, number);
+          printf(" Prime %d: %d\n", local_count, number);
 #endif
+        }
     }
-  }
 
   *count = local_count;
 }
@@ -119,7 +120,8 @@ static FAR void *get_primes_thread(FAR void *parameter)
 
   while (sem_wait(&g_rrsem) < 0);
 
-  printf("get_primes_thread id=%d started, looking for primes < %d, doing %d run(s)\n",
+  printf("get_primes_thread id=%d started, "
+         "looking for primes < %d, doing %d run(s)\n",
          id, CONFIG_TESTING_OSTEST_RR_RANGE, CONFIG_TESTING_OSTEST_RR_RUNS);
 
   for (i = 0; i < CONFIG_TESTING_OSTEST_RR_RUNS; i++)
@@ -163,7 +165,8 @@ void rr_test(void)
   status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("rr_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("rr_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",
+              status);
     }
   else
     {
@@ -173,7 +176,8 @@ void rr_test(void)
   status = pthread_attr_setschedpolicy(&attr, SCHED_RR);
   if (status != OK)
     {
-      printf("rr_test: ERROR: pthread_attr_setschedpolicy failed, status=%d\n",  status);
+      printf("rr_test: ERROR: pthread_attr_setschedpolicy failed, status=%d\n",
+              status);
     }
   else
     {
@@ -189,7 +193,8 @@ void rr_test(void)
 
   printf("rr_test: Starting first get_primes_thread\n");
 
-  status = pthread_create(&get_primes1_thread, &attr, get_primes_thread, (FAR void *)1);
+  status = pthread_create(&get_primes1_thread,
+                          &attr, get_primes_thread, (FAR void *)1);
   if (status != 0)
     {
       printf("         ERROR: Thread 1 creation failed: %d\n",  status);
@@ -198,15 +203,18 @@ void rr_test(void)
   printf("         First get_primes_thread: %d\n", (int)get_primes1_thread);
   printf("rr_test: Starting second get_primes_thread\n");
 
-  status = pthread_create(&get_primes2_thread, &attr, get_primes_thread, (FAR void *)2);
+  status = pthread_create(&get_primes2_thread,
+                          &attr, get_primes_thread, (FAR void *)2);
   if (status != 0)
     {
       printf("         ERROR: Thread 2 creation failed: %d\n",  status);
     }
 
   printf("         Second get_primes_thread: %d\n", (int)get_primes2_thread);
-  printf("rr_test: Waiting for threads to complete -- this should take awhile\n");
-  printf("         If RR scheduling is working, they should start and complete at\n");
+  printf("rr_test: "
+         "Waiting for threads to complete -- this should take awhile\n");
+  printf("         "
+         "If RR scheduling is working, they should start and complete at\n");
   printf("         about the same time\n");
 
   sem_post(&g_rrsem);
diff --git a/testing/ostest/sem.c b/testing/ostest/sem.c
index 4ffe004..91bbd13 100644
--- a/testing/ostest/sem.c
+++ b/testing/ostest/sem.c
@@ -59,11 +59,13 @@ static void *waiter_func(void *parameter)
   status = sem_getvalue(&sem, &value);
   if (status < 0)
     {
-      printf("waiter_func: ERROR thread %d could not get semaphore value\n",  id);
+      printf("waiter_func: "
+             "ERROR thread %d could not get semaphore value\n",  id);
     }
   else
     {
-      printf("waiter_func: Thread %d initial semaphore value = %d\n",  id, value);
+      printf("waiter_func: "
+             "Thread %d initial semaphore value = %d\n",  id, value);
     }
 
   printf("waiter_func: Thread %d waiting on semaphore\n",  id);
@@ -72,16 +74,19 @@ static void *waiter_func(void *parameter)
     {
       printf("waiter_func: ERROR thread %d sem_wait failed\n",  id);
     }
+
   printf("waiter_func: Thread %d awakened\n",  id);
 
   status = sem_getvalue(&sem, &value);
   if (status < 0)
     {
-      printf("waiter_func: ERROR thread %d could not get semaphore value\n",  id);
+      printf("waiter_func: "
+             "ERROR thread %d could not get semaphore value\n",  id);
     }
   else
     {
-      printf("waiter_func: Thread %d new semaphore value = %d\n",  id, value);
+      printf("waiter_func: "
+             "Thread %d new semaphore value = %d\n",  id, value);
     }
 
   printf("waiter_func: Thread %d done\n",  id);
@@ -103,11 +108,13 @@ static void *poster_func(void *parameter)
       status = sem_getvalue(&sem, &value);
       if (status < 0)
         {
-          printf("poster_func: ERROR thread %d could not get semaphore value\n",  id);
+          printf("poster_func: "
+                 "ERROR thread %d could not get semaphore value\n",  id);
         }
       else
         {
-          printf("poster_func: Thread %d semaphore value = %d\n",  id, value);
+          printf("poster_func: "
+                 "Thread %d semaphore value = %d\n",  id, value);
         }
 
       if (value < 0)
@@ -124,11 +131,13 @@ static void *poster_func(void *parameter)
           status = sem_getvalue(&sem, &value);
           if (status < 0)
             {
-              printf("poster_func: ERROR thread %d could not get semaphore value\n",  id);
+              printf("poster_func: "
+                     "ERROR thread %d could not get semaphore value\n",  id);
             }
           else
             {
-              printf("poster_func: Thread %d new semaphore value = %d\n",  id, value);
+              printf("poster_func: "
+                     "Thread %d new semaphore value = %d\n",  id, value);
             }
         }
     }
@@ -136,7 +145,6 @@ static void *poster_func(void *parameter)
 
   printf("poster_func: Thread %d done\n",  id);
   return NULL;
-
 }
 
 /****************************************************************************
@@ -175,41 +183,49 @@ void sem_test(void)
   prio_mid = (prio_min + prio_max) / 2;
 
   sparam.sched_priority = (prio_mid + prio_max) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("sem_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("sem_test: ERROR: "
+             "pthread_attr_setschedparam failed, status=%d\n",  status);
     }
   else
     {
-      printf("sem_test: Set thread 1 priority to %d\n",  sparam.sched_priority);
+      printf("sem_test: "
+             "Set thread 1 priority to %d\n",  sparam.sched_priority);
     }
 
-  status = pthread_create(&waiter_thread1, &attr, waiter_func, (pthread_addr_t)1);
+  status = pthread_create(&waiter_thread1, &attr,
+                          waiter_func, (pthread_addr_t)1);
   if (status != 0)
     {
-      printf("sem_test: ERROR: Thread 1 creation failed: %d\n",  status);
+      printf("sem_test: ERROR: "
+             "Thread 1 creation failed: %d\n",  status);
     }
 
   printf("sem_test: Starting waiter thread 2\n");
   status = pthread_attr_init(&attr);
   if (status != 0)
     {
-      printf("sem_test: ERROR: pthread_attr_init failed, status=%d\n",  status);
+      printf("sem_test: ERROR: "
+             "pthread_attr_init failed, status=%d\n",  status);
     }
 
   sparam.sched_priority = prio_mid;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("sem_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("sem_test: ERROR: "
+             "pthread_attr_setschedparam failed, status=%d\n",  status);
     }
   else
     {
-      printf("sem_test: Set thread 2 priority to %d\n",  sparam.sched_priority);
+      printf("sem_test: "
+             "Set thread 2 priority to %d\n",  sparam.sched_priority);
     }
 
-  status = pthread_create(&waiter_thread2, &attr, waiter_func, (pthread_addr_t)2);
+  status = pthread_create(&waiter_thread2, &attr,
+                          waiter_func, (pthread_addr_t)2);
   if (status != 0)
     {
       printf("sem_test: ERROR: Thread 2 creation failed: %d\n",  status);
@@ -219,21 +235,25 @@ void sem_test(void)
   status = pthread_attr_init(&attr);
   if (status != 0)
     {
-      printf("sem_test: ERROR: pthread_attr_init failed, status=%d\n",  status);
+      printf("sem_test: ERROR: "
+             "pthread_attr_init failed, status=%d\n",  status);
     }
 
   sparam.sched_priority = (prio_min + prio_mid) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("sem_test: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("sem_test: "
+             "pthread_attr_setschedparam failed, status=%d\n",  status);
     }
   else
     {
-      printf("sem_test: Set thread 3 priority to %d\n",  sparam.sched_priority);
+      printf("sem_test: Set thread 3 priority to %d\n",
+              sparam.sched_priority);
     }
 
-  status = pthread_create(&poster_thread, &attr, poster_func, (pthread_addr_t)3);
+  status = pthread_create(&poster_thread, &attr,
+                           poster_func, (pthread_addr_t)3);
   if (status != 0)
     {
       printf("sem_test: ERROR: Thread 3 creation failed: %d\n",  status);
diff --git a/testing/ostest/semtimed.c b/testing/ostest/semtimed.c
index be4e85a..ad45013 100644
--- a/testing/ostest/semtimed.c
+++ b/testing/ostest/semtimed.c
@@ -77,7 +77,8 @@ static void ostest_gettime(struct timespec *tp)
     {
       printf("ostest_gettime: ERROR: clock_gettime failed\n");
     }
-  else if (tp->tv_sec < 0 || tp->tv_nsec < 0 || tp->tv_nsec >= 1000*1000*1000)
+  else if (tp->tv_sec < 0 || tp->tv_nsec < 0 ||
+           tp->tv_nsec >= 1000 * 1000 * 1000)
     {
       printf("ostest_gettime: ERROR: clock_gettime returned bogus time\n");
     }
@@ -111,7 +112,9 @@ void semtimed_test(void)
       printf("semtimed_test: ERROR: sem_init failed\n");
     }
 
-  /* First, make sure that the timeout expires if the semaphore is never posted */
+  /* First,
+   * make sure that the timeout expires if the semaphore is never posted
+   */
 
   ostest_gettime(&before);
 
@@ -136,7 +139,8 @@ void semtimed_test(void)
         }
       else
         {
-          printf("semtimed_test: ERROR: sem_timedwait failed with: %d\n", errcode);
+          printf("semtimed_test: ERROR: sem_timedwait failed with: %d\n",
+                  errcode);
         }
     }
 
@@ -145,14 +149,18 @@ void semtimed_test(void)
   printf("AFTER:  (%lu sec, %lu nsec)\n",
           (unsigned long)after.tv_sec, (unsigned long)after.tv_nsec);
 
-  /* Now make sure that the time wait returns successfully if the semaphore is posted */
+  /* Now make sure that the time wait returns successfully if the semaphore
+   * is posted
+   */
+
   /* Start a poster thread.  It will wait 1 seconds and post the semaphore */
 
   printf("semtimed_test: Starting poster thread\n");
   status = pthread_attr_init(&attr);
   if (status != OK)
     {
-      printf("semtimed_test: ERROR: pthread_attr_init failed, status=%d\n",  status);
+      printf("semtimed_test: ERROR: pthread_attr_init failed, status=%d\n",
+              status);
     }
 
   prio_min = sched_get_priority_min(SCHED_FIFO);
@@ -160,38 +168,44 @@ void semtimed_test(void)
   prio_mid = (prio_min + prio_max) / 2;
 
   sparam.sched_priority = (prio_mid + prio_max) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("semtimed_test: ERROR: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("semtimed_test: ERROR: "
+             "pthread_attr_setschedparam failed, status=%d\n",  status);
     }
   else
     {
-      printf("semtimed_test: Set thread 1 priority to %d\n",  sparam.sched_priority);
+      printf("semtimed_test: Set thread 1 priority to %d\n",
+              sparam.sched_priority);
     }
 
   printf("semtimed_test: Starting poster thread 3\n");
   status = pthread_attr_init(&attr);
   if (status != 0)
     {
-      printf("semtimed_test: ERROR: pthread_attr_init failed, status=%d\n",  status);
+      printf("semtimed_test: ERROR: pthread_attr_init failed, status=%d\n",
+              status);
     }
 
   sparam.sched_priority = (prio_min + prio_mid) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("semtimed_test: pthread_attr_setschedparam failed, status=%d\n",  status);
+      printf("semtimed_test: pthread_attr_setschedparam failed, status=%d\n",
+              status);
     }
   else
     {
-      printf("semtimed_test: Set thread 3 priority to %d\n",  sparam.sched_priority);
+      printf("semtimed_test: Set thread 3 priority to %d\n",
+              sparam.sched_priority);
     }
 
   status = pthread_create(&poster_thread, &attr, poster_func, NULL);
   if (status != 0)
     {
-      printf("semtimed_test: ERROR: Poster thread creation failed: %d\n",  status);
+      printf("semtimed_test: ERROR: Poster thread creation failed: %d\n",
+              status);
       sem_destroy(&sem);
       return;
     }
@@ -211,7 +225,8 @@ void semtimed_test(void)
 
   if (status < 0)
     {
-      printf("semtimed_test: ERROR: sem_timedwait failed with: %d\n", errcode);
+      printf("semtimed_test: ERROR: sem_timedwait failed with: %d\n",
+              errcode);
     }
   else
     {
diff --git a/testing/ostest/sigprocmask.c b/testing/ostest/sigprocmask.c
index 5dce87c..005d66c 100644
--- a/testing/ostest/sigprocmask.c
+++ b/testing/ostest/sigprocmask.c
@@ -18,6 +18,10 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
 #include <sys/types.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -37,7 +41,14 @@
  * Private Data
  ****************************************************************************/
 
-static int g_some_signals[NSIGNALS] = {1, 3, 5, 7, 9};
+static int g_some_signals[NSIGNALS] =
+{
+  1,
+  3,
+  5,
+  7,
+  9
+};
 
 /****************************************************************************
  * Public Functions
@@ -187,7 +198,7 @@ void sigprocmask_test(void)
       goto errout;
     }
 
-  printf("sigprocmask_test: SUCCESS\n" );
+  printf("sigprocmask_test: SUCCESS\n");
   FFLUSH();
   return;
 
@@ -201,6 +212,6 @@ errout_with_mask:
     }
 
 errout:
-  printf("sigprocmask_test: Aborting\n" );
+  printf("sigprocmask_test: Aborting\n");
   FFLUSH();
 }
diff --git a/testing/ostest/suspend.c b/testing/ostest/suspend.c
index 2d7dd41..a24cf55 100644
--- a/testing/ostest/suspend.c
+++ b/testing/ostest/suspend.c
@@ -18,6 +18,10 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
 #include <sys/types.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -29,27 +33,23 @@
 #include "ostest.h"
 
 /****************************************************************************
- * Private Functions
+ * Public Functions
  ****************************************************************************/
 
 static int victim_main(int argc, char *argv[])
 {
-  printf("victim_main: Victim started\n" );
+  printf("victim_main: Victim started\n");
 
   for (; ; )
     {
       sleep(3);
-      printf("victim_main: Wasting time\n" );
+      printf("victim_main: Wasting time\n");
       FFLUSH();
     }
 
   return 0; /* Won't get here */
 }
 
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
 void suspend_test(void)
 {
   struct sched_param param;
@@ -58,11 +58,11 @@ void suspend_test(void)
 
   /* Start victim thread  */
 
-  printf("suspend_test: Starting victim task\n" );
+  printf("suspend_test: Starting victim task\n");
   ret = sched_getparam (0, &param);
   if (ret < 0)
     {
-      printf("suspend_test: ERROR sched_getparam() failed\n" );
+      printf("suspend_test: ERROR sched_getparam() failed\n");
       param.sched_priority = PTHREAD_DEFAULT_PRIORITY;
     }
 
@@ -70,7 +70,7 @@ void suspend_test(void)
                            STACKSIZE, victim_main, NULL);
   if (victim == ERROR)
     {
-      printf("suspend_test: ERROR failed to start victim_main\n" );
+      printf("suspend_test: ERROR failed to start victim_main\n");
     }
   else
     {
@@ -89,7 +89,7 @@ void suspend_test(void)
   ret = kill(victim, SIGSTOP);
   if (ret < 0)
     {
-      printf("suspend_test: ERROR kill() failed\n" );
+      printf("suspend_test: ERROR kill() failed\n");
     }
 
   printf("suspend_test:  Is the victim still jabbering?\n");
@@ -100,7 +100,7 @@ void suspend_test(void)
   ret = kill(victim, SIGCONT);
   if (ret < 0)
     {
-      printf("suspend_test: ERROR kill() failed\n" );
+      printf("suspend_test: ERROR kill() failed\n");
     }
 
   printf("suspend_test:  The victim should continue the rant.\n");
@@ -111,7 +111,7 @@ void suspend_test(void)
   ret = kill(victim, SIGKILL);
   if (ret < 0)
     {
-      printf("suspend_test: ERROR kill() failed\n" );
+      printf("suspend_test: ERROR kill() failed\n");
     }
 
   FFLUSH();
@@ -119,9 +119,9 @@ void suspend_test(void)
   ret = kill(victim, 0);
   if (ret >= 0)
     {
-      printf("suspend_test: ERROR kill() on the dead victim succeeded!\n" );
+      printf("suspend_test: ERROR kill() on the dead victim succeeded!\n");
     }
 
-  printf("suspend_test: done\n" );
+  printf("suspend_test: done\n");
   FFLUSH();
 }
diff --git a/testing/ostest/timedmqueue.c b/testing/ostest/timedmqueue.c
index 2e76a89..7689ae2 100644
--- a/testing/ostest/timedmqueue.c
+++ b/testing/ostest/timedmqueue.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * apps/testing/ostest/mqueue.c
+ * apps/testing/ostest/timedmqueue.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/testing/ostest/timedwait.c b/testing/ostest/timedwait.c
index 78c6f00..bc242d8 100644
--- a/testing/ostest/timedwait.c
+++ b/testing/ostest/timedwait.c
@@ -56,7 +56,8 @@ static void *thread_waiter(void *parameter)
   status = pthread_mutex_lock(&mutex);
   if (status != 0)
     {
-      printf("thread_waiter: ERROR pthread_mutex_lock failed, status=%d\n", status);
+      printf("thread_waiter: ERROR pthread_mutex_lock failed, status=%d\n",
+              status);
     }
 
   printf("thread_waiter: Starting 5 second wait for condition\n");
@@ -66,6 +67,7 @@ static void *thread_waiter(void *parameter)
     {
       printf("thread_waiter: ERROR clock_gettime failed\n");
     }
+
   ts.tv_sec += 5;
 
   /* The wait -- no-one is ever going to awaken us */
@@ -79,12 +81,15 @@ static void *thread_waiter(void *parameter)
         }
       else
         {
-          printf("thread_waiter: ERROR pthread_cond_timedwait failed, status=%d\n", status);
+          printf("thread_waiter: "
+                 "ERROR pthread_cond_timedwait failed, status=%d\n", status);
         }
     }
   else
     {
-      printf("thread_waiter: ERROR pthread_cond_timedwait returned without timeout, status=%d\n", status);
+      printf("thread_waiter: ERROR "
+             "pthread_cond_timedwait returned without timeout, status=%d\n",
+              status);
     }
 
   /* Release the mutex */
@@ -93,7 +98,8 @@ static void *thread_waiter(void *parameter)
   status = pthread_mutex_unlock(&mutex);
   if (status != 0)
     {
-      printf("thread_waiter: ERROR pthread_mutex_unlock failed, status=%d\n", status);
+      printf("thread_waiter: ERROR pthread_mutex_unlock failed, status=%d\n",
+              status);
     }
 
   printf("thread_waiter: Exit with status 0x12345678\n");
@@ -120,7 +126,8 @@ void timedwait_test(void)
   status = pthread_mutex_init(&mutex, NULL);
   if (status != 0)
     {
-      printf("timedwait_test: ERROR pthread_mutex_init failed, status=%d\n", status);
+      printf("timedwait_test: ERROR pthread_mutex_init failed, status=%d\n",
+              status);
     }
 
   /* Initialize the condition variable */
@@ -129,7 +136,8 @@ void timedwait_test(void)
   status = pthread_cond_init(&cond, NULL);
   if (status != 0)
     {
-      printf("timedwait_test: ERROR pthread_condinit failed, status=%d\n", status);
+      printf("timedwait_test: ERROR pthread_condinit failed, status=%d\n",
+              status);
     }
 
   /* Start the waiter thread at higher priority */
@@ -138,7 +146,8 @@ void timedwait_test(void)
   status = pthread_attr_init(&attr);
   if (status != 0)
     {
-      printf("timedwait_test: pthread_attr_init failed, status=%d\n", status);
+      printf("timedwait_test: pthread_attr_init failed, status=%d\n",
+              status);
     }
 
   prio_max = sched_get_priority_max(SCHED_FIFO);
@@ -150,14 +159,17 @@ void timedwait_test(void)
     }
 
   sparam.sched_priority = (prio_max + sparam.sched_priority) / 2;
-  status = pthread_attr_setschedparam(&attr,&sparam);
+  status = pthread_attr_setschedparam(&attr, &sparam);
   if (status != OK)
     {
-      printf("timedwait_test: pthread_attr_setschedparam failed, status=%d\n", status);
+      printf("timedwait_test: "
+             "pthread_attr_setschedparam failed, status=%d\n",
+              status);
     }
   else
     {
-      printf("timedwait_test: Set thread 2 priority to %d\n", sparam.sched_priority);
+      printf("timedwait_test: Set thread 2 priority to %d\n",
+              sparam.sched_priority);
     }
 
   status = pthread_create(&waiter, &attr, thread_waiter, NULL);
@@ -171,7 +183,8 @@ void timedwait_test(void)
   status = pthread_join(waiter, &result);
   if (status != 0)
     {
-      printf("timedwait_test: ERROR pthread_join failed, status=%d\n", status);
+      printf("timedwait_test: ERROR pthread_join failed, status=%d\n",
+              status);
     }
   else
     {
diff --git a/testing/ostest/waitpid.c b/testing/ostest/waitpid.c
index b4d3bb2..352d4f2 100644
--- a/testing/ostest/waitpid.c
+++ b/testing/ostest/waitpid.c
@@ -58,7 +58,8 @@ static int waitpid_main(int argc, char *argv[])
 
   printf("waitpid_main: PID %d Started\n", me);
   sleep(3);
-  printf("waitpid_main: PID %d exitting with result=%d\n", me, RETURN_STATUS);
+  printf("waitpid_main: PID %d exitting with result=%d\n",
+          me, RETURN_STATUS);
   return RETURN_STATUS;
 }
 
@@ -72,11 +73,13 @@ static void waitpid_start_children(void)
       ret = task_create("waitpid", PRIORITY, STACKSIZE, waitpid_main, NULL);
       if (ret < 0)
         {
-          printf("waitpid_start_child: ERROR Failed to start waitpid_main\n");
+          printf("waitpid_start_child: "
+                 "ERROR Failed to start waitpid_main\n");
         }
       else
         {
-          printf("waitpid_start_child: Started waitpid_main at PID=%d\n", ret);
+          printf("waitpid_start_child: "
+                 "Started waitpid_main at PID=%d\n", ret);
         }
 
       g_waitpids[i] = ret;
@@ -92,7 +95,7 @@ static void waitpid_last(void)
 
   /* Find the last child thread that was started successfully */
 
-  for (i = NCHILDREN-1; i > 0; i--)
+  for (i = NCHILDREN - 1; i > 0; i--)
     {
       if (g_waitpids[i] >= 0)
         {
@@ -110,39 +113,46 @@ static void waitpid_last(void)
     }
 
   printf("waitpid_last: Waiting for PID=%d with waitpid()\n",
-         g_waitpids[NCHILDREN-1]);
+         g_waitpids[NCHILDREN - 1]);
 
-  ret = (int)waitpid(g_waitpids[NCHILDREN-1], &stat_loc, 0);
+  ret = (int)waitpid(g_waitpids[NCHILDREN - 1], &stat_loc, 0);
   if (ret < 0)
     {
       int errcode = errno;
 
-      /* Unfortunately, this main thread does not retain child status.  If
-       * child status is enabled (via CONFIG_SCHED_CHILD_STATUS), ostest_main()
-       * disables the feature by calling sigactin with SA_NOCLDWAIT.
+      /* Unfortunately, this main thread does not retain child status.
+       * If child status is enabled (via CONFIG_SCHED_CHILD_STATUS),
+       * ostest_main() disables the feature by calling sigactin with
+       * SA_NOCLDWAIT.
        */
 
       if (errcode == ECHILD)
         {
-          printf("waitpid_last: PASS: PID %d waitpid failed with ECHILD.  That may be\n",
-                 g_waitpids[NCHILDREN-1]);
-          printf("              acceptable because child status is disabled on this thread.\n");
+          printf("waitpid_last: PASS: "
+                 "PID %d waitpid failed with ECHILD.  That may be\n",
+                 g_waitpids[NCHILDREN - 1]);
+          printf("              acceptable "
+                 "because child status is disabled on this thread.\n");
         }
       else
         {
           printf("waitpid_last: ERROR: PID %d waitpid failed: %d\n",
-                 g_waitpids[NCHILDREN-1], errcode);
+                 g_waitpids[NCHILDREN - 1], errcode);
         }
     }
   else if (WEXITSTATUS(stat_loc) != RETURN_STATUS)
     {
-      printf("waitpid_last: ERROR: PID %d return status is %d, expected %d\n",
-             g_waitpids[NCHILDREN-1], WEXITSTATUS(stat_loc), RETURN_STATUS);
+      printf("waitpid_last: ERROR: "
+             "PID %d return status is %d, expected %d\n",
+             g_waitpids[NCHILDREN - 1],
+             WEXITSTATUS(stat_loc),
+             RETURN_STATUS);
     }
   else
     {
-      printf("waitpid_last: PASS: PID %d waitpid succeeded with stat_loc=%04x\n",
-             g_waitpids[NCHILDREN-1], stat_loc);
+      printf("waitpid_last: PASS: "
+             "PID %d waitpid succeeded with stat_loc=%04x\n",
+             g_waitpids[NCHILDREN - 1], stat_loc);
     }
 }
 
@@ -163,22 +173,26 @@ int waitpid_test(void)
   printf("\nTest waitpid()\n");
   waitpid_start_children();
 
-  printf("waitpid_test: Waiting for PID=%d with waitpid()\n", g_waitpids[0]);
+  printf("waitpid_test: Waiting for PID=%d with waitpid()\n",
+          g_waitpids[0]);
   ret = (int)waitpid(g_waitpids[0], &stat_loc, 0);
   if (ret < 0)
     {
       int errcode = errno;
 
-      /* Unfortunately, this main thread does not retain child status.  If
-       * child status is enabled (via CONFIG_SCHED_CHILD_STATUS), ostest_main()
-       * disables the feature by calling sigactin with SA_NOCLDWAIT.
+      /* Unfortunately, this main thread does not retain child status.
+       * If child status is enabled (via CONFIG_SCHED_CHILD_STATUS),
+       * ostest_main() disables the feature by calling sigactin with
+       * SA_NOCLDWAIT.
        */
 
       if (errcode == ECHILD)
         {
-          printf("waitpid_test: PASS: PID %d waitpid failed with ECHILD.  That may be\n",
-                 g_waitpids[NCHILDREN-1]);
-          printf("              acceptable because child status is disabled on this thread.\n");
+          printf("waitpid_test: PASS: "
+                 "PID %d waitpid failed with ECHILD.  That may be\n",
+                 g_waitpids[NCHILDREN - 1]);
+          printf("              acceptable "
+                 "because child status is disabled on this thread.\n");
         }
       else
         {
@@ -193,12 +207,14 @@ int waitpid_test(void)
     }
   else if (WEXITSTATUS(stat_loc) != RETURN_STATUS)
     {
-      printf("waitpid_test: ERROR: PID %d return status is %d, expected %d\n",
+      printf("waitpid_test: ERROR: "
+             "PID %d return status is %d, expected %d\n",
              g_waitpids[0], WEXITSTATUS(stat_loc), RETURN_STATUS);
     }
   else
     {
-      printf("waitpid_test: PID %d waitpid succeeded with stat_loc=%04x\n",
+      printf("waitpid_test: "
+             "PID %d waitpid succeeded with stat_loc=%04x\n",
              g_waitpids[0], stat_loc);
     }
 
@@ -219,16 +235,19 @@ int waitpid_test(void)
     {
       int errcode = errno;
 
-      /* Unfortunately, this main thread does not retain child status.  If
-       * child status is enabled (via CONFIG_SCHED_CHILD_STATUS), ostest_main()
-       * disables the feature by calling sigactin with SA_NOCLDWAIT.
+      /* Unfortunately, this main thread does not retain child status.
+       * If child status is enabled (via CONFIG_SCHED_CHILD_STATUS),
+       * ostest_main() disables the feature by calling sigactin with
+       * SA_NOCLDWAIT.
        */
 
       if (errcode == ECHILD)
         {
-          printf("waitpid_test: PASS: PID %d waitpid failed with ECHILD.  That may be\n",
-                 g_waitpids[NCHILDREN-1]);
-          printf("              acceptable because child status is disabled on this thread.\n");
+          printf("waitpid_test: PASS: "
+                 "PID %d waitpid failed with ECHILD.  That may be\n",
+                 g_waitpids[NCHILDREN - 1]);
+          printf("              acceptable "
+                 "because child status is disabled on this thread.\n");
         }
       else
         {
@@ -243,7 +262,8 @@ int waitpid_test(void)
     }
   else if (info.si_status != RETURN_STATUS)
     {
-      printf("waitpid_test: ERROR: PID %d return status is %d, expected %d\n",
+      printf("waitpid_test: ERROR: "
+             "PID %d return status is %d, expected %d\n",
              info.si_pid, info.si_status, RETURN_STATUS);
     }
   else
@@ -268,16 +288,19 @@ int waitpid_test(void)
     {
       int errcode = errno;
 
-      /* Unfortunately, this main thread does not retain child status.  If
-       * child status is enabled (via CONFIG_SCHED_CHILD_STATUS), ostest_main()
-       * disables the feature by calling sigactin with SA_NOCLDWAIT.
+      /* Unfortunately, this main thread does not retain child status.
+       * If child status is enabled (via CONFIG_SCHED_CHILD_STATUS),
+       * ostest_main() disables the feature by calling sigactin with
+       * SA_NOCLDWAIT.
        */
 
       if (errcode == ECHILD)
         {
-          printf("waitpid_test: PASS: PID %d waitpid failed with ECHILD.  That may be\n",
-                 g_waitpids[NCHILDREN-1]);
-          printf("              acceptable because child status is disabled on this thread.\n");
+          printf("waitpid_test: PASS: "
+                 "PID %d waitpid failed with ECHILD.  That may be\n",
+                 g_waitpids[NCHILDREN - 1]);
+          printf("              acceptable "
+                 "because child status is disabled on this thread.\n");
         }
       else
         {
@@ -286,7 +309,8 @@ int waitpid_test(void)
     }
   else if (info.si_status != RETURN_STATUS)
     {
-      printf("waitpid_test: ERROR: PID %d return status is %d, expected %d\n",
+      printf("waitpid_test: ERROR: "
+             "PID %d return status is %d, expected %d\n",
              info.si_pid, info.si_status, RETURN_STATUS);
     }
   else
@@ -311,16 +335,19 @@ int waitpid_test(void)
     {
       int errcode = errno;
 
-      /* Unfortunately, this main thread does not retain child status.  If
-       * child status is enabled (via CONFIG_SCHED_CHILD_STATUS), ostest_main()
-       * disables the feature by calling sigactin with SA_NOCLDWAIT.
+      /* Unfortunately, this main thread does not retain child status.
+       * If child status is enabled (via CONFIG_SCHED_CHILD_STATUS),
+       * ostest_main() disables the feature by calling sigactin with
+       * SA_NOCLDWAIT.
        */
 
       if (errcode == ECHILD)
         {
-          printf("waitpid_test: PASS: PID %d waitpid failed with ECHILD.  That may be\n",
-                 g_waitpids[NCHILDREN-1]);
-          printf("              acceptable because child status is disabled on this thread.\n");
+          printf("waitpid_test: PASS: "
+                 "PID %d waitpid failed with ECHILD.  That may be\n",
+                 g_waitpids[NCHILDREN - 1]);
+          printf("              acceptable "
+                 "because child status is disabled on this thread.\n");
         }
       else
         {
@@ -329,7 +356,8 @@ int waitpid_test(void)
     }
   else if (WEXITSTATUS(stat_loc) != RETURN_STATUS)
     {
-      printf("waitpid_test: ERROR: PID %d return status is %d, expected %d\n",
+      printf("waitpid_test: ERROR: "
+             "PID %d return status is %d, expected %d\n",
              ret, WEXITSTATUS(stat_loc), RETURN_STATUS);
     }
   else

[incubator-nuttx-apps] 06/06: testing: smp: nxstyle fixes

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 0f68fb7075f2ca465648008e4df249d94a2960f3
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 12:32:19 2021 +0200

    testing: smp: nxstyle fixes
    
    Fixes for errors reported by nxstyle tool
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 testing/smp/smp_main.c | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/testing/smp/smp_main.c b/testing/smp/smp_main.c
index 4f80deb..4a524b0 100644
--- a/testing/smp/smp_main.c
+++ b/testing/smp/smp_main.c
@@ -42,7 +42,7 @@
  ****************************************************************************/
 
 static pthread_barrier_t g_smp_barrier;
-static volatile int g_thread_cpu[CONFIG_TESTING_SMP_NBARRIER_THREADS+1];
+static volatile int g_thread_cpu[CONFIG_TESTING_SMP_NBARRIER_THREADS + 1];
 
 /****************************************************************************
  * Private Functions
@@ -60,7 +60,8 @@ static volatile int g_thread_cpu[CONFIG_TESTING_SMP_NBARRIER_THREADS+1];
 static void show_cpu(FAR const char *caller, int threadno)
 {
   g_thread_cpu[threadno] = sched_getcpu();
-  printf("%s[%d]: Running on CPU%d\n", caller, threadno, g_thread_cpu[threadno]);
+  printf("%s[%d]: Running on CPU%d\n",
+         caller, threadno, g_thread_cpu[threadno]);
 }
 
 static void show_cpu_conditional(FAR const char *caller, int threadno)
@@ -205,7 +206,9 @@ int main(int argc, FAR char *argv[])
 
   /* Initialize data */
 
-  memset(threadid, 0, sizeof(pthread_t) * CONFIG_TESTING_SMP_NBARRIER_THREADS);
+  memset(threadid,
+         0,
+         sizeof(pthread_t) * CONFIG_TESTING_SMP_NBARRIER_THREADS);
   for (i = 0; i <= CONFIG_TESTING_SMP_NBARRIER_THREADS; i++)
     {
       g_thread_cpu[i] = IMPOSSIBLE_CPU;
@@ -221,7 +224,8 @@ int main(int argc, FAR char *argv[])
   ret = pthread_barrierattr_init(&barrierattr);
   if (ret != OK)
     {
-      printf("  Main[0]: pthread_barrierattr_init failed, ret=%d\n", ret);
+      printf("  Main[0]: pthread_barrierattr_init failed, ret=%d\n",
+              ret);
 
       errcode = EXIT_FAILURE;
       goto errout;
@@ -231,7 +235,8 @@ int main(int argc, FAR char *argv[])
                              CONFIG_TESTING_SMP_NBARRIER_THREADS);
   if (ret != OK)
     {
-      printf("  Main[0]: pthread_barrierattr_init failed, ret=%d\n", ret);
+      printf("  Main[0]: pthread_barrierattr_init failed, ret=%d\n",
+             ret);
 
       errcode = EXIT_FAILURE;
       goto errout_with_attr;
@@ -255,10 +260,11 @@ int main(int argc, FAR char *argv[])
   for (i = 0; i < CONFIG_TESTING_SMP_NBARRIER_THREADS; i++)
     {
       ret = pthread_create(&threadid[i], &attr, barrier_thread,
-                           (pthread_addr_t)((uintptr_t)i+1));
+                           (pthread_addr_t)((uintptr_t)i + 1));
       if (ret != 0)
         {
-          printf("  Main[0]: Error in thread %d create, ret=%d\n",  i+1, ret);
+          printf("  Main[0]: Error in thread %d create, ret=%d\n",
+                  i + 1, ret);
           printf("  Main[0]: Test aborted with waiting threads\n");
 
           errcode = EXIT_FAILURE;
@@ -266,7 +272,7 @@ int main(int argc, FAR char *argv[])
         }
       else
         {
-          printf("  Main[0]: Thread %d created\n", i+1);
+          printf("  Main[0]: Thread %d created\n", i + 1);
         }
 
       show_cpu_conditional("  Main", 0);
@@ -286,12 +292,14 @@ int main(int argc, FAR char *argv[])
 
           if (ret != 0)
             {
-              printf("  Main[0]: Error in thread %d join, ret=%d\n", i+1, ret);
+              printf("  Main[0]: Error in thread %d join, ret=%d\n",
+                     i + 1, ret);
               errcode = EXIT_FAILURE;
             }
           else
             {
-              printf("  Main[0]: Thread %d completed with result=%p\n", i+1, result);
+              printf("  Main[0]: Thread %d completed with result=%p\n",
+                     i + 1, result);
             }
         }
     }

[incubator-nuttx-apps] 01/06: LICENSE: add license for apps/wireless/wapi

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 96938f8a0d97e6c07739741cc6f3d70e8836114b
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Jun 10 07:30:55 2021 +0200

    LICENSE: add license for apps/wireless/wapi
    
    add the license for apps/wireless/wapi
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 LICENSE | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/LICENSE b/LICENSE
index 4e4279d..101dc3e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -587,4 +587,37 @@ apps/canutils/libcanutils
 
     Send feedback to <li...@vger.kernel.org>
 
+apps/wireless/wapi
+==================
+
+      Copyright (C) 2011, 2017 Gregory Nutt. All rights reserved.
+      Author: Gregory Nutt <gn...@nuttx.org>
+
+    Adapted for NuttX from WAPI:
+
+      Copyright (c) 2010, Volkan YAZICI <vo...@gmail.com>
+      All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+     - Redistributions of  source code must  retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+     - Redistributions in binary form must reproduce the above copyright
+       notice, this list of  conditions and the  following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+    IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.