From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934242AbdKGNbL (ORCPT ); Tue, 7 Nov 2017 08:31:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51230 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754514AbdKGNbJ (ORCPT ); Tue, 7 Nov 2017 08:31:09 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D72F2267C3 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Date: Tue, 7 Nov 2017 07:31:08 -0600 From: Josh Poimboeuf To: Ingo Molnar Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] objtool: Move sync check to a script Message-ID: <20171107133108.ddwhwpa7b4bfrvmr@treble> References: <20171107094621.kfpykhbncikmeyms@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171107094621.kfpykhbncikmeyms@gmail.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 07 Nov 2017 13:31:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 10:46:21AM +0100, Ingo Molnar wrote: > Hm, this doesn't actually warn - it outputs the diff: > > triton:~/tip/tools/objtool> ./sync-check.sh > triton:~/tip/tools/objtool> 99a100,109 > > /* Identifiers for segment registers */ > > #define INAT_SEG_REG_IGNORE 0 > > #define INAT_SEG_REG_DEFAULT 1 > > #define INAT_SEG_REG_CS 2 > > #define INAT_SEG_REG_SS 3 > > #define INAT_SEG_REG_DS 4 > > #define INAT_SEG_REG_ES 5 > > #define INAT_SEG_REG_FS 6 > > #define INAT_SEG_REG_GS 7 > > > > I fixed it to do: > > diff $file ../../$file > /dev/null || > > (note the removal of '&') > > Then it outputs the right thing: > > triton:~/tip/tools/objtool> ./sync-check.sh > Warning: synced file at 'tools/objtool/arch/x86/include/asm/inat.h' differs from latest kernel version at 'arch/x86/include/asm/inat.h' Ah. I guess '&>' is a bash-ism, shorthand for redirecting both stdout and stderr. It worked for me with bash 4.4.12. I guess you used a different default shell? -- Josh