Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp774121ybt; Wed, 8 Jul 2020 11:17:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFRVY9f3704TQs6WhUQAEuDsxWXpWnHgLr+4nwMWW8GFuc1qSv9ugeVxZsVdf44UP5Gmz5 X-Received: by 2002:a17:906:5283:: with SMTP id c3mr50045224ejm.22.1594232266432; Wed, 08 Jul 2020 11:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594232266; cv=none; d=google.com; s=arc-20160816; b=B80AdkpvGYaSNKCHLgCz03VM6TMeH5fmna4RVerCLK6azTpqMMQFevHvuBReO9KJb/ Ei0u7W5BK7I0BtLLG36FEqZBLF2+LCrAIAlMCpTYORIy6nemdJVdwMwHrHcIYmL9r5QA OOYR3OrUtnZmkjS2yc4l4jieNvdbT53ZibtWhrYip4MxmMsBKCq5lkJ5Soaxg2Rrh8ad nmVwkP8KousWI4GsYbRDdT5ihbmTTNRCndOV6EHTC65RhPWNMPX7iRPDqSzxA12cnDlw P4iMZu56+963WkG4fdd7AXWR1/oRsZ3AXgdSyVEyeg3ttk/qO792VlHRXIcVn9Aw7AnD qIBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iAQg13RIc/6fdgwYC3LjOS6qKUgfGuA+h5I0+AO5bfM=; b=EGzDas18wrQfDU2Jkcg0uNLfhPkKo9nMnYk0Ie17Uw4sZ6gBk5ikRYXJ8aVTWRW6N9 EnuD6Q+Vdrz+QGNizGLAfp67XWtaNbobeQPMPfFhTaohVd8WNbF+MrUc15ouaZQifXi3 dX9IPToJ3zy+sEfL5zeF1d7REJOyOozLdlxr8kJ8OmcvIBu7EJvKtj+1YFv/hFS5IiyT hIhl/STh9AGNwhs1ndWrt/19bSePJCDh2ZWLbyNpnwaX4SMeouOeXf+r4AFg1AKPqMeF IZd7/senwuNbxPXraMstrcvUEMtL7F+V4z3X+A9NtV7Sbkv+XXPTW9JV+8o03G01MuhE ZesA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gedCFhC+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp6si461718ejc.472.2020.07.08.11.17.22; Wed, 08 Jul 2020 11:17:46 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gedCFhC+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgGHSQ7 (ORCPT + 99 others); Wed, 8 Jul 2020 14:16:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:49137 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726072AbgGHSQ7 (ORCPT ); Wed, 8 Jul 2020 14:16:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594232218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iAQg13RIc/6fdgwYC3LjOS6qKUgfGuA+h5I0+AO5bfM=; b=gedCFhC+dsOd8J2wsomTQOYAxWsNj4YjbxJk3lMuZrUxiodeRO3AHZ7ff1N6BAtbL7bZ+S TrEUtG52b5qxpDNzq59FIy6iF74oxhD7UlieqiNlSmIfnFYfqQc3GYAOCPfecoC2toTeQY 5yzLjoUonvCgCOMIb1Fo7ElEIrIPrxk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-307-nqZOZTZQPemOdt1FTRxOpw-1; Wed, 08 Jul 2020 14:16:54 -0400 X-MC-Unique: nqZOZTZQPemOdt1FTRxOpw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6A8F1800D42; Wed, 8 Jul 2020 18:16:52 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDD8C5BAC3; Wed, 8 Jul 2020 18:16:45 +0000 (UTC) Date: Wed, 8 Jul 2020 20:16:44 +0200 From: Jesper Dangaard Brouer To: Andrii Nakryiko Cc: bpf , Hangbin Liu , Daniel Borkmann , Alexei Starovoitov , Veronika Kabatova , Jiri Benc , Yonghong Song , Martin Lau , Networking , open list , brouer@redhat.com Subject: Re: [PATCH bpf-next V3 0/2] BPF selftests test runner 'test_progs' use proper shell exit codes Message-ID: <20200708201644.0a02602a@carbon> In-Reply-To: References: <159410590190.1093222.8436994742373578091.stgit@firesoul> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Jul 2020 00:23:48 -0700 Andrii Nakryiko wrote: > On Tue, Jul 7, 2020 at 12:12 AM Jesper Dangaard Brouer > wrote: > > > > This patchset makes it easier to use test_progs from shell scripts, by using > > proper shell exit codes. The process's exit status should be a number > > between 0 and 255 as defined in man exit(3) else it will be masked to comply. > > > > Shell exit codes used by programs should be below 127. As 127 and above are > > used for indicating signals. E.g. 139 means 11=SIGSEGV $((139 & 127))=11. > > POSIX defines in man wait(3p) signal check if WIFSIGNALED(STATUS) and > > WTERMSIG(139)=11. (Hint: cmd 'kill -l' list signals and their numbers). > > > > Using Segmentation fault as an example, as these have happened before with > > different tests (that are part of test_progs). CI people writing these > > shell-scripts could pickup these hints and report them, if that makes sense. > > > > --- > > > > Jesper Dangaard Brouer (2): > > selftests/bpf: test_progs use another shell exit on non-actions > > selftests/bpf: test_progs avoid minus shell exit codes > > > > > > tools/testing/selftests/bpf/test_progs.c | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > -- > > > > For the series: > > Acked-by: Andrii Nakryiko > > My preference was shorter EXIT_ERR_SETUP, but it doesn't matter. I can just resend the patchset, if you prefer? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer