tstFork.cpp revision ad27e1d5e48ca41245120c331cc88b50464813ce
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * IPRT Testcase - fork() issues.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2009 Oracle Corporation
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * available from http://www.virtualbox.org. This file is free software;
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * you can redistribute it and/or modify it under the terms of the GNU
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * General Public License (GPL) as published by the Free Software
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * The contents of this file may alternatively be used under the terms
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * of the Common Development and Distribution License Version 1.0
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * VirtualBox OSE distribution, in which case the provisions of the
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * CDDL are applicable instead of those of the GPL.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * You may elect to license modified versions of this file under the
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * terms and conditions of either the GPL or the CDDL or both.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync/*******************************************************************************
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync* Header Files *
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync*******************************************************************************/
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * Init the runtime and stuff.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Skipped\n");
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync * Get values that are supposed to or change across the fork.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * Check that the values has changed.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync RTTestFailed(hTest, "%RTproc == %RTproc [child]", ProcBefore, RTProcSelf());
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * Check that the values didn't change.
99add19170a36a25b07ccd30aa5fec1eb0f2a201vboxsync * Wait for the child.
8f2f51347c7b5fe7c697debe7c2e46b46dd16489vboxsync RTTestFailed(hTest, "fork() failed: %d - %s", errno, strerror(errno));