/* © Copyright IBM Corporation 2022 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include #include #include #include #include "log.h" // Headers for multi-threaded tests #include // Start a test and log the function name #define test_start() printf("=== RUN: %s\n", __func__) // Indicate test has passed #define test_pass() printf("--- PASS: %s\n", __func__) // The length of strings used in the tests #define STR_LEN 5 // Indicate test has failed void test_fail(const char *test_name) { printf("--- FAIL: %s\n", test_name); exit(1); } // Print a fixed-width string in hexadecimal void print_hex(char fw_string[STR_LEN]) { printf("["); for (int i=0; i