aboutsummaryrefslogtreecommitdiff
path: root/newlib/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2023-06-22For GCC, newlib combined tree, newlib build-tree testing, use standard ↵Thomas Schwinge1-0/+7
search paths For example, for GCC/GCN target (AMD GPUs), target libraries are built individually per supported hardware ISA ('-march=[...]'). Testing such a toolchain via, for example: $ make RUNTESTFLAGS='--target_board=[...]/-march=gfx90a' check[...] ... does work fine for all 'check-gcc-[...]' as well as GCC-provided target libraries, 'check-target-[...]'. Just for 'check-target-newlib', for the example above, not the '-march=gfx90a' newlib libraries are linked in, but instead always the default ones, which results in link FAILure. This is cured simply by skipping use of 'newlib/testsuite/lib/flags.exp', so that the standard search paths as determined by GCC, DejaGnu are used for newlib, too.
2022-05-27Add test cases for parser errors after reworked parsing behavior.jdoubleu1-16/+48
2022-04-08Add tests for tzset POSIX timezone string complianceJeff Johnston2-0/+175
- patch from jdbouleu <hi@jdoubleu.de> - create time.exp and tzset.c files in newlib/testsuite/newlib.time
2022-04-07fix testsuite cannot compile testsjdoubleu1-0/+2
DEJAGNU could not find the function 'newlib_target_compile', because it was defined in another file.
2022-01-21newlib: stop clobbering LDFLAGS with non-standard $ldflagsMike Frysinger1-2/+2
It's unclear why this was added originally, but assuming it was needed 20 years ago, it shouldn't be explicitly required nowadays. Current versions of autotools already take care of exporting LDFLAGS to the Makefile as needed (things are actually getting linked). That's why the configure diffs show LDFLAGS still here, but shifted to a diff place in the output list. A few dirs stop exporting LDFLAGS, but that's because they don't do any linking, only compiling, so it's correct. As for the use of $ldflags instead of the standard $LDFLAGS, I can't really explain that at all. Just use the right name so users don't have to dig into why their setting isn't respected, and then use a non-standard name instead. Adjust the testsuite to match.
2020-07-10testsuite: Fix iconv tests to use new encoding config definesKeith Packard via Newlib3-48/+47
_ICONV_CONVERTER -> ICONV_FROM_ENCODING. It's not perfect, as the library can support different from/to encodings now, but at least in the default configurations the tests now work. Signed-off-by: Keith Packard <keithp@keithp.com>
2016-05-02Don't run UTF-8.exp test if newlib is not built with multibyte support.Jeff Johnston1-0/+12
Submitted on behalf of Yuriy Kolerov. newlib/ChangeLog 2016-04-29 Yuriy Kolerov <yuriy.kolerov@synopsys.com> testsuite/newlib.locale/UTF-8.exp: Don't run if multibyte support is disabled. Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com> Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
2015-11-12Fix multilib libgloss selection.Marcus Shawcroft1-1/+1
Regression testing newlib in conjunction with libgloss and --enable-multilib can result in incompatible multilib versions of newlib and libgloss being used during link. This manifests on ARM target when newlib regression is run using a GCC configured using --with-multilib-list=aprofile With this configuration many of the multilib variants built are mutually incompatible. The issue is that the newlib dejagnu foo iterates each multilib variant and correctly chooses the appropriate newlib variant but always chooses the root/base libgloss variant. The implementation of newlib/testsuite/lib/flags.exp contains the following fragment: set target_build_path "$objdir/$multibuildtop.." The effect of this fragment is to explicitly select the root version of libgloss, irrespective of the current multilib. Digging around in VC it appears that the original implementation of multlib magic came into the tree back in 2002 with: 6e9d950a (Thomas Fitzsimmons 2002-05-01 17:06:25 +0000 39) In this initial version of multilib support, newlib was multilib capable, but libgloss was not multilib capable, hence the necessity to explicitly select the root libgloss version. Subsequently flags.exp was modified to support out of tree testing: cec1d3b4 (Jeff Johnston 2005-07-05 00:11:50 +0000 25) This change is orthogonal to this issue, its effect is to exit early in none multilib configurations. Subsequently libgloss gained --enable-multilib support, the relevant change is: https://sourceware.org/ml/newlib/2006/msg00440.html commit 00a4b31ad08aef361c5d74125ece410b4c285975 Author: Jeff Johnston <jjohnstn@redhat.com> Date: Wed May 10 20:51:41 2006 +0000 This change enabled multilib support throughout libgloss, but ommitted to adjust the flag.exp behaviour which anchors the libgloss multilib selection to the base version. The attached patch adjusts flags.exp to select the current multilib variant of libgloss. 2015-11-06 Marcus Shawcroft <marcus.shawcroft@arm.com> * testsuite/lib/flags.exp (libgloss_link_flags): Drop multilibtop from target_build_path.
2015-03-11Fix a build problem running the newlib testsuite on targets that only have ↵Nick Clifton1-1/+1
32-bit doubles. * testsuite/newlib.stdio/swprintf.c (main): Change size of value used to initialise 'val' variable so that it will compile on targets with 32-bit doubles.
2015-01-12 * testsuite/newlib.wctype/tiswctype.c (main): Use wide character typeCorinna Vinschen1-12/+12
function.
2015-01-08 * testsuite/newlib.wctype/twctrans.c (main): Use towlower and towupper.Corinna Vinschen1-4/+4
2014-11-06 * libc/stdio/nano-vfprintf_i.c (_printf_i): Use Newlib approach toCorinna Vinschen1-0/+17
handle string that might be not nul-terminated. * testsuite/newlib.stdio/nulprintf.c: New test.
2013-10-092013-10-09 Marcus Shawcroft <marcus.shawcroft@arm.com>Jeff Johnston1-1/+1
* testsuite/newlib.wctype/twctype.c (main): Update iswprint(0xce2) test case.
2012-11-30 * libc/machine/arm/strcmp.S (compute_return_value): Fix return value.Corinna Vinschen1-0/+36
* testsuite/newlib.string/strcmp-1.c (main): Add new test cases.
2012-05-03 * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro.Corinna Vinschen1-1/+28
(MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set. (MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise.
2012-02-09Add missing file from previous checkinCorinna Vinschen1-0/+222
2011-10-042011-10-04 Greta Yorsh <Greta.Yorsh@arm.com>Jeff Johnston1-0/+160
* testsuite/newlib.string/memcpy-1.c: New test.
2011-09-082011-09-08 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-2/+6
* testsuite/lib/flags.exp: Add logic to add the srcdir include directory to compile flags.
2011-07-152011-07-15 Yufeng Zhang <yufeng.zhang@arm.com>Jeff Johnston2-0/+42
* libc/stdio/vfwprintf.c (wcvt): Add a new parameter len of type int. *length is set to the value of (rev - digits) regardless of whether _MB_CAPABLE is defined or not. Replace BUF with len in calling _mbsnrtowcs_r and also in the loop where _MB_CAPABLE is not defined. (_VFWPRINTF_R): Call wcvt with an extra argument. Call wcvt again with allocated new buffer if buf is not large enough for the conversion. * testsuite/newlib.stdio/stdio.exp: New. * testsuite/newlib.stdio/swprintf.c: Likewise.
2008-05-02 * libc/include/stdint.h (SIZE_MIN): Remove.Mark Mitchell2-0/+28
(SIZE_MAX): Define. * testsuite/newlib.stdlib/stdlib.exp: New. * testsuite/newlib.stdlib/size_max.c: Likewise.
2007-04-05 * testsuite/lib/flags.exp (newlib_include_flags): DropKazu Hirata1-5/+1
-I${newlib_dir}.
2006-12-042006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>Jeff Johnston1-0/+4
* testsuite/newlib.string/tstring.c:
2005-07-182005-07-18 Joseph S. Myers <joseph@codesourcery.com>Jeff Johnston2-5/+10
* testsuite/lib/checkoutput.exp (newlib_check_output): Use test names after PASS and FAIL which do not depend on source directory name or on whether test passed or failed. * testsuite/lib/passfail.exp (newlib_pass_fail): Likewise.
2005-07-052005-07-04 Mark Mitchell <mark@codesourcery.com>Jeff Johnston4-6/+14
* Makefile.am (site.exp): Set tmpdir. * Makefile.in: Regenerated. * testsuite/lib/checkoutput.exp (newlib_check_output): Put executables in $tmpdir. * testsuite/lib/flags.exp (libgloss_link_flags): Use the original libgloss version if not running in the build directory. * testsuite/lib/newlib.exp (newlib_init): Put testglue.o in $tmpdir. * testsuite/lib/passfail.exp (newlib_pass_fail): Put executables in $tmpdir.
2005-01-272005-01-27 Hans-Peter Nilsson <hp@axis.com>Jeff Johnston1-0/+184
* testsuite/newlib.string/memmove1.c: New test.
2005-01-272005-01-27 Hans-Peter Nilsson <hp@axis.com>Jeff Johnston1-0/+1
* testsuite/include/check.h: Include stdlib.h.
2004-05-252004-05-25 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-0/+2
* testsuite/include/check.h: Add include of <stdio.h>.
2004-05-032004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>Jeff Johnston1-0/+1
* testsuite/include/check.h (CHECK): Add flush of stdout.
2004-01-272004-01-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>Jeff Johnston4-0/+1613
* configure.in: Add support to generate iconv converter flags for newlib.h * newlib.hin: Add iconv converter flags. * configure: Regenerated. * libc/Makefile.in: Ditto. * libc/configure.in: Moved iconv converter parsing logic to top level newlib configure.in. * libc/configure: Regenerated. * libc/iconv/Makefile.in: Ditto. * libc/iconv/README.TODO * libc/iconv/charset.aliases: Remove wrong BE aliases for UCS2/UCS4/UTF8. * libc/iconv/ccs/Makefile.am: Remove C flag setting now that newlib.h can be used. * libc/iconv/ces/Makefile.am: Ditto. * libc/iconv/lib/Makefile.am: Ditto. * libc/iconv/ccs/Makefile.in: Regenerated. * libc/iconv/ces/Makefile.in: Ditto. * libc/iconv/lib/Makefile.in: Ditto. * libc/iconv/ccs/README.CCS.SOURCES: Updated. * libc/iconv/ccs/iconv_mktbl: Don't write junk strings to binaries. * libc/iconv/ccs/big5.c: Switch to use new underscored flags defined in newlib.h. * libc/iconv/ccs/cns11643_plane1.c: Ditto. * libc/iconv/ccs/cns11643_plane14.c: Ditto. * libc/iconv/ccs/cns11643_plane2.c: Ditto. * libc/iconv/ccs/cp775.c: Ditto. * libc/iconv/ccs/cp850.c: Ditto. * libc/iconv/ccs/cp852.c: Ditto. * libc/iconv/ccs/cp855.c: Ditto. * libc/iconv/ccs/cp866.c: Ditto. * libc/iconv/ccs/gb_2312_80.c: Ditto. * libc/iconv/ccs/iso_8859_1.c: Ditto. * libc/iconv/ccs/iso_8859_15.c: Ditto. * libc/iconv/ccs/iso_8859_2.c: Ditto. * libc/iconv/ccs/iso_8859_4.c: Ditto. * libc/iconv/ccs/iso_8859_5.c: Ditto. * libc/iconv/ccs/jis_x0201.c: Ditto. * libc/iconv/ccs/jis_x0208_1983.c: Ditto. * libc/iconv/ccs/jis_x0212_1990.c: Ditto. * libc/iconv/ccs/koi8_r.c: Ditto. * libc/iconv/ccs/koi8_u.c: Ditto. * libc/iconv/ccs/ksx1001.c: Ditto. * libc/iconv/ccs/shift_jis.c: Ditto. * libc/iconv/ccs/us_ascii.c: Ditto. * libc/iconv/ccs/binary/big5.cct: Newly generated. * libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto. * libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto. * libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto. * libc/iconv/ccs/binary/cp775.cct: Ditto. * libc/iconv/ccs/binary/cp850.cct: Ditto. * libc/iconv/ccs/binary/cp852.cct: Ditto. * libc/iconv/ccs/binary/cp855.cct: Ditto. * libc/iconv/ccs/binary/cp866.cct: Ditto. * libc/iconv/ccs/binary/gb_2312_80.cct: Ditto. * libc/iconv/ccs/binary/iso_8859_1.cct: Ditto. * libc/iconv/ccs/binary/iso_8859_15.cct: Ditto. * libc/iconv/ccs/binary/iso_8859_2.cct: Ditto. * libc/iconv/ccs/binary/iso_8859_4.cct: Ditto. * libc/iconv/ccs/binary/iso_8859_5.cct: Ditto. * libc/iconv/ccs/binary/jis_x0201.cct: Ditto. * libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto. * libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto. * libc/iconv/ccs/binary/koi8_r.cct: Ditto. * libc/iconv/ccs/binary/koi8_u.cct: Ditto. * libc/iconv/ccs/binary/ksx1001.cct: Ditto. * libc/iconv/ccs/binary/shift_jis.cct: Ditto. * libc/iconv/ccs/binary/us_ascii.cct: Ditto. * libc/iconv/lib/bialiasesi.c: Sync with charset.aliases. * libc/iconv/ces/euc-jp.c: Use newlib.h macros. * libc/iconv/ces/euc-kr.c: Ditto. * libc/iconv/ces/euc-tw.c: Ditto. * libc/iconv/ces/gb2312.c: Ditto. * libc/iconv/ces/iso-10646-ucs-2.c: Ditto. * libc/iconv/ces/iso-10646-ucs-4.c: Ditto. * libc/iconv/ces/ucs-2-internal.c: Ditto. * libc/iconv/ces/ucs-4-internal.c: Ditto. * libc/iconv/ces/utf-16.c: Ditto. * libc/iconv/ces/utf-8.c: Ditto. * libc/iconv/lib/aliases.c: Ditto. * libc/iconv/lib/biccs.c: Ditto. * libc/iconv/lib/bices.c: Ditto. * libc/iconv/lib/ccs.c: Ditto. * libc/iconv/lib/ces.c: Ditto. * libc/iconv/lib/ces_euc.c: Ditto. * libc/iconv/lib/ces_iso2022.c: Ditto. * libc/iconv/lib/ces_table.c: Ditto. * libc/iconv/lib/converter.c: Ditto. * libc/iconv/lib/deps.h: Ditto. * libc/iconv/lib/endian.h: Ditto. * libc/iconv/lib/iconv.c: Ditto. * libc/iconv/lib/loaddata.c: Ditto. * libc/iconv/lib/local.h: Include newlib.h. * libc/argz/Makefile.in: Regenerated. * libc/ctype/Makefile.in: Ditto. * libc/errno/Makefile.in: Ditto. * libc/iconv/ccs/binary/Makefile.in: Ditto. * libc/locale/Makefile.in: Ditto. * libc/misc/Makefile.in: Ditto. * libc/posix/Makefile.in: Ditto. * libc/reent/Makefile.in: Ditto. * libc/search/Makefile.in: Ditto. * libc/signal/Makefile.in: Ditto. * libc/stdio/Makefile.in: Ditto. * libc/stdio64/Makefile.in: Ditto. * libc/stdlib/Makefile.in: Ditto. * libc/string/Makefile.in: Ditto. * libc/syscalls/Makefile.in: Ditto. * libc/time/Makefile.in: Ditto. * libc/unix/Makefile.in: Ditto. * testsuite/newlib.iconv/iconv.exp: New file. * testsuite/newlib.iconv/iconvjp.c: Ditto. * testsuite/newlib.iconv/iconvnm.c: Ditto. * testsuite/newlib.iconv/iconvru.c: Ditto.
2003-11-072003-11-07 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-3/+3
* configure.host: Remove -DLOOSE_KERNEL_NAMES flag for linux x86 build. * iconvdata/Makefile.am: Make dependent on newlib's configure.host and set up default flags to pass to aclocal. * iconvdata/Makefile.in: Regenerated. * libc/sys/linux/Makefile.am: Add _ELIX_LEVEL_4 getlogin, getpwnam, and getpwuid routines. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/getlogin.c: New stub file to allow x86-linux applications to link with newlib's shared libc library. * libc/sys/linux/getpwnam.c: Ditto. * libc/sys/linux/getpwuid.c: Ditto. * libc/sys/linux/sys/types.h: Include <features.h> and supply types that were formerly supplied by /usr/include/linux/types.h with kernel types. * testsuite/newlib.wctype/twctype.c: Fix testcase to properly test _ELIX_LEVEL macro.
2002-11-142002-11-14 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston3-2/+61
* testsuite/lib/passfail.exp (newlib_pass_fail): Changed to only issue one pass/fail message for a compile/link/execute. * testsuite/newlib.elix/elix.exp: New file. * testsuite/newlib.elix/tmmap.c: Ditto.
2002-10-182002-10-18 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2-0/+84
* testsuite/newlib.wctype/tiswctype.c: New test case. * testsuite/newlib.wctype/twctrans.c: Ditto.
2002-10-182002-10-18 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston4-0/+86
* testsuite/include/check.h: New header file to use with test cases. * testsuite/lib/newlib.exp: Add testsuite/include directory to list of header files to use. * testsuite/newlib.wctype/twctype.c: New test case for iswctype fns. * testsuite/newlib.wctype/wctype.exp: New file.
2002-08-23 * libc/include/langinfo.h: New file.Thomas Fitzsimmons2-4/+4
* libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-07-112002-07-11 Chris Demetriou <cgd@broadcom.com>Jeff Johnston2-0/+137
* testsuite/newlib.search/hsearchtest.c: New file to test newlib/libc/search. * testsuite/newlib.search/hsearchtest.exp: Likewise.
2002-06-18 * testsuite/lib/passfail.exp (newlib_pass_fail_all): NewThomas Fitzsimmons3-26/+39
procedure. (newlib_pass_fail): Change to compile and run only one file. * testsuite/newlib.locale/locale.exp: Use new newlib_pass_fail_all procedure. * testsuite/newlib.string/string.exp: Likewise.
2002-06-182002-06-18 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston3-1/+62
* testsuite/newlib.stdlib/atexit.c: New file. * testsuite/newlib.stdlib/atexit.exp: Ditto. * testsuite/newlib.string/tstring.c: Change default start size to something more reasonable for embedded platforms.
2002-05-16 * testsuite/lib/newlib.exp: Add newlib_include_flags to compileThomas Fitzsimmons1-1/+1
options when testing natively on i[3456]86-*-linux.
2002-05-15 * testsuite/lib/checkoutput.exp (newlib_check_output): OutputThomas Fitzsimmons3-119/+119
only one pass or fail per test file. Trim \r's from output values received from test programs. Remove support for named tests. * testsuite/newlib.locale/UTF-8.exp: Update to support new newlib_check_output behaviour. * testsuite/newlib.locale/UTF-8.c: Likewise.
2002-05-01 * Add flags.exp.Thomas Fitzsimmons1-0/+82
2002-05-01 * Makefile.am (site.exp): Remove newlib_cflags. AddThomas Fitzsimmons2-18/+10
multibuildtop. * testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's. * testsuite/lib/flags.exp: New file. * testsuite/lib/newlib.exp: Load flags.exp. (newlib_target_compile): Remove libgloss directory references. (newlib_init): Remove newlib_cflags references.
2002-04-30 * testsuite/lib/newlib.exp (newlib_target_compile): ChangeThomas Fitzsimmons1-1/+1
method of finding libgloss_target_dir.
2002-04-30 * Makefile.am (site.exp): Change host_alias, host_triplet,Thomas Fitzsimmons1-12/+11
target_alias, target_triplet to refer to gcc's host and target variables (newlib's build and host variables). * testsuite/lib/newlib.exp (newlib_init): Change build references to host references, host references to target references to reflect Makefile.am changes. (newlib_target_compile): Likewise. (newlib_finish): Likewise.
2002-04-24 * Makefile.am (check-DEJAGNU): New target.Thomas Fitzsimmons9-0/+1055
(site.exp): Likewise. * acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD. * libc/locale/locale.c (_setlocale_r): Add UTF-8 support. * libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise. * libc/stdlib/wctomb_r.c (_wctomb_r): Likewise. * testsuite: New directory. * testsuite/config: Likewise. * testsuite/lib: Likewise. * testsuite/newlib.locale: Likewise. * testsuite/newlib.string: Likewise. * testsuite/config/default.exp: New file. * testsuite/lib/checkoutput.exp: New file. * testsuite/lib/newlib.exp: New file. * testsuite/lib/passfail.exp: New file. * testsuite/newlib.locale/UTF-8.c: New file. * testsuite/newlib.locale/UTF-8.exp: New file. * testsuite/newlib.locale/locale.exp: New file. * testsuite/newlib.string/string.exp: New file. * testsuite/newlib.string/tstring.c: New file.