X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=test-tool%2Ftest-tool.c;h=a49a459354d3c58ce46adbf8f1e98040363fee1b;hp=92ad0a0541a2c6b3f12d1b86af625d104ecd16b8;hb=HEAD;hpb=deb95471fbd229605d9916ff90b2ff7cf92633eb diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c index 92ad0a0..a49a459 100644 --- a/test-tool/test-tool.c +++ b/test-tool/test-tool.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -64,7 +64,7 @@ #define P_tmpdir "/tmp" #endif -#define DEFAULT_TIMEOUT 120 +#define DEFAULT_TIMEOUT 600 static int timeout = DEFAULT_TIMEOUT; static char tmpf[] = P_tmpdir "/libguestfs-test-tool-sda-XXXXXX"; @@ -111,6 +111,7 @@ main (int argc, char *argv[]) int option_index; int i; struct guestfs_version *vers; + char *p; for (;;) { c = getopt_long (argc, argv, options, long_options, &option_index); @@ -162,6 +163,10 @@ main (int argc, char *argv[]) for (i = 0; environ[i] != NULL; ++i) if (STREQLEN (environ[i], "LIBGUESTFS_", 11)) printf ("%s\n", environ[i]); + for (i = 0; environ[i] != NULL; ++i) + if (STREQLEN (environ[i], "FEBOOTSTRAP_", 12)) + printf ("%s\n", environ[i]); + printf ("TMPDIR=%s\n", getenv ("TMPDIR") ? : "(not set)"); /* Create the handle and configure it. */ g = guestfs_create (); @@ -190,8 +195,9 @@ main (int argc, char *argv[]) guestfs_free_version (vers); printf ("guestfs_get_append: %s\n", guestfs_get_append (g) ? : "(null)"); - printf ("guestfs_get_attach_method: %s\n", - guestfs_get_attach_method (g) ? : "(null)"); + p = guestfs_get_attach_method (g); + printf ("guestfs_get_attach_method: %s\n", p ? : "(null)"); + free (p); printf ("guestfs_get_autosync: %d\n", guestfs_get_autosync (g)); printf ("guestfs_get_direct: %d\n", guestfs_get_direct (g)); printf ("guestfs_get_memsize: %d\n", guestfs_get_memsize (g)); @@ -199,9 +205,9 @@ main (int argc, char *argv[]) printf ("guestfs_get_path: %s\n", guestfs_get_path (g)); printf ("guestfs_get_pgroup: %d\n", guestfs_get_pgroup (g)); printf ("guestfs_get_qemu: %s\n", guestfs_get_qemu (g)); - printf ("guestfs_get_recovery_proc: %d\n", - guestfs_get_recovery_proc (g)); + printf ("guestfs_get_recovery_proc: %d\n", guestfs_get_recovery_proc (g)); printf ("guestfs_get_selinux: %d\n", guestfs_get_selinux (g)); + printf ("guestfs_get_smp: %d\n", guestfs_get_smp (g)); printf ("guestfs_get_trace: %d\n", guestfs_get_trace (g)); printf ("guestfs_get_verbose: %d\n", guestfs_get_verbose (g)); @@ -250,6 +256,9 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } + /* Close the handle. */ + guestfs_close (g); + /* Booted and performed some simple operations -- success! */ printf ("===== TEST FINISHED OK =====\n"); exit (EXIT_SUCCESS);