Changeset 7093cb5e in rtems


Ignore:
Timestamp:
Feb 8, 2018, 3:18:05 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11
Children:
c3353ae5
Parents:
5812a26e
git-author:
Chris Johns <chrisj@…> (02/08/18 03:18:05)
git-committer:
Chris Johns <chrisj@…> (02/08/18 03:21:13)
Message:

libtest/dl01: Add dlerror tests.

Update #2747

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/dl01/dl-load.c

    r5812a26e r7093cb5e  
    2929  char*  message = "loaded";
    3030  char*  err;
     31
     32  err = dlerror ();
     33  if (err != NULL)
     34  {
     35    printf ("dlerror failed: did not return NULL for no error\n");
     36    return 1;
     37  }
     38
     39  printf("load: /abcd.o (no found)\n");
     40  handle = dlopen ("/abcd.o", RTLD_NOW | RTLD_GLOBAL);
     41  if (handle)
     42  {
     43    printf ("dlopen failed: found unknown object file\n");
     44    return 1;
     45  }
     46
     47  err = dlerror ();
     48  if (!err)
     49  {
     50    printf ("dlerror failed: no error message\n");
     51    return 1;
     52  }
     53
     54  printf ("dlerror: %s\n", err);
     55
     56  err = dlerror ();
     57  if (err != NULL)
     58  {
     59    printf ("dlerror failed: did not return NULL so error no cleared\n");
     60    return 1;
     61  }
    3162
    3263  printf("load: /dl-o1.o\n");
Note: See TracChangeset for help on using the changeset viewer.