2 * Copyright (C) 2011, 2013 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see
16 * <http://www.gnu.org/licenses/>.
22 #define NO_LIBVIRT /* This file intentionally does not link to libvirt */
23 #include "testutils.h"
27 int main(int argc
, char **argv
)
30 bool failConnect
= false; /* Exit -1, with no data on stdout, msg on stderr */
31 bool dieEarly
= false; /* Exit -1, with partial data on stdout, msg on stderr */
33 for (i
= 1; i
< argc
; i
++) {
34 if (STREQ(argv
[i
], "nosuchhost"))
36 else if (STREQ(argv
[i
], "crashinghost"))
41 fprintf(stderr
, "%s", "Cannot connect to host nosuchhost\n");
46 printf("%s\n", "Hello World");
47 fprintf(stderr
, "%s", "Hangup from host\n");
51 for (i
= 1; i
< argc
; i
++)
52 printf("%s%c", argv
[i
], i
== (argc
-1) ? '\n' : ' ');