Commit Graph

31 Commits

Author SHA1 Message Date
Jameson Nash
cd7b33887f 2022.03.09, Version 1.44.1 (Stable)
Changes since version 1.44.0:
 
 * process: simplify uv__write_int calls (Jameson Nash)
 
 * macos: don't use thread-unsafe strtok() (Ben Noordhuis)
 
 * process: fix hang after NOTE_EXIT (Jameson Nash)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEz7ucqaW+r9cOKzxaeaZ8VaNnnIsFAmIo6e4ACgkQeaZ8VaNn
 nIubZRAAiD6sTkaYpvgXTDD0C9M3HMOms3bL9O23T2Ggtzwnzek1iwZys8KQlhn8
 mhTK+HIT610zcdqOgLE+YLYrtzspb61/8/QSDFoTX1m69rO4WXiW6fejOq6b8fu5
 cIBgqFUf2gVCulBcmqBJ83OL/EPJZmuH9fpEp6LVA74DxDQwlwGXVgTivDZtPEZQ
 thcElPuqlvpyTid42qMhug8DGAR37/qrCiQHUUGX1RWQJkSSMNPSVgXNBWaylO+g
 j3nTp3R5KrutXWa2wFpVx+KzdEP4eDanyL67A/fffHAcEIoSjmha2V+uOCInfDqU
 3Dn4jGTqS9Dc/mlxAxytqnhCFxiYPIPJcLlKJpkg5ygsmSOzx1cvkjkAyhG7A/XD
 44j9dn5rUK95r34anfmBdzCkJvX+vvODJTvgGJ2hjBU63BBeq5xtwtAf/8sLl4y/
 /HzmfVXgCHnWV5U6AHeaSsOOh5nLCV5Q0HpAVn10aIB7s+gaaR5Dfp/FJxdGoVeD
 6fgTkmeyLLXPAyhDZAXO3cE4AfPvlbeQfSAwBEB1m5Cbk5eZ1fj7hoIFwfF6RNQJ
 /hCUTKeNNVi0bx4b2xUAPfjmDABHVCzVTMkdb1xYRjOT2MkI5f1ycz9YZOkRLS/V
 WQEBCermlubQ8Pl1rByxW/GcQrs33PDnjk4KB+blr7+Y6kHplLA=
 =gJmZ
 -----END PGP SIGNATURE-----

Merge tag 'v1.44.1' into merge_1.44.1
2022-03-09 15:57:53 -05:00
Ben Noordhuis
f250c6c73e
unix,win: add uv_available_parallelism() (#3499)
Replacement for the usage pattern where people use uv_cpu_info() as an
imperfect heuristic for determining the amount of parallelism that is
available to their programs.

Fixes #3493.
2022-03-04 22:35:14 +01:00
Jameson Nash
4fe755bc5b 2021.07.21, Version 1.42.0 (Stable)
Changes since version 1.41.0:
 
 * doc: fix code highlighting (Darshan Sen)
 
 * test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros (tjarlama)
 
 * zos: build in ascii code page (Shuowang (Wayne) Zhang)
 
 * zos: don't use nanosecond timestamp fields (Shuowang (Wayne) Zhang)
 
 * zos: introduce zoslib (Shuowang (Wayne) Zhang)
 
 * zos: use strnlen() from zoslib (Shuowang (Wayne) Zhang)
 
 * zos: use nanosleep() from zoslib (Shuowang (Wayne) Zhang)
 
 * zos: use __getargv() from zoslib to get exe path (Shuowang (Wayne) Zhang)
 
 * zos: treat __rfim_utok as binary (Shuowang (Wayne) Zhang)
 
 * zos: use execvpe() to set environ explictly (Shuowang (Wayne) Zhang)
 
 * zos: use custom proctitle implementation (Shuowang (Wayne) Zhang)
 
 * doc: add instructions for building on z/OS (Shuowang (Wayne) Zhang)
 
 * linux,udp: enable full ICMP error reporting (Ondřej Surý)
 
 * test: fix test-udp-send-unreachable (Ondřej Surý)
 
 * include: fix typo in documentation (Tobias Nießen)
 
 * chore: use for(;;) instead of while (Yash Ladha)
 
 * test: remove string + int warning on udp-pummel (Juan José Arboleda)
 
 * cmake: fix linker flags (Zhao Zhili)
 
 * test: fix stack-use-after-scope (Zhao Zhili)
 
 * unix: expose thread_stack_size() internally (Brandon Cheng)
 
 * darwin: use RLIMIT_STACK for fsevents pthread (Brandon Cheng)
 
 * darwin: abort on pthread_attr_init fail (Brandon Cheng)
 
 * benchmark: remove unreachable code (Matvii Hodovaniuk)
 
 * macos: fix memleaks in uv__get_cpu_speed (George Zhao)
 
 * Make Thread Sanitizer aware of file descriptor close in uv__close() (Ondřej
   Surý)
 
 * darwin: fix iOS compilation and functionality (Hayden)
 
 * linux: work around copy_file_range() cephfs bug (Ben Noordhuis)
 
 * zos: implement uv_get_constrained_memory() (Shuowang (Wayne) Zhang)
 
 * zos: fix uv_get_free_memory() (Shuowang (Wayne) Zhang)
 
 * zos: use CVTRLSTG to get total memory accurately (Shuowang (Wayne) Zhang)
 
 * ibmi: Handle interface names longer than 10 chars (Kevin Adler)
 
 * docs: update read-the-docs version of sphinx (Jameson Nash)
 
 * unix: refactor uv_try_write (twosee)
 
 * linux-core: add proper divide by zero assert (yiyuaner)
 
 * misc: remove unnecessary _GNU_SOURCE macros (Darshan Sen)
 
 * test: log to stdout to conform TAP spec (bbara)
 
 * win,fs: fix C4090 warning with MSVC (SeverinLeonhardt)
 
 * build: some systems provide dlopen() in libc (Andy Fiddaman)
 
 * include: add EOVERFLOW status code mapping (Darshan Sen)
 
 * unix,fs: use uv__load_relaxed and uv__store_relaxed (Darshan Sen)
 
 * win: fix string encoding issue of uv_os_gethostname (Eagle Liang)
 
 * unix,process: add uv__write_errno helper function (Ricky Zhou)
 
 * Re-merge "unix,stream: clear read/write states on close/eof" (Jameson Nash)
 
 * unix,core: fix errno handling in uv__getpwuid_r (Darshan Sen)
 
 * errors: map ESOCKTNOSUPPORT errno (Ryan Liptak)
 
 * doc: uv_read_stop always succeeds (Simon Kissane)
 
 * inet: fix inconsistent return value of inet_ntop6 (twosee)
 
 * darwin: fix -Wsometimes-uninitialized warning (twosee)
 
 * stream: introduce uv_try_write2 function (twosee)
 
 * poll,win: UV_PRIORITIZED option should not assert (twosee)
 
 * src: DragonFlyBSD has mmsghdr struct too (David Carlier)
 
 * cleanup,win: Remove _WIN32 guards on threadpool (James M Snell)
 
 * freebsd: fix an incompatible pointer type warning (Darshan Sen)
 
 * core: Correct the conditionals for {cloexec,nonblock}_ioctl (Ali Mohammad
   Pur)
 
 * win,tcp: make uv_close work more like unix (Jameson Nash)
 
 * doc: more accurate list of valid send_handle's (twosee)
 
 * win,tcp: translate system errors correctly (twosee)
 
 * unix: implement cpu_relax() on ppc64 (Ben Noordhuis)
 
 * docs: move list of project links under PR control (Jameson Nash)
 
 * test: wrong pointer arithmetic multiplier (Erkhes N)
 
 * doc: switch discussion forum to github (Jameson Nash)
 
 * idna: fix OOB read in punycode decoder (Ben Noordhuis)
 
 * build: make sure -fvisibility=hidden is set (Santiago Gimeno)
 
 * illumos: event ports to epoll (tjarlama)
 
 * illumos,tty: UV_TTY_MODE_IO waits for 4 bytes (Joshua M. Clulow)
 
 * doc: add vtjnash GPG ID (Jameson Nash)
 
 * linux: read CPU model information on ppc (Richard Lau)
 
 * darwin: fix uv_barrier race condition (Guilherme Íscaro)
 
 * unix,stream: fix loop hang after uv_shutdown (Jameson Nash)
 
 * doc,udp: note that suggested_size is 1 max-sized dgram (Ryan Liptak)
 
 * mingw: fix building for ARM/AArch64 (Martin Storsjö)
 
 * unix: strnlen is not available on Solaris 10 (Claes Nästén)
 
 * sunos: restore use of event ports (Andy Fiddaman)
 
 * sunos,cmake: use thread-safe errno (Andy Fiddaman)
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEErq0KS2hnZ3UaDkrvNKJfsSgkZRQFAmD2OHUSHHZ0am5hc2hA
 Z21haWwuY29tAAoJEDSiX7EoJGUU6XsQAJqkq5qV54EEFQAIf/AV9e4pt5uua2iF
 bTyExNGyty5TW4OCytSxakLWS/9lN5vQo6/bjeUEfhq8a1BmLzJq5Nnmc8ntlYM6
 n89vZSRjgLNwQ2WuRV9akCMTPYydeJc6RboEjTDVlWtSr4QDCwK+fKgaMil+9uow
 Y8biEme/vIcpJNOE3IdhivUoS1Hl1PJrVbhJapHBQ6j4xf8CIrFBwn9qF0IX+Ngp
 9xZVvJFXQkZzqLqkHeMasGCp+hmQDnAiXKO3vbUJbeVwoCukDYmVG8Pb3H3RIyo9
 yZkdBpOZ1GEmnPY766IkArThM+/WBWTgz6pTOl59Zx0Wa5Dmr8ASUiauE/EEARS4
 v/QUQA13MS8cgOBhmPjrLQ9Kv6HPvLuZSjshEJz4RdL8aSThoQ7Om+AlR679wnyK
 vlcfNLoh+Jw1zCWKWO6c5BiqcB/8J/JPT2N0vMmT6+RZ8AiqyjGpBw+t1HeBkdW5
 CPJX06CXk7vsvCKbw4w8i8Xl40zm9yws5tO7ukG/lkmB5EUKhMe1z/5pTAWoFJV/
 srs6S+g3xmJ1oBeytjjEra/iJji/6jQ/oLbYeA+mvBxV5+hu7Mtnpzl0vWKrN5M2
 ewxOvJJtggT1V2WcVqYLmHdZpug+pspG6Uwm6/TG/379IFot3O4OjPZ8wlrLgaNt
 PU0FlUDCxyvT
 =gkXG
 -----END PGP SIGNATURE-----

Merge tag 'v1.42.0' into merge_1.42.0

PR-URL: https://github.com/libuv/libuv/pull/3245
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2021-07-23 13:32:16 -04:00
gengjiawen
97a903309f build: add asan checks
Fixes: https://github.com/libuv/libuv/issues/2999
PR-URL: https://github.com/libuv/libuv/pull/2998
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-10-21 14:52:58 +02:00
Jameson Nash
66720786d1 2020.07.04, Version 1.38.1 (Stable)
Changes since version 1.38.0:
 
 * test: use last matching qemu version (cjihrig)
 
 * win, util: rearrange uv_hrtime (Bartosz Sosnowski)
 
 * test: skip signal_multiple_loops test on QEMU (gengjiawen)
 
 * build: add android build to CI (gengjiawen)
 
 * test: extend fs_event_error_reporting timeout (cjihrig)
 
 * build: link libkvm on netbsd only (Alexander Tokmakov)
 
 * linux: refactor /proc file reader logic (Ben Noordhuis)
 
 * linux: read load average from /proc/loadavg (Ben Noordhuis)
 
 * android: remove patch code for below 21 (gengjiawen)
 
 * win: fix visual studio 2008 build (Arenoros)
 
 * win,tty: fix deadlock caused by inconsistent state (lander0s)
 
 * unix: use relaxed loads/stores for feature checks (Ben Noordhuis)
 
 * build: don't .gitignore m4/ax_pthread.m4 (Ben Noordhuis)
 
 * unix: fix gcc atomics feature check (Ben Noordhuis)
 
 * darwin: work around clock jumping back in time (Ben Noordhuis)
 
 * udp: fix write_queue cleanup on sendmmsg error (Santiago Gimeno)
 
 * src: build fix for Android (David Carlier)
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQIzBAABCgAdFiEElK42Z1xGTWS6+mjddDQ5C9vpucUFAl7/Yg8ACgkQdDQ5C9vp
 ucXgdg//euAx0jByjpOdc4RjLAXpq+iEDuLQXIzT3GmvK3g5+ymrB1HVkw455l7o
 gHY9f/GM+A8wZBcLoyfMywLiSD78/HOrHwQ1MGiieMm1hPFr8OXQ4Z25Bdx/GsE4
 2nCprDrfMrVUQs8eFVx30fjFvOymzhpHak173N6uBOVBLQRivQHSuOG4Dk7RJSAA
 iCIKQ6JulQ/yX0OFvvnYjwbnt5bCDlr1gTFX1HQZFi4dELIbdfaqn1AkY6COa4mc
 tKZRMC1rV81HejNAYFG2Js1QQaUKtMemyHUple6qRo/TYhsZXMaWShjOOHtBqT5X
 hQ8yqGLcaQhWXI7FlBK9aOFBc2/c7Jrxn78MFnd0C8kUHMT9oMhK3KOUHjJ4K5Zt
 sN06cS9Zj9Gpvcnzffohx6/0ePyIVHsEGBt8gRI3YCH4GR0A12WYc4Kr8YuJu11J
 7WVEjIpxZBRajOq8xfA4n6brM0s8gwJvCm2/ypYZKbQ0kz0ZZD5nOK+Ax+ukdg51
 cBtTyx0tme0bQPZkzJP5sMP6DqGKgHbMzeUueqJ5xXOuXWjnOZRWfxmT22RSc6vI
 9D+9p12GD81KlYoprbKk5Fg/adIW/kKrT1cFMeKgcKhyuq8B5maDoaN/FP0oIZc2
 p1Pv9KEJCo7gI35XwkEvEIDLJ1Ax8B8RQE+8sophzsxVxo5E+GE=
 =P+eq
 -----END PGP SIGNATURE-----

Merge tag 'v1.38.1' into merge_1.38.1

PR-URL: https://github.com/libuv/libuv/pull/2927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-07-30 15:01:58 -04:00
gengjiawen
1c976110d5
build: test on more platforms via QEMU in CI
This commit runs the test suite via QEMU on GitHub Actions on
a variety of platforms.

Fixes: https://github.com/libuv/libuv/issues/2842
PR-URL: https://github.com/libuv/libuv/pull/2846
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-05-17 10:03:20 -04:00
Jameson Nash
c39e0217aa 2020.01.24, Version 1.34.2 (Stable)
Changes since version 1.34.1:
 
 * misc: adjust stalebot deadlines (Jameson Nash)
 
 * test: fix env-vars flakiness (cjihrig)
 
 * test: avoid truncating output lines (Jameson Nash)
 
 * darwin: stop calling SetApplicationIsDaemon() (Ben Noordhuis)
 
 * ibmi: implement uv_interface_addresses() (Xu Meng)
 
 * osx,fsevent: fix race during uv_loop_close (Jameson Nash)
 
 * osx,fsevent: clear pointer when deleting it [NFCI] (Jameson Nash)
 
 * Revert "aix: replace ECONNRESET with EOF if already closed" (Jameson Nash)
 
 * unix: handle uv__open_cloexec return value correctly (Anna Henningsen)
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQIzBAABCgAdFiEElK42Z1xGTWS6+mjddDQ5C9vpucUFAl4pq5MACgkQdDQ5C9vp
 ucWJxA//fZm/u46gxSeRdWeFu9W1r1CgkJqmWT6vHeeBphk28lAulHAO0AM/bbbd
 x2WsLS8q7cLk3chwpN4CgJkgS8acqcsuHBGEzqc8o5cd76rCkua7eHvOR83D4Ix4
 c46hJH7WF3S4jnVV09iAU+mGplyUPF3F8HvmbTNZnbsuLKj2U88kDjm4nsxiSwdn
 aMeyZNtM6NdtqHRgIup+SqS4hNvaUt+gD7715efTlGPDwLR3KCJ8Mzd9F4JFrPrT
 wCjAGLiTFZXFcnwR/Ysx66jQNjfp/fZy7G/zU+7UFKwCjZdwZyybqzy4lmYXtV7N
 2hmliaxm3UsYPSD06mA+iUTdD9vnk2/htCNL5OBS11b6lAliYtdNC3l9BQ2Y3TVp
 xobPcjiRWmvN5P0GIL9/DjK7nxpSdj7BFFyyVz21/+OsYX+NYI4L/Vb4RjezGeGy
 RMS26S530fOsPCbPlSyEUqvjbTHI95FiLK8Y008YlRRsWVsCxrdrhDjT964LHZ51
 nFFPkR0Ghr/y0d9AzBsrsnjAi9g/K+dX3F72S8S2gS3LMkLVr6fLrEQ5AmclAa4f
 62TZvnKY3MzjdzsBpslGHHVp3l+HsNdkI27bLCbYUAL/c+R0fl96mac34IHGL+KV
 b/99O3WMxGtq/Zdn709ryMOLnC+F5KTJpl2LckExfxvubPcu9UQ=
 =SjB7
 -----END PGP SIGNATURE-----

Merge tag 'v1.34.2' into merge_1.34.2

PR-URL: https://github.com/libuv/libuv/pull/2649
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-01-31 13:34:36 -08:00
Xu Meng
5b12c313e1 test: skip some test cases on IBMi
On IBMi, uv_uptime() and uv_fs_event_init() return UV_ENOSYS.
Set NO_FS_EVENTS on IBMi.

PR-URL: https://github.com/libuv/libuv/pull/2573
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-12-16 15:33:04 +01:00
Jameson Nash
102a79fc20 2019.05.22, Version 1.29.1 (Stable)
Changes since version 1.29.0:
 
 * unix: simplify uv/posix.h include logic (cjihrig)
 
 * test: increase test timeout (cjihrig)
 
 * linux: fix sscanf() overflows reading from /proc (Ben Noordhuis)
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQIzBAABCgAdFiEElK42Z1xGTWS6+mjddDQ5C9vpucUFAlzkAM0ACgkQdDQ5C9vp
 ucXyuA/+NhzStMozgVJQ6lYjIjFQX4brTRr94r/fD46IVm0zHmXSh9qhxX8CVRSq
 u+aw4NfL1O+QYH3GObYB2fn/zDWmw0wOvBdIj96esVUSxvXHQt4xuugO8WcBx9QN
 d8hVfmLE8SQotOCAvHeW5RJJj0Xj9XMHtlRecMZfWCXnGntoGMVGLKyy0b+mfA5w
 Z7qxQ5odSi5b18qabiqrLG+NSZTNbozDWcfvkdUeJtmkBSqJNIZIkTjzXDTAyw41
 DJKqmC2zn4Y95diK8z6ayW/FIYtogG75rKZSMDwkHyXEG1+SQ3MFDQBYOdnic/0b
 pMip31nHEn4NZT2JUPi3A3gvlZXtYrm5VxCVRDgMv+I9UQj2EBBfaWASZhtQ0KSh
 UvaBsyuDIHsgGoJUFvrzVx9EjUmFnLl2UIlukNcWL4QiV1bJDpd4VppIsfXUCiud
 UlGc7EEzCgAzxgiG+FTMOpQrDqgjyShJdoEpjzKroVi4DDmWBQoQVkZM3bGdiEOD
 3DXVTfsHrXTkLPC55xqtwAb1Rgyi3mPhSrfHroaPG9gjNrcy9mPHEm5aiIiJ+3gH
 nunWCgMauJgZzBTPYc1+fwpuRkGb7OmPwgsuqYo2B0uZ/nJ5cy9lmuyqCW6u+Ua6
 Nxa2PEoaDeyWvkIOd7sCn+FeeQ2eLcueGLAaGtQdVCano4dmg/c=
 =mp2y
 -----END PGP SIGNATURE-----

Merge tag 'v1.29.1' into merge_1.29.1

PR-URL: https://github.com/libuv/libuv/pull/2316
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-06-07 14:22:16 -04:00
cjihrig
d4288bbeab
unix,win: add uv_os_uname()
Fixes: https://github.com/libuv/libuv/issues/2126
PR-URL: https://github.com/libuv/libuv/pull/2128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-14 10:47:20 -05:00
damon-kwok
2749d0c30d
test: fix platform_output test on cygwin
Fixes: https://github.com/libuv/libuv/issues/2077
PR-URL: https://github.com/libuv/libuv/pull/2081
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-20 21:16:18 -05:00
Kári Tristan Helgason
8eed38fd4a
unix,win: add gecos field to uv_passwd_t
On Unix the gecos field usually contains the full name
of the user. This is returned by getpwuid_r() on Unix
and GetUserNameExW on Windows (falling back to
NameSamCompatible if the users display name is not set).

Co-authored-by: cjihrig <cjihrig@gmail.com>
Co-authored-by: Saúl Ibarra Corretgé <saghul@gmail.com>
Refs: https://github.com/libuv/libuv/pull/834
Fixes: https://github.com/libuv/libuv/issues/831
PR-URL: https://github.com/libuv/libuv/pull/1789
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-04-10 14:32:21 -04:00
Bartosz Sosnowski
d708df110a
unix,win: add uv_os_getpid()
Adds a multi platform way to get current process id.

PR-URL: https://github.com/libuv/libuv/pull/1661
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-30 20:11:21 -05:00
cjihrig
e8e6a8a500
unix,win: add uv_os_getppid()
Refs: https://github.com/nodejs/node/issues/14957
PR-URL: https://github.com/libuv/libuv/pull/1610
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-11-01 10:32:12 -04:00
Brad King
6398251aff cygwin: implement support for cygwin and msys2
Cygwin and MSYS2 are POSIX layers implemented on top of Windows.
Use our POSIX `poll(2)` implementation of our poll abstraction.
For most other components we already have dedicated sources
implementing them in terms of APIs available on Cygwin or
providing non-implementations of components not supported.

This leaves only three components that need Cygwin-specific
implementations:

* uv_uptime: implement using sysinfo
* uv_resident_set_memory: add a placeholder returning UV_ENOSYS
* uv_cpu_info: add a placeholder returning UV_ENOSYS

Update our test suite to account for features not available
due to Cygwin platform limitations or our placeholders.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:21 +02:00
Kári Tristan Helgason
89f01a41ab test: silence build warnings
PR-URL: https://github.com/libuv/libuv/pull/893
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-03 01:18:17 +02:00
Ben Noordhuis
2753bc1fc8 test: fix -Wformat warnings in platform test
Cast the `ru_majflt` and `ru_maxrss` field to `unsigned long long` when
printing them with `"%llu"`.

Warnings introduced in commit 6f17a61 ("win: add maxrss, pagefaults to
uv_getrusage()".)

PR-URL: https://github.com/libuv/libuv/pull/855
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-04 17:25:21 +02:00
Robert Jefe Lindstaedt
6f17a617da win: add maxrss, pagefaults to uv_getrusage()
This commit populates the ru_majflt and ru_maxrss fields of
uv_getrusage() on Windows.

PR-URL: https://github.com/libuv/libuv/pull/805
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-21 10:44:08 -04:00
Ben Noordhuis
2d6437888e test: use %ld for printing uid/gid
The uid and gid fields in uv_passwd_t are of type long so use %ld for
printing them.  Fixes two -Wformat compiler warnings.

PR-URL: https://github.com/libuv/libuv/pull/797
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-31 13:19:53 +02:00
cjihrig
217f81b6a1 unix,win: add uv_get_passwd()
This commit adds the uv_get_passwd() function, which returns a
subset of the current effective user's password file entry.

Refs: https://github.com/libuv/libuv/issues/11
Fixes: https://github.com/libuv/libuv/issues/731
PR-URL: https://github.com/libuv/libuv/pull/742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-29 08:13:59 -04:00
Andrew Paprocki
266ee6424f test: fix platform_output netmask printing.
The implementation will leave the family set to `AF_UNSPEC` if a
netmask is not present, but the test driver would always print the
uninitialized buffer as an `AF_INET4` address.  It will now print
"none" if there is no netmask (e.g., for loopback interfaces).

PR-URL: https://github.com/libuv/libuv/pull/373
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-05-28 11:09:25 +02:00
Saúl Ibarra Corretgé
098ba555c4 test: add uv_cwd output to platform_output test
PR-URL: https://github.com/libuv/libuv/pull/63
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-16 08:12:59 +01:00
Oleg Efimov
da9a2b1d3d unix, windows: add uv_getrusage() function 2014-02-21 18:50:15 +01:00
Brian White
e3a657c662 unix, windows: add MAC to uv_interface_addresses()
Make uv_interface_addresses() return the MAC address as a 48 bits
binary value in the phys_addr field of the uv_interface_address_t
struct.
2013-07-25 13:49:39 +02:00
Ben Noordhuis
3ee4d3f183 unix, windows: return error codes directly
This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like this one:

    if (uv_foo(loop) < 0) {
      uv_err_t err = uv_last_error(loop);
      fprintf(stderr, "%s\n", uv_strerror(err));
    }

Should be rewritten like this:

    int err = uv_foo(loop);
    if (err < 0)
      fprintf(stderr, "%s\n", uv_strerror(err));

The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.
2013-07-07 09:51:00 +02:00
Ben Kelly
14aa6153be unix, win: add netmask to uv_interface_address
Include the netmask when returning information about the OS network
interfaces.

This commit provides implementations for windows and those unix
platforms using getifaddrs().

AIX was not implemented because it requires the use of ioctls and I do
not have an AIX development/test environment.  The windows code was
developed using mingw on winxp as I do not have access to visual studio.

Tested on darwin (ipv4/ipv6) and winxp (ipv4 only).  Needs testing on
newer windows using ipv6 and other unix platforms.
2013-04-10 14:48:23 +02:00
Bert Belder
2e5e1165ce Tests: don't use %zu placeholder in printf statements
It's not supported by msvcrt.
2012-04-11 22:54:02 +02:00
Brian White
9d3c00046f test: ensure valid uptime value 2012-04-01 21:15:51 +02:00
Ben Noordhuis
8ce8bfaa40 test: fix format string warnings 2012-03-21 06:26:10 -07:00
Ben Noordhuis
379ca428ef test: fix compiler warnings
* remove unused variables and functions
* replace %llu with %zu when printing size_t variables
2012-03-16 02:46:51 +01:00
Igor Zinkovsky
3d189de699 platform api 2011-12-14 17:50:36 -08:00