aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Fix name of the test.Justus Winter2016-10-181-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* Fix build without threadsYann E. MORIN2016-07-122-2/+6
| | | | | | | | | | | | | | | * src/gen-posix-lock-obj.c: properly guard inclusioin of pthread.h * tests/t-lock.c: likewise * tests/t-poll.c: likewise -- Although ./configure checks for thread support, gen-posix-lock-obj and two tests still include pthread.h unconditionally. Guard that inclusion using the same condition as all other uses of pthread-related code. Signed-off-by: "Yann E. MORIN" <[email protected]>
* tests: Fix rare deadlock condition in t-poll.Werner Koch2016-06-151-3/+6
| | | | | | | | * tests/t-poll.c (launch_thread): Use es_fileno before starting the thread. -- GnuPG-bug-id: 2257
* Convert http links to https where possible in the source.Daniel Kahn Gillmor2016-02-085-5/+5
| | | | | | | | | | | | | | | | -- * use https for bug reporting * in comments and docs, use https to refer to: - www.gnu.org - creativecommons.org - translationproject.org - mail.gnome.org - www.perl.org - www.ctan.org - www.cl.cam.ac.uk - www.ntg.nl - cygwin.com - www.ethnologue.com
* tests: Fix read past buffer.Justus Winter2015-12-031-1/+3
| | | | | | | | * tests/t-poll.c (test_poll): Fix read past buffer. -- Found using gcc and AddressSanitizer. Signed-off-by: Justus Winter <[email protected]>
* Fix typos found by codespell.Justus Winter2015-11-191-2/+2
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* estream: Add gpgrt_set_nonblock and gpgrt_poll.Werner Koch2015-09-253-1/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Add sys/select.h and sys/time.h. * src/estream.c: Include both header if available. (COOKIE_IOCTL_NONBLOCK): New. (struct estream_cookie_fd): Add field nonblock. (func_fd_create): Set nonblock from MODEFLAGS. (es_func_fd_ioctl): New. (parse_mode): Add modeflag "nonblock". (es_fill): Map EWOULDBLOCK to EAGAIN. Do not set error indicator for EAGAIN. (es_flush, es_seek, es_write_nbf): Map EWOULDBLOCK to EAGAIN. (do_fdopen): Call COOKIE_IOCTL_NONBLOCK. (_gpgrt_set_nonblock): New. (_gpgrt_get_nonblock): New. (_gpgrt_poll): New. * src/gpg-error.h.in (struct _gpgrt_poll_s): New. (gpgrt_poll_t, es_poll_t): New. (es_set_nonblock, es_get_nonblock, es_poll): New. * src/gpg-error.vers, src/gpg-error.def.in: Add gpgrt_set_nonblock, gpgrt_get_nonblock, and gpgrt_poll. * src/visibility.c (gpgrt_set_nonblock, gpgrt_get_nonblock): New. (gpgrt_poll): New. * tests/t-common.h (DIM): New. * tests/t-poll.c: New. * tests/Makefile.am (TESTS): Add t-poll. (t_poll_LDADD): New. -- The poll interface uses select(2) internally because that is more portable than poll(2). Signed-off-by: Werner Koch <[email protected]>
* Allow building with --disable-threads.Werner Koch2015-06-151-2/+9
| | | | | | | | | | | | | | | | | | | | * src/posix-lock-obj.h (LOCK_ABI_NOT_AVAILABLE): New. (LOCK_ABI_VERSION): Define depending on USE_POSIX_THREADS. (_gpgrt_lock_t) [!USE_POSIX_THREADS]: Do not define the union. * src/gen-posix-lock-obj.c: Take care of USE_POSIX_THREADS. * src/posix-lock.c (_gpgrt_lock_init, _gpgrt_lock_lock) (_gpgrt_lock_trylock, _gpgrt_lock_unlock) (_gpgrt_lock_destroy): Return success for a no-threads version. * tests/t-lock.c: Disable tests if threads are not available. * src/mkheader.c (main): Add NO-THREADS to the printed comment. * configure.ac: Show NO-TRHEADS in the final summary. -- Warning: Using --disable-threads creates a different ABI which we can't encode in the the cpu-vendor-os triplet. The run time checks should detect this and abort the process. Signed-off-by: Werner Koch <[email protected]>
* w32: Remove compiler warnings.Werner Koch2015-04-101-0/+1
| | | | | | | | | | | | | | * src/Makefile.am (pre_mkheader_cmds): Avoid make diagnostic about failed but ignored command. This confuses Emacs' compiler job parser. * tests/t-lock.c [W32]: Include time.h. * src/init.c: Reorganize Windows only code. (wchar_to_utf8, utf8_to_wchar): Remove unused functions. (_gpg_err_set_errno): Use only one copy for all platforms. -- Note that there is a still a problem for W64 pertaining to the use of an int to store a HANDLE. This will be fixed when we add a full abstraction layer for Windows file objects.
* build: Require automake 1.14.Werner Koch2015-01-051-1/+1
| | | | | | | * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests. * tests/Makefile.am (INCLUDES): Replace by AM_CPPFLAGS. Signed-off-by: Werner Koch <[email protected]>
* Add test for the estream printf functionsWerner Koch2014-08-252-1/+430
| | | | | | | | | | | * tests/t-printf.c: New. * configure.ac: Check for vasprintf. -- These tests have been taken from Libestream and changed to be more portable. For example there is only va_start per function and the test return an error only for _GLIBC_ based systems because that is what we compare against.
* Implement symbol visibility.Werner Koch2014-08-252-4/+4
| | | | | | | | | | | | | * configure.ac: New option --enable-ld-version-script. (GPGRT_USE_VISIBILITY): New ac_define. (HAVE_LD_VERSION_SCRIPT): New am_conditional. * src/gpg-error.vers: New. * src/gpgrt-int.h: New. * src/visibility.c, src/visibility.h: New. Lot of changes to symbold names. -- This is only doe for the old API. The estream API needs to be added.
* Add missing redefine macros to cleanup the external symbols.Werner Koch2014-08-251-3/+6
|
* tests: Fix compiler warning.Werner Koch2014-08-101-1/+3
| | | | | | | | | * tests/t-lock.c: Include header vor getpid. (revision_thread): Init "i" to avoid compiler warning. -- GnuPG-bug-id: 1681 Note that the non-initialization of I did not harm.
* Improve logging in a test module.Daniel Kahn Gillmor2014-06-301-1/+1
| | | | * tests/t-version.c (main): Print program name.
* tests: Call srand for each thread under Windows.Werner Koch2014-01-241-0/+3
| | | | * tests/t-lock.c (accountant_thread) [W32]: Call srand.
* Add gpgrt_lock_ functions.Werner Koch2014-01-163-2/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (GPGRT_LOCK_DEFINE): New. (gpgrt_lock_init): New. (gpgrt_lock_lock): New. (gpgrt_lock_unlock): New. (gpgrt_lock_destroy): New. (gpgrt_yield): New. * src/gpg-error.def.in: Add new functions. * m4/lock.m4, m4/threadlib.m4: New. Taken from current gnulib. * configure.ac: Call gl_LOCK. Check size of pthread_mutex_t. Add LIBTHREAD to GPG_ERROR_CONFIG_LIBS. * src/err-codes.h.in (GPG_ERR_INV_LOCK_OBJ): New. * src/gen-posix-lock-obj.c: New. * src/gen-w32-lock-obj.c: New. * src/lock.h, src/thread.h: New. * src/posix-lock-obj.h, src/w32-lock-obj.h: New. * src/posix-lock.c, src/w32-lock.c: New. * src/posix-thread.c, src/w32-thread.c: * src/w32-lock-obj-pub.in: New. * src/mkheader.c (include_file): Support build time include files. (write_special): Add keyword "include:lock-obj". * src/Makefile.am: (posix-lock-obj-pub.in): New rule. (noinst_PROGRAMS): Add gen-*-lock-obj helpers. * tests/t-common.h: New. * tests/t-lock.c: New. * tests/Makefile.am (t_lock_LDADD): Add new test. -- This patch introduces the gpgrt_ functions which will be extended over time to provide a library of commonly used code in GnuPG and Libgcrypt. Having them in a library named libgpg-error is a misnomer but this way we can achieve a smooth upgrade path. In contrasts to other GnuPG libraries, the gpgrt_ functions return a simple gpg_err_code_t and not gpg_error_t. The rationale for this is that a source of error identifier does not make sense here; it is better to use the source of error identifier of the caller. This can easily be achieved in a component by wrapping these function in a gpg_error macro/inline. There is no cross-compiling support for Posix platforms; the gen-posix-lock-obj tool must be run on the target system. Note that the gen-w32-lock-obj tool is not needed at build time but was used to figure out ABI definitions for Windows. Signed-off-by: Werner Koch <[email protected]>
* Add version macros and check function.Werner Koch2013-02-232-6/+104
| | | | | | | | | | | | | | | | | | | * configure.ac (VERSION_NUMBER): New ac_subst. (BUILD_FILEVERSION): Build on all platforms (BUILD_TIMESTAMP): Try to use an ISO string. * src/Makefile.am (extra-h.in): Add new version numbers. * src/versioninfo.rc.in: Update copyright year. * src/version.c: New. (gpg_error_check_version): New API. * src/gpg-error.h.in: Add gpg_error_check_version prototype. * src/gpg-error.def.in: Add gpg_error_check_version * tests/t-version.c: New. * tests/Makefile.am (TESTS): Add t-version.c * src/gpg-error-config.in: s/VERSION/PACKAGE_VERSION/. -- All other GnuPG libraries do this, thus we do it here as well.
* Add some code to build nativley under WindowsCE - not finished.Werner Koch2010-01-182-2/+9
|
* Ready for a new releaselibgpg-error-1.4Werner Koch2006-09-142-1/+85
|
* 2004-03-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann2004-03-071-1/+1
| | | | | | * tests/Makefile.am (INCLUDES): Change to -I$(top_srcdir)/src to -I$(top_builddir).
* 2003-06-04 Marcus Brinkmann <[email protected]>Marcus Brinkmann2003-06-041-3/+2
| | | | | | | | | | | * src/gpg-error.h (gpg_err_code_t): Add GPG_ERR_INV_ENGINE, GPG_ERR_PUBKEY_NOT_TRUSTED, GPG_ERR_DECRYPT_FAILED, GPG_ERR_KEY_EXPIRED. (gpg_make_error): Rename to gpg_err_make. (gpg_error): Use here. * tests/t-strerror.c (main): And here. (gpg_make_error_from_errno): Rename to gpg_err_make_from_errno.
* 2003-06-02 Moritz Schulte <[email protected]>Moritz Schulte2003-06-021-1/+1
| | | | | | * tests/t-strerror.c: Include <gpg-error.h> instead of <gpg/error.h>.
* 2003-05-15 Marcus Brinkmann <[email protected]>Marcus Brinkmann2003-05-152-13/+15
| | | | | | | | | | | | | | | | | | | | | * src/mkstrtable.awk: Add exception clause to license about the output of the script. * configure.ac: Change license to LGPL 2.1 or later. * Makefile.am: Likewise. * src/Makefile.am: Likewise. * src/err-codes.h.in: Likewise. * src/err-sources.h.in: Likewise. * src/strsource.c: Likewise. * src/strerror.c: Likewise. * src/gpg/error.h: Likewise. * tests/Makefile.am: Likewise. * src/mkstrtable.awk: New variable HEADER. Copy input until first line with an actual code and description occurs. * src/err-codes.h.in: Uncomment license, so it is copied into the output. * src/err-sources.h.in: Likewise.
* 2003-05-15 Marcus Brinkmann <[email protected]>Marcus Brinkmann2003-05-152-0/+90
* Initial check-in.