Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1328087pxk; Thu, 10 Sep 2020 12:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVHww3ktktKvVEIX1Dl72n6pnIF6HJiMW3lnU0+0KE05bxWyXljiZSZA0JyrdU4q5WsVul X-Received: by 2002:a17:906:1c4f:: with SMTP id l15mr10312080ejg.419.1599766630193; Thu, 10 Sep 2020 12:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599766630; cv=none; d=google.com; s=arc-20160816; b=fMGZFW4DrMkC+0oXtJi7vmix0qXxyPjEhoyZS1b7/f639gPp5WSf+taxkFgSZUqdCL /rqnPhwUwUW+4YQM2S8nvb2hEN8WFgfN+C7fsN76v7PNH8zih9moegrcXmI6HyiLp3Kr Z29hPAGzKhHw7QJrrOGP7OdDPtDWJiBZoIWL1MbDLuIFgoQvsYS8BuHueH+lR7pcly6B 4OExZgj8aTQDEvRfUrXE73zaMEQ8rJP2wSMSAsKS7lZZIlHwwV2yMgNUTlanJ/j2yBxg U/LwlhL7YEBNglZxypI9atYNBp2HAJBjaiZ0CWSDI3YiT54Z+SwkFmpH1jaXHnfsEFj7 TDOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vOjWH4VWtvbl3aoed+KOZnGqSqHT0ot5nHDzjvh2WcU=; b=HZqgrorGUybqTSkj3XpqWZklK1UKn0OoCzcYlLuo9LSrkTveUyoJx4C1B6DDlb9FD9 UzWzsnbU51DVa9ZYyr/CDFk/hQ3ae+s7kTsxsAE1ELHGwLYullo93IplNy/6MsJS7YMN ifq5pdl+CBIJkWD5nIN5ttWp7qIKgA+Wt7qwEhMsZec3iG7kCfM6Ed6HxK44NFCipEig lCpLMSc7uFc2GLhTCjIg6Hi1yTte1VEY84TnBbkjQxI08JPpPdup50HCnSEATwgADA4t oI6GpWCx4QbwoE3m5HmYWz0YaWazGozag8uFI+9NsTm0Z+L3poo3c8jLBdshne4qe0QV 6FfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si4288484edf.578.2020.09.10.12.36.47; Thu, 10 Sep 2020 12:37:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728041AbgIJTfK (ORCPT + 99 others); Thu, 10 Sep 2020 15:35:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:35968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731398AbgIJPnn (ORCPT ); Thu, 10 Sep 2020 11:43:43 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 06CFEACC8; Thu, 10 Sep 2020 15:24:33 +0000 (UTC) Date: Thu, 10 Sep 2020 17:24:47 +0200 From: Cyril Hrubis To: Martin Doucha Cc: ltp@lists.linux.it, Alexandre Chartre , Peter Zijlstra , linux-kernel@vger.kernel.org, lkp@lists.01.org, Andy Lutomirski , Thomas Gleixner Subject: Re: [LTP] [PATCH v2] syscall/ptrace08: Simplify the test. Message-ID: <20200910152447.GA10844@yuki.lan> References: <20200904140931.10153-1-chrubis@suse.cz> <5d127ee5-56d1-01c5-c364-dcb004204e9d@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d127ee5-56d1-01c5-c364-dcb004204e9d@suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > looks good and the test passes on older fixed kernels. Just one > compatibility issue below. I've fixed that and also the kernel version when the behavior had changed and pushed, thanks for the review and testing. ... > > + if (TST_RET != -1) { > > + tst_res(TFAIL, "ptrace() breakpoint with kernel addr succeeded"); > > + } else { > > + if (TST_ERR == EINVAL) { > > + tst_res(TPASS | TTERRNO, > > + "ptrace() breakpoint with kernel addr failed"); > > + } else { > > + tst_res(TFAIL | TTERRNO, > > + "ptrace() breakpoint on kernel addr should return EINVAL, got"); > > + } > > + } > > + > > + unsigned long addr; > > AFAICT, we're not compiling with --std=c99 so older compilers may > complain about the variable declaration here. The default std for gcc has been at least gnu90 for ages, which includes subset of c99 features as well including this one. So unless you explicitly pass --std=c90 or older it will work just fine. I've moved the declaration to the top of the function nevertheless. -- Cyril Hrubis chrubis@suse.cz