From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754054AbdLDONX convert rfc822-to-8bit (ORCPT ); Mon, 4 Dec 2017 09:13:23 -0500 Received: from smtp-out6.electric.net ([192.162.217.184]:57252 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbdLDONW (ORCPT ); Mon, 4 Dec 2017 09:13:22 -0500 From: David Laight To: "'paulmck@linux.vnet.ibm.com'" CC: "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "jiangshanlai@gmail.com" , "dipankar@in.ibm.com" , "akpm@linux-foundation.org" , "mathieu.desnoyers@efficios.com" , "josh@joshtriplett.org" , "tglx@linutronix.de" , "peterz@infradead.org" , "rostedt@goodmis.org" , "dhowells@redhat.com" , "edumazet@google.com" , "fweisbec@gmail.com" , "oleg@redhat.com" Subject: RE: [PATCH tip/core/rcu 02/20] torture: Prepare scripting for shift from %p to %pK Thread-Topic: [PATCH tip/core/rcu 02/20] torture: Prepare scripting for shift from %p to %pK Thread-Index: AQHTauFIdA2Ed9boEE637tyyC9UkoKMzIc+ggAATw4CAAAg9EA== Date: Mon, 4 Dec 2017 14:13:38 +0000 Message-ID: References: <20171201200819.GA25519@linux.vnet.ibm.com> <1512158945-27269-2-git-send-email-paulmck@linux.vnet.ibm.com> <20171204134203.GR7829@linux.vnet.ibm.com> In-Reply-To: <20171204134203.GR7829@linux.vnet.ibm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul E. McKenney > Sent: 04 December 2017 13:42 > On Mon, Dec 04, 2017 at 12:32:30PM +0000, David Laight wrote: > > From: Paul E. McKenney > > > Sent: 01 December 2017 20:09 > > > > > > Because %p prints "(null)" and %pK prints "0000000000000000" or (on > > > 32-bit systems) "00000000", this commit adjusts torture-test scripting > > > accordingly. > > > > Surely NULL v not-NULL is one bit of info that the message needs to contain? > > Indeed. So the script needs to check for the strings "00000000", > "0000000000000000", and "(null) in the console output". The "(null)" > is what "%p" prints for a NULL pointer, and the other two strings are > what "%pK" prints for a NULL pointer. > > Or am I missing your point? I was thinking that even %pK should print "(null)". Perhaps it should have printed a fixed, non-zero value for non-zero pointers. David