Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill obsolete config test programs.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 28 Oct 2018 20:10:16 +0000 (21:10 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 28 Oct 2018 20:29:30 +0000 (21:29 +0100)
tools/cmake/DefinePackages.cmake
tools/cmake/test_prog/prog_gnu_dynlinker.c [deleted file]
tools/cmake/test_prog/prog_mutex_timedlock.c [deleted file]
tools/cmake/test_prog/prog_sem_timedwait.c [deleted file]
tools/cmake/test_prog/prog_snprintf.c [deleted file]
tools/cmake/test_prog/prog_vsnprintf.c [deleted file]

index ac0fe91..71f0815 100644 (file)
@@ -1095,16 +1095,11 @@ set(CMAKE_SOURCE_FILES
   tools/cmake/UnitTesting.cmake
   tools/cmake/src/internal_config.h.in
   tools/cmake/test_prog/prog_asan.cpp
-  tools/cmake/test_prog/prog_gnu_dynlinker.c
   tools/cmake/test_prog/prog_makecontext.c
-  tools/cmake/test_prog/prog_mutex_timedlock.c
   tools/cmake/test_prog/prog_sem_init.c
   tools/cmake/test_prog/prog_sem_open.c
-  tools/cmake/test_prog/prog_sem_timedwait.c
-  tools/cmake/test_prog/prog_snprintf.c
   tools/cmake/test_prog/prog_stackgrowth.c
   tools/cmake/test_prog/prog_stacksetup.c
-  tools/cmake/test_prog/prog_vsnprintf.c
   tools/cmake/cross-mingw.cmake
   tools/smpi/generate_smpi_defines.pl
   tools/stack-cleaner/as
diff --git a/tools/cmake/test_prog/prog_gnu_dynlinker.c b/tools/cmake/test_prog/prog_gnu_dynlinker.c
deleted file mode 100644 (file)
index 0317da2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* prog_gnu_dynlinker.c -- check that RTLD_NEXT is defined as in GNU linker */
-/* Copyright (c) 2012-2018. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#define _GNU_SOURCE 1
-#include <dlfcn.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-static void * (*real_malloc) (size_t);
-
-int main(void) {
-   char *error;
-   dlerror(); // clear any previous error
-   real_malloc = (void * (*) (size_t)) dlsym(RTLD_NEXT, "malloc");
-   error = dlerror();
-   if (!error && real_malloc) {
-      char *A = real_malloc(20);
-      strcpy(A,"epic success");
-      free(A);
-      return 0; // SUCCESS
-   } else {
-      if (error)
-   printf("Error while checking for dlsym: %s\n",error);
-      else
-   printf("dlsym did not return any error, but failed to find malloc()\n");
-      return 1; // FAILED
-   }
-}
diff --git a/tools/cmake/test_prog/prog_mutex_timedlock.c b/tools/cmake/test_prog/prog_mutex_timedlock.c
deleted file mode 100644 (file)
index 6f1d245..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <pthread.h>
-
-int main(void)
-{
-  pthread_mutex_t s;
-  const struct timespec t;
-  sem_timedlock(&s, &t);
-  return 0;
-}
diff --git a/tools/cmake/test_prog/prog_sem_timedwait.c b/tools/cmake/test_prog/prog_sem_timedwait.c
deleted file mode 100644 (file)
index 93c6840..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <semaphore.h>
-
-int main()
-{
-  sem_t *s;
-  const struct timespec *t;
-  sem_timedwait(s, t);
-}
diff --git a/tools/cmake/test_prog/prog_snprintf.c b/tools/cmake/test_prog/prog_snprintf.c
deleted file mode 100644 (file)
index 1840185..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <stdio.h>
-
-int main(void)
-{
-  char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
-  char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
-  int i;
-  i = snprintf(bufs, 2, "%s", "111");
-  if (strcmp(bufs, "1"))
-    exit(1);
-  if (i != 3)
-    exit(1);
-  i = snprintf(bufd, 2, "%d", 111);
-  if (strcmp(bufd, "1"))
-    exit(1);
-  if (i != 3)
-    exit(1);
-  exit(0);
-}
diff --git a/tools/cmake/test_prog/prog_vsnprintf.c b/tools/cmake/test_prog/prog_vsnprintf.c
deleted file mode 100644 (file)
index 12ffca2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <stdio.h>
-#include <stdarg.h>
-
-int my_vsnprintf(char *buf, const char *tmpl, ...)
-{
-  int i;
-  va_list args;
-  va_start(args, tmpl);
-  i = vsnprintf(buf, 2, tmpl, args);
-  va_end(args);
-  return i;
-}
-
-int main(void)
-{
-  char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
-  char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
-  int i;
-  i = my_vsnprintf(bufs, "%s", "111");
-  if (strcmp(bufs, "1"))
-    exit(1);
-  if (i != 3)
-    exit(1);
-  i = my_vsnprintf(bufd, "%d", 111);
-  if (strcmp(bufd, "1"))
-    exit(1);
-  if (i != 3)
-    exit(1);
-  exit(0);
-}