]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-random-util.c
random-util: remove RDRAND usage
[thirdparty/systemd.git] / src / test / test-random-util.c
index 3426d606f4184ab94d9095e12a850b7d7c0c75e1..8cd457d57da848c9dc2041c3d37bb44232bcd58f 100644 (file)
@@ -26,7 +26,6 @@ static void test_genuine_random_bytes_one(RandomFlags flags) {
 TEST(genuine_random_bytes) {
         test_genuine_random_bytes_one(0);
         test_genuine_random_bytes_one(RANDOM_BLOCK);
-        test_genuine_random_bytes_one(RANDOM_ALLOW_RDRAND);
 }
 
 TEST(pseudo_random_bytes) {
@@ -41,22 +40,6 @@ TEST(pseudo_random_bytes) {
         }
 }
 
-TEST(rdrand) {
-        int r;
-
-        for (unsigned i = 0; i < 10; i++) {
-                unsigned long x = 0;
-
-                r = rdrand(&x);
-                if (r < 0) {
-                        log_error_errno(r, "RDRAND failed: %m");
-                        return;
-                }
-
-                printf("%lx\n", x);
-        }
-}
-
 #define TOTAL 100000
 
 static void test_random_u64_range_one(unsigned mod) {