From dbdc44125801c1cf4f45b90b75a92e23f4cb51d8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 22 Apr 2020 15:24:01 +0200 Subject: [PATCH] Remove stale port of testu01 The build errors remained unattended since almost a year. Fixes #171 --- include/testu01/config.h | 99 ----------------------- include/testu01/gdefconf.h | 30 ------- lib/import/import-testu01.mk | 3 - lib/mk/testu01.mk | 26 ------ ports/testu01.hash | 1 - ports/testu01.port | 40 --------- run/jitterentropy_alphabit.run | 5 -- run/jitterentropy_rabbit.run | 5 -- run/jitterentropy_testu01.inc | 71 ---------------- src/lib/testu01/genode_chrono.cc | 121 ---------------------------- src/lib/testu01/genode_gdef.cc | 15 ---- src/test/testu01_alphabit/main.cc | 45 ----------- src/test/testu01_alphabit/target.mk | 5 -- src/test/testu01_rabbit/main.cc | 51 ------------ src/test/testu01_rabbit/target.mk | 5 -- 15 files changed, 522 deletions(-) delete mode 100644 include/testu01/config.h delete mode 100644 include/testu01/gdefconf.h delete mode 100644 lib/import/import-testu01.mk delete mode 100644 lib/mk/testu01.mk delete mode 100644 ports/testu01.hash delete mode 100644 ports/testu01.port delete mode 100644 run/jitterentropy_alphabit.run delete mode 100644 run/jitterentropy_rabbit.run delete mode 100644 run/jitterentropy_testu01.inc delete mode 100644 src/lib/testu01/genode_chrono.cc delete mode 100644 src/lib/testu01/genode_gdef.cc delete mode 100644 src/test/testu01_alphabit/main.cc delete mode 100644 src/test/testu01_alphabit/target.mk delete mode 100644 src/test/testu01_rabbit/main.cc delete mode 100644 src/test/testu01_rabbit/target.mk diff --git a/include/testu01/config.h b/include/testu01/config.h deleted file mode 100644 index 92afbfa..0000000 --- a/include/testu01/config.h +++ /dev/null @@ -1,99 +0,0 @@ -/* include/config.h. Generated from config.h.in by configure. */ -/* include/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `erf' function. */ -#define HAVE_ERF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GMP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `lgamma' function. */ -#define HAVE_LGAMMA 1 - -/* Define to 1 if you have the `log1p' function. */ -#define HAVE_LOG1P 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define when Mathematica is installed */ -#undef HAVE_MATHEMATICA - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `random' function. */ -#define HAVE_RANDOM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UTSNAME_H 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Name of package */ -#define PACKAGE "testu01" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "lecuyer@iro.umontreal.ca" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "TestU01" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "TestU01 1.2.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "testu01" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.2.3" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "1.2.3" - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ diff --git a/include/testu01/gdefconf.h b/include/testu01/gdefconf.h deleted file mode 100644 index 78ce266..0000000 --- a/include/testu01/gdefconf.h +++ /dev/null @@ -1,30 +0,0 @@ -/* include/gdefconf.h. Generated from gdefconf.h.in by configure. */ -/* gdef.h for ANSI C */ -#ifndef GDEFCONF_H -#define GDEFCONF_H - -/* #undef HAVE_LEBOOL */ - -#define HAVE_LONG_LONG 1 - -#define HAVE_ERF 1 - -#define HAVE_RANDOM 1 - -#define HAVE_LGAMMA 1 - -#define HAVE_GMP_H 1 - -#undef HAVE_MATHEMATICA - -#define HAVE_SYS_UTSNAME_H 1 - -#define HAVE_UNISTD_H 1 - -#define HAVE_STDINT_H 1 - -#define HAVE_UINT32_T 1 - -#define HAVE_UINT8_T 1 - -#endif diff --git a/lib/import/import-testu01.mk b/lib/import/import-testu01.mk deleted file mode 100644 index 19d4fd3..0000000 --- a/lib/import/import-testu01.mk +++ /dev/null @@ -1,3 +0,0 @@ -INC_DIR += \ - $(call select_from_ports,testu01)/include/testu01 \ - $(call select_from_repositories,include/testu01) diff --git a/lib/mk/testu01.mk b/lib/mk/testu01.mk deleted file mode 100644 index 97488df..0000000 --- a/lib/mk/testu01.mk +++ /dev/null @@ -1,26 +0,0 @@ -include $(call select_from_repositories,lib/import/import-testu01.mk) - -TESTU01_DIR = $(call select_from_ports,testu01) -TESTU01_SRC_DIR = $(TESTU01_DIR)/src/lib/testu01/TestU01-1.2.3 - -LIBS += libc - -CC_WARN += -Wno-unused-variable -Wno-maybe-uninitialized -Wno-return-type - -TESTU01_SRC_C = unif01.c ulcg.c umrg.c ucarry.c utaus.c ugfsr.c uinv.c uquad.c ucubic.c ulec.c utezuka.c umarsa.c uweyl.c uknuth.c uwu.c unumrec.c uvaria.c usoft.c ugranger.c ucrypto.c ufile.c udeng.c utouzin.c uautomata.c uxorshift.c ubrent.c rijndael-alg-fst.c tu01_sha1.c scatter.c swrite.c sres.c smultin.c sknuth.c smarsa.c sstring.c svaria.c snpair.c swalk.c sentrop.c sspectral.c scomp.c sspacings.c vectorsF2.c bbattery.c ffam.c fcong.c ffsr.c ftab.c fres.c fcho.c fmultin.c fmarsa.c fknuth.c fwalk.c fstring.c fspectral.c fvaria.c fnpair.c -PROBDIST_SRC_C = fmass.c fdist.c fbar.c finv.c gofs.c gofw.c statcoll.c wdist.c -MYLIB_SRC_C = addstr.c bitset.c mystr.c num.c num2.c tables.c util.c - -EXAMPLES_SRC_C = mrg32k3a.c xorshift.c - -SRC_C = $(TESTU01_SRC_C) $(PROBDIST_SRC_C) $(MYLIB_SRC_C) $(EXAMPLES_SRC_C) - -SRC_CC = genode_chrono.cc genode_gdef.cc - -vpath %.cc $(REP_DIR)/src/lib/testu01 -vpath %.c $(TESTU01_SRC_DIR)/testu01 -vpath %.c $(TESTU01_SRC_DIR)/probdist -vpath %.c $(TESTU01_SRC_DIR)/mylib -vpath %.c $(TESTU01_SRC_DIR)/examples - -CC_CXX_WARN_STRICT = diff --git a/ports/testu01.hash b/ports/testu01.hash deleted file mode 100644 index 39ff876..0000000 --- a/ports/testu01.hash +++ /dev/null @@ -1 +0,0 @@ -b8791d6cfc4416dbc436130c4e755fe3cfcb157d diff --git a/ports/testu01.port b/ports/testu01.port deleted file mode 100644 index ada7f0b..0000000 --- a/ports/testu01.port +++ /dev/null @@ -1,40 +0,0 @@ -LICENSE := other -VERSION := 1.2.3 -DOWNLOADS := testu01.archive - -URL(testu01) := http://www.iro.umontreal.ca/~simardr/testu01/TestU01.zip -SHA(testu01) := eee829985b7a41427e224dbc3d2592dc88444dfab0acd269190c4ea83ab1a037 -DIR(testu01) := src/lib/testu01 - -TESTU01_DIR := src/lib/testu01/TestU01-1.2.3 - -testu01_includes = $(addprefix $(TESTU01_DIR)/testu01/,\ - unif01.h ulcg.h umrg.h ucarry.h utaus.h ugfsr.h uinv.h uquad.h ucubic.h ulec.h utezuka.h umarsa.h uweyl.h uknuth.h uwu.h unumrec.h uvaria.h usoft.h ugranger.h ucrypto.h ufile.h udeng.h utouzin.h uautomata.h uxorshift.h ubrent.h rijndael-alg-fst.h tu01_sha1.h scatter.h swrite.h sres.h smultin.h sknuth.h smarsa.h sstring.h svaria.h snpair.h swalk.h sentrop.h sspectral.h scomp.h sspacings.h vectorsF2.h bbattery.h ffam.h fcong.h ffsr.h ftab.h fres.h fcho.h fmultin.h fmarsa.h fknuth.h fwalk.h fstring.h fspectral.h fvaria.h fnpair.h) - -probdist_includes = $(addprefix $(TESTU01_DIR)/probdist/,\ - fmass.h fdist.h fbar.h finv.h gofs.h gofw.h statcoll.h wdist.h) - -mylib_includes = $(addprefix $(TESTU01_DIR)/mylib/,\ - gdef.h addstr.h bitset.h chrono.h mystr.h num.h num2.h tables.h util.h) - -DIRS := include/testu01 -DIR_CONTENT(include/testu01) = $(generated_headers) - -generated_headers = $(testu01_includes) $(probdist_includes) $(mylib_includes) - -_dirs: $(generated_headers) - -$(generated_headers): $(DOWNLOADS) - -%.h: %.tex tcode - @$(MSG_GENERATE)$(notdir $@) - $(VERBOSE)mkdir -p include/testu01 - $(VERBOSE)./tcode $< $@ - -%.tex: $(DOWNLOADS) - -tcode: $(TESTU01_DIR)/mylib/tcode.c - @$(MSG_GENERATE)$(notdir $@) - $(VERBOSE)$(CC) -o $@ $< - -tcode.c: $(DOWNLOADS) \ No newline at end of file diff --git a/run/jitterentropy_alphabit.run b/run/jitterentropy_alphabit.run deleted file mode 100644 index 6bf2814..0000000 --- a/run/jitterentropy_alphabit.run +++ /dev/null @@ -1,5 +0,0 @@ -set test_name "testu01_alphabit" - -source ${genode_dir}/repos/world/run/jitterentropy_testu01.inc - -run_genode_until "child \"${test_name}\" exited with exit value 0" 600 diff --git a/run/jitterentropy_rabbit.run b/run/jitterentropy_rabbit.run deleted file mode 100644 index 2f13b48..0000000 --- a/run/jitterentropy_rabbit.run +++ /dev/null @@ -1,5 +0,0 @@ -set test_name "testu01_rabbit" - -source ${genode_dir}/repos/world/run/jitterentropy_testu01.inc - -run_genode_until "child \"${test_name}\" exited with exit value 0" 1200 diff --git a/run/jitterentropy_testu01.inc b/run/jitterentropy_testu01.inc deleted file mode 100644 index 909cd24..0000000 --- a/run/jitterentropy_testu01.inc +++ /dev/null @@ -1,71 +0,0 @@ -# -# \brief Jitterentropy TestU01 tests -# \author Emery Hemingway -# \date 2015-12-11 -# - -# -# Configuration variables -# -# $test_name -# - -set build_components { - core init timer - lib/vfs/jitterentropy -} - -lappend build_components test/$test_name - -build $build_components - -create_boot_directory - -set config { - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config - -# generic modules -set boot_modules { - core init timer - ld.lib.so libc.lib.so vfs.lib.so libm.lib.so - vfs_jitterentropy.lib.so -} - -lappend boot_modules $test_name - -build_boot_image $boot_modules - -append qemu_args " -nographic" - -# vi: set ft=tcl : diff --git a/src/lib/testu01/genode_chrono.cc b/src/lib/testu01/genode_chrono.cc deleted file mode 100644 index fd7814a..0000000 --- a/src/lib/testu01/genode_chrono.cc +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include - -Genode::Allocator *_heap = nullptr; -Timer::Connection *_timer = nullptr; - - -void testu01_init(Genode::Allocator &heap, Timer::Connection &timer) -{ - _heap = &heap; - _timer = &timer; -} - - -/* XXX: should be the CPU session time, but the timer works for now */ -static void Heure (unsigned long *tsec, unsigned long *tusec) -{ - if (!_timer) - Genode::error("library not initialized with 'testu01_init'!"); - - unsigned long ms = _timer->elapsed_ms(); - - *tsec = ms / 1000; - *tusec = ms * 1000; -} - - -extern "C" { - -#include "chrono.h" -#include -#include - -void chrono_Init (chrono_Chrono *C) { - Heure(&C->second, &C->microsec); } - - -chrono_Chrono * chrono_Create (void) -{ - if (!_heap) - Genode::error("library not initialized with 'testu01_init'!"); - - chrono_Chrono *C = new (*_heap) chrono_Chrono; - Heure(&C->second, &C->microsec); - return C; -} - - -void chrono_Delete (chrono_Chrono *C) { destroy(*_heap, C); } - - -double chrono_Val (chrono_Chrono *C, chrono_TimeFormat Unit) -{ - double temps; /* Time elapsed, in seconds */ - chrono_Chrono now; - Heure (&now.second, &now.microsec); - temps = (((double) now.microsec - (double) C->microsec) / 1.E+6 + - (double) now.second) - (double) C->second; - - switch (Unit) { - case chrono_sec: - return temps; - case chrono_min: - return temps * 1.666666667E-2; - case chrono_hours: - return temps * 2.777777778E-4; - case chrono_days: - return temps * 1.157407407E-5; - case chrono_hms: - util_Error ("chrono_Val : hms is a wrong arg for chrono_TimeUnit"); - } - return 0.0; -} - -void chrono_Write (chrono_Chrono * C, chrono_TimeFormat Form) -{ - long centieme; - long minute; - long heure; - long seconde; - double temps; - if (Form != chrono_hms) - temps = chrono_Val (C, Form); - else - temps = 0.0; - switch (Form) { - case chrono_sec: - num_WriteD (temps, 10, 2, 1); - printf (" seconds"); - break; - case chrono_min: - num_WriteD (temps, 10, 2, 1); - printf (" minutes"); - break; - case chrono_hours: - num_WriteD (temps, 10, 2, 1); - printf (" hours"); - break; - case chrono_days: - num_WriteD (temps, 10, 2, 1); - printf (" days"); - break; - case chrono_hms: - temps = chrono_Val (C, chrono_sec); - heure = (long) (temps * 2.777777778E-4); - if (heure > 0) - temps -= (double) (heure) * 3600.0; - minute = (long) (temps * 1.666666667E-2); - if (minute > 0) - temps -= (double) (minute) * 60.0; - seconde = (long) (temps); - centieme = (long) (100.0 * (temps - (double) (seconde))); - printf ("%02ld:", heure); - printf ("%02ld:", minute); - printf ("%02ld.", seconde); - printf ("%02ld", centieme); - break; - } -} - -} diff --git a/src/lib/testu01/genode_gdef.cc b/src/lib/testu01/genode_gdef.cc deleted file mode 100644 index 2fc9613..0000000 --- a/src/lib/testu01/genode_gdef.cc +++ /dev/null @@ -1,15 +0,0 @@ -#include - -extern "C" { - -#include -#include - -void gdef_GetHostName (char machine[], int n) -{ - if (n) *machine = '\0'; -} - -void gdef_WriteHostName (void) { } - -} diff --git a/src/test/testu01_alphabit/main.cc b/src/test/testu01_alphabit/main.cc deleted file mode 100644 index e98ee30..0000000 --- a/src/test/testu01_alphabit/main.cc +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#include -#include -#include -#include - -extern "C" { -#include "bbattery.h" -} - -void Libc::Component::construct(Libc::Env &env) -{ - using namespace Genode; - - Attached_rom_dataspace config_rom(env, "config"); - Xml_node const config = config_rom.xml(); - - enum { - MIN_NBITS = 500, - DEFAULT_NBITS = 1U << 20 - }; - - unsigned nbits = max((unsigned)MIN_NBITS, - config.attribute_value("nbits", (unsigned)DEFAULT_NBITS)); - String<128> file; - - try { - config.attribute("file").value(&file); - } catch (...) { - error("'file' not declared in config"); - env.parent().exit(~0); - return; - } - - Heap heap(env.pd(), env.rm()); - Timer::Connection timer(env); - - testu01_init(heap, timer); - - Libc::with_libc([&] () { - bbattery_AlphabitFile((char *)file.string(), nbits); }); - - env.parent().exit(0); -} diff --git a/src/test/testu01_alphabit/target.mk b/src/test/testu01_alphabit/target.mk deleted file mode 100644 index 962820e..0000000 --- a/src/test/testu01_alphabit/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = testu01_alphabit -LIBS += testu01 libc libm -SRC_CC = main.cc - -CC_CXX_WARN_STRICT = diff --git a/src/test/testu01_rabbit/main.cc b/src/test/testu01_rabbit/main.cc deleted file mode 100644 index 8c921b7..0000000 --- a/src/test/testu01_rabbit/main.cc +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include -#include -#include -#include - -extern "C" { -#include "gdef.h" -#include "swrite.h" -#include "bbattery.h" -} - -/* This is a big one */ -Genode::size_t Libc::Component::stack_size() { return 64*1024*sizeof(Genode::addr_t); } - - -void Libc::Component::construct(Libc::Env &env) -{ - using namespace Genode; - - Attached_rom_dataspace config_rom(env, "config"); - Xml_node const config = config_rom.xml(); - - enum { - MIN_NBITS = 500, - DEFAULT_NBITS = 1U << 20 - }; - - unsigned nbits = max((unsigned)MIN_NBITS, - config.attribute_value("nbits", (unsigned)DEFAULT_NBITS)); - String<128> file; - - try { - config.attribute("file").value(&file); - } catch (...) { - error("'file' not declared in config"); - env.parent().exit(~0); - return; - } - - Heap heap(env.pd(), env.rm()); - Timer::Connection timer(env); - - testu01_init(heap, timer); - - Libc::with_libc([&] () { - bbattery_RabbitFile((char *)file.string(), nbits); }); - - env.parent().exit(0); -} diff --git a/src/test/testu01_rabbit/target.mk b/src/test/testu01_rabbit/target.mk deleted file mode 100644 index dd4c138..0000000 --- a/src/test/testu01_rabbit/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = testu01_rabbit -LIBS += testu01 libc libm -SRC_CC = main.cc - -CC_CXX_WARN_STRICT =