From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 5DA9E1A017D for ; Tue, 1 Dec 2015 19:12:36 +1100 (AEDT) Received: from localhost by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Dec 2015 18:12:35 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id B3ABE357804F for ; Tue, 1 Dec 2015 19:12:33 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB18CIGB25231362 for ; Tue, 1 Dec 2015 19:12:26 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tB18C1xk007737 for ; Tue, 1 Dec 2015 19:12:01 +1100 Message-ID: <565D563F.3010709@linux.vnet.ibm.com> Date: Tue, 01 Dec 2015 13:41:43 +0530 From: Anshuman Khandual MIME-Version: 1.0 To: Rashmica Gupta , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 2/3] selftests/powerpc: Add test for forking inside transaction References: <1448946504-11653-1-git-send-email-rashmicy@gmail.com> <1448946504-11653-3-git-send-email-rashmicy@gmail.com> In-Reply-To: <1448946504-11653-3-git-send-email-rashmicy@gmail.com> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 12/01/2015 10:38 AM, Rashmica Gupta wrote: > +int test_fork(void) > +{ > + SKIP_IF(!have_htm()); > + > + asm __volatile__( > + "tbegin.;" > + "blt 1f; " > + "li 0, 2;" /* fork syscall */ > + "sc ;" > + "tend.;" > + "1: ;" > + : : : "memory", "r0"); > + /* If we reach here, we've passed. Otherwise we've probably crashed > + * the kernel */ The transaction inside the parent process will abort. What is expected inside the child process ? Why should the kernel crash ?