qt5base-lts/tests/auto/corelib/global
Thiago Macieira 120ecc976f QRandomGenerator: use getentropy on Linux & OpenBSD
The getentropy function, first found in OpenBSD, is present in glibc
since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the
Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper,
the glibc implementation of getentropy() function is not a POSIX thread
cancellation point, so we prefer to use that even though we have to
break the reading into 256-byte blocks.

The big advantage is that these functions work even in the absence of a
/dev/urandom device node, in addition to a few cycles shaved off by not
having to open a file descriptor and close it at exit. What's more, the
glibc implementation blocks until entropy is available on early boot, so
we don't have to worry about a failure mode. The Bionic implementation
will fall back by itself to /dev/urandom and, failing that, gathering
entropy from elsewhere in the system in a way it cannot fail either.

uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has
neither.

Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-30 21:19:10 +00:00
..
q_func_info Updated license headers 2016-01-21 18:55:18 +00:00
qflags Fix test build with ICC: QFlags does not auto cast to uint 2017-04-28 12:37:09 +00:00
qfloat16 Eliminate ambiguous casts involving qfloat16 2017-05-07 16:44:55 +00:00
qgetputenv qEnvironmentVariableIntValue: fix the case of a non-numeric value 2017-06-01 06:02:10 +00:00
qglobal foreach: do not use operators that trigger non-evaluated contexts 2016-12-10 18:11:38 +00:00
qglobalstatic tests: Unify license to GPL-EXCEPT 2017-04-03 07:18:46 +00:00
qhooks tst_qhooks: test that it's possible to chain multiple hooks together 2016-11-18 15:22:32 +00:00
qlogging Fix tst_qmessagehandler for configurations without process support 2017-05-31 13:10:03 +00:00
qnumeric Add Intel copyright to files that Intel has had non-trivial contribution 2016-01-21 22:44:21 +00:00
qrand Updated license headers 2016-01-21 18:55:18 +00:00
qrandomgenerator QRandomGenerator: use getentropy on Linux & OpenBSD 2017-06-30 21:19:10 +00:00
qtendian Move qle_bitfield to qendian_p.h 2017-06-27 22:16:56 +00:00
global.pro Long live QRandomGenerator 2017-06-12 06:14:34 +00:00