Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp840047ybt; Wed, 8 Jul 2020 13:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyCiA5KeFpMPYKOGsxB5as/79NiwvDXjONl90pXV2StUxrQf2kYsgWj5N9aIIdljvj64NE X-Received: by 2002:a17:906:4b59:: with SMTP id j25mr47643723ejv.301.1594238641906; Wed, 08 Jul 2020 13:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594238641; cv=none; d=google.com; s=arc-20160816; b=rw8Y7rRc3P6vSqTaP0UC40dVZreKoYKjkGt7rT/t0vJ5VG1e14q1FY44w5UbV73a65 b60tFuEcfgDtlBmnC+au4DDKEMcXR/0VpgY/Vdy8SkK86+QQpW/GT0tcugy5emysGm2x tRXX4EX58ls/Dshv0N5YwyeFhVmZxM3i9UMv7ZJwRl5BkltaMhZ9ysF56ZnYCkkyfOGF SHg8IXw//1E7hRo8+LNy7Yt5T/HOUg7NXl0grSfbUZQuDbsq2tJPVOUWwKR4r5HvqZWR DSTYSfULscUNDhp6L6/au4UoCq8yeV/rvzjBfuksactFjScyvlasTSBbDwrbZszJZH55 loKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=i49nZfqplLeUNgNmhVsMpyrZjPj0G4Gmj53+u8HKe1A=; b=Diiu+Jrmb+6kBBY5fBVpdoHb3YgIcAE4ue+vKqfFzWJb4qumZiEf6eVXufgGPXASq3 hO0VjvNlDvGOoV/jU+4VCtk1FsBsLjU/QA7Ryv2pIeA/5+yUmnEbZInyIVYZq2IBW1mQ QkBGieyL7Bwvuv59rcGXfVt3YjWmgxkIlNFNRz310V/8fK/VhFJnITO0s+ilgKWyfJfZ VTJivYWH8bF1yfnhiWzC7IJZMhyJRscJ54skmP6L9QuX0aIDi5FV8f1cy39Cy73PkDwK skVnApicoTX6WcicoQ8EQPXoyp/bZvVRG+mfm2WDyvbHLMGxQBlWCf677QtVU7ECHZyj WIYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QF2yUcqD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp24si564115ejb.270.2020.07.08.13.03.36; Wed, 08 Jul 2020 13:04:01 -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=@gmail.com header.s=20161025 header.b=QF2yUcqD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbgGHUDY (ORCPT + 99 others); Wed, 8 Jul 2020 16:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgGHUDY (ORCPT ); Wed, 8 Jul 2020 16:03:24 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13188C061A0B; Wed, 8 Jul 2020 13:03:24 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id e12so35544640qtr.9; Wed, 08 Jul 2020 13:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i49nZfqplLeUNgNmhVsMpyrZjPj0G4Gmj53+u8HKe1A=; b=QF2yUcqDB8G3avHQFhDMwNJN0Q2NGjzvstW1yG9g+BJ85JiacL2VFDdh9iiJ/pa0Ti l8RSQsOjDQ9DNA5m0cz8mKZc7IheyfAQDlT3xXcPdBSdncWSwCkGtXz7TvV+7m9VuN13 eDxfVJ8yEMudMJ1Bx/hocwSSIH0Lr4pU5ebKInFxPXoYguCCaIAIfZxvvRX9963398d7 4nnxhY138F5OeNCvL5AVrJcNJJ9HSB7r6M2r+Z+u2Dhlr4srtpR+j/HabAdZdiNDdGHa x1Egp6+cPl7rR84JPyPDSZ7smFz8nqsy9VPeSdniX6ERn8TdFi7AUCAxHkYClICAR/B+ XJ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i49nZfqplLeUNgNmhVsMpyrZjPj0G4Gmj53+u8HKe1A=; b=DTUQ2dOVvPl6F3tGllFsNBoe0oCHUNuNGVD9kMlhzYJ+27Tq2aGpRocj+onUNh6Jnc dyJYyafcrxEydtQ8u1iWwCELm+azUIrwnmxGHu6j5gEdtm0e9gvVPcTGuyoKQXvJlYvZ j66NUHAh0wmzpo9PbJLoXZeTfoGracvtiZU4DetGK4BAylGoLN8cM5iKFJBiWXKwgi4k 8Dulqw1+uaclzUo4sGByOhgvdv/iEV5G5ZFmlxoM8gJ6v+RWoaAh9alLOca9ac4W4BxC zLLJLE5KTUl6bGaaTwMGm+kVH3DvD8KDi8ldtgGWO8t+LJsuQANzcNLQPM+NgaYq7v2l +khQ== X-Gm-Message-State: AOAM530CCvuARmDlAuVIjan4uNtvVmtYLf6b+92mUv84uGptry46Daio FkVLyk41DOxUclFAuxyrf3t3ov3lGJBParb/DSHTAG1o X-Received: by 2002:ac8:4714:: with SMTP id f20mr61165369qtp.141.1594238603091; Wed, 08 Jul 2020 13:03:23 -0700 (PDT) MIME-Version: 1.0 References: <159410590190.1093222.8436994742373578091.stgit@firesoul> <20200708201644.0a02602a@carbon> In-Reply-To: <20200708201644.0a02602a@carbon> From: Andrii Nakryiko Date: Wed, 8 Jul 2020 13:03:11 -0700 Message-ID: Subject: Re: [PATCH bpf-next V3 0/2] BPF selftests test runner 'test_progs' use proper shell exit codes To: Jesper Dangaard Brouer Cc: bpf , Hangbin Liu , Daniel Borkmann , Alexei Starovoitov , Veronika Kabatova , Jiri Benc , Yonghong Song , Martin Lau , Networking , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 8, 2020 at 11:16 AM Jesper Dangaard Brouer wrote: > > 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? Doesn't matter to me, you can keep it as is. > > -- > Best regards, > Jesper Dangaard Brouer > MSc.CS, Principal Kernel Engineer at Red Hat > LinkedIn: http://www.linkedin.com/in/brouer >