2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * Build up a valid list.suspect event for a fictional diagnosis 2N/A * using a diagnosis code from our test dictionary so we can format 2N/A /* system authority */ 2N/A /* component system authority */ 2N/A * Add a contrived nvlist array to our list.suspect so that we can 2N/A * exercise the expansion syntax for dereferencing nvlist array members 2N/A * Now initialize the libfmd_msg library for testing, using the message 2N/A * catalogs found in the proto area of the current workspace. 2N/A * Test 0: Verify that both fmd_msg_getitem_id and fmd_msg_gettext_id 2N/A * return NULL and EINVAL for an illegal message code, and NULL 2N/A * and ENOENT for a valid but not defined message code. 2N/A * Test 1: Use fmd_msg_getitem_id to retrieve the item strings for 2N/A * a known message code without having any actual event handle. 2N/A "for %s, item %d: %s\n",
2N/A * Test 2: Use fmd_msg_gettext_id to retrieve the complete message for 2N/A * a known message code without having any actual event handle. 2N/A * Test 3: Use fmd_msg_getitem_nv to retrieve the item strings for 2N/A "for %s, item %d: %s\n",
2N/A * Test 4: Use fmd_msg_getitem_nv to retrieve the complete message for 2N/A * a known message code using our list.suspect event handle. 2N/A * Test 5: Use fmd_msg_getitem_nv to retrieve the complete message for 2N/A * a known message code using our list.suspect event handle, but this 2N/A * time set the URL to our own customized URL. Our contrived message 2N/A * has been designed to exercise the key aspects of the variable 2N/A pid =
fork();
/* fork into background to not bother make(1) */