Silence gcc false positive warning on alpn_protos_len in test/handshake_helper.c
[openssl.git] / test / x509_dup_cert_test.c
index 6f766b9d6eb8b74a2d24168bd20160a85b7a8cdf..af35afbe0c984b38e8daed005fc4a226ef3930db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright (c) 2017, Oracle and/or its affiliates.  All rights reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
@@ -33,15 +33,21 @@ static int test_509_dup_cert(int n)
     return ret;
 }
 
+OPT_TEST_DECLARE_USAGE("cert.pem...\n")
+
 int setup_tests(void)
 {
-    size_t n = test_get_argument_count();
+    size_t n;
 
-    if (!TEST_int_gt(n, 0)) {
-        TEST_note("usage: x509_dup_cert_test cert.pem...");
+    if (!test_skip_common_options()) {
+        TEST_error("Error parsing test options\n");
         return 0;
     }
 
+    n = test_get_argument_count();
+    if (!TEST_int_gt(n, 0))
+        return 0;
+
     ADD_ALL_TESTS(test_509_dup_cert, n);
     return 1;
 }