]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix shlibloadtest to properly execute the dso_ref test
authorMatt Caswell <matt@openssl.org>
Thu, 15 Nov 2018 14:50:52 +0000 (14:50 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 4 Jan 2019 20:20:52 +0000 (20:20 +0000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7983)

test/shlibloadtest.c

index 53714aa12591602272f6715bc13964b7440389d3..5e4e4ca8db0f0a4097b153665ee45a6eaf73dc2c 100644 (file)
@@ -117,6 +117,7 @@ static int test_lib(void)
 
     switch (test_type) {
     case JUST_CRYPTO:
+    case DSO_REFTEST:
         if (!TEST_true(shlib_load(path_crypto, &cryptolib)))
             goto end;
         break;
@@ -130,10 +131,6 @@ static int test_lib(void)
                 || !TEST_true(shlib_load(path_crypto, &cryptolib)))
             goto end;
         break;
-    case DSO_REFTEST:
-        if (!TEST_true(shlib_load(path_crypto, &cryptolib)))
-            goto end;
-        break;
     }
 
     if (test_type != JUST_CRYPTO && test_type != DSO_REFTEST) {
@@ -205,6 +202,7 @@ static int test_lib(void)
 
     switch (test_type) {
     case JUST_CRYPTO:
+    case DSO_REFTEST:
         if (!TEST_true(shlib_close(cryptolib)))
             goto end;
         break;
@@ -218,10 +216,6 @@ static int test_lib(void)
                 || !TEST_true(shlib_close(cryptolib)))
             goto end;
         break;
-    case DSO_REFTEST:
-        if (!TEST_true(shlib_close(cryptolib)))
-            goto end;
-        break;
     }
 
     result = 1;
@@ -242,7 +236,7 @@ int setup_tests(void)
     } else if (strcmp(p, "-just_crypto") == 0) {
         test_type = JUST_CRYPTO;
     } else if (strcmp(p, "-dso_ref") == 0) {
-        test_type = JUST_CRYPTO;
+        test_type = DSO_REFTEST;
     } else {
         TEST_error("Unrecognised argument");
         return 0;