[ovs-git] Open vSwitch: random: Add entropy test. (master)
dev at openvswitch.org
dev at openvswitch.org
Mon Nov 15 17:34:32 UTC 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".
The branch, master has been updated
via 78f3f3164021402d7dbca495d1f3f48d81d9a353 (commit)
via 7918636f05b058cf621cca1e6772e427b5eb736e (commit)
from 633d7b903cf4f428c7a89cac49c3008c78fa01f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 78f3f3164021402d7dbca495d1f3f48d81d9a353
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=78f3f3164021402d7dbca495d1f3f48d81d9a353
Author: Ben Pfaff <blp at nicira.com>
random: Add entropy test.
This test would have made the bug fixed in the previous commit obvious. It
would have printed the following:
average=0007c220
bit 0 1
0 5012 4988
1 5019 4981
2 5154 4846
3 4909 5091
4 5011 4989
5 5021 4979
6 4911 5089
7 4910 5090
8 5011 4989
9 5020 4980
10 5154 4846
11 5021 4979
12 5155 4845
13 5019 4981
14 5153 4847
15 5153 4847
16 5153 4847
17 5153 4847
18 5153 4847
19 5152 4848
20 10000 0
21 10000 0
22 10000 0
23 10000 0
24 10000 0
25 10000 0
26 10000 0
27 10000 0
28 10000 0
29 10000 0
30 10000 0
31 10000 0
(expected values are 5000)
nibble 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 696 646 564 693 542 545 612 611 687 663 645 560 674 566 592 704
1 625 589 597 571 638 623 604 663 670 652 650 557 541 683 686 651
2 628 644 659 672 648 569 585 616 623 647 681 600 586 675 601 566
3 683 665 717 549 633 613 701 592 663 531 545 800 623 608 590 487
4 622 657 777 557 720 608 613 598 657 678 551 654 615 596 598 499
5 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(expected values are 625)
commit 7918636f05b058cf621cca1e6772e427b5eb736e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7918636f05b058cf621cca1e6772e427b5eb736e
Author: Ben Pfaff <blp at nicira.com>
random: Fix random number generator.
As written, this "32-bit" random number generator nevers returns a value
bigger than 0xfffe0. This fixes the problem.
-----------------------------------------------------------------------
Summary of changes:
lib/random.c | 10 ++++++-
lib/random.h | 4 ++-
tests/automake.mk | 6 ++++
tests/library.at | 52 +++++++++++++++++++++++++++++++++
tests/test-random.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 149 insertions(+), 2 deletions(-)
create mode 100644 tests/test-random.c
hooks/post-receive
--
Open vSwitch
More information about the git
mailing list