From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id 6A7BD385801D for ; Fri, 2 Apr 2021 13:29:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6A7BD385801D Received: by mail-qk1-x732.google.com with SMTP id z10so5208455qkz.13 for ; Fri, 02 Apr 2021 06:29:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DiqxScEp3w4x/vAb3/iG7Age+5NX8L66ADfpyLUu3hA=; b=sAd2GewwPZznMIbKi0eN4OUTLBT7XOJsCfIgE1tANVF1iuHR0MmVm9H2xlAI0hTJBf 5+xCZk7Qo72aA1t4S2APUXXFIB4iVd03Dctg1HgDZCYJTVleMMKgdXcDgV2RpGJw/psz dpN7MVHlxooRQKa4BHk10gi+xsiNcSyVh+nA0gBNooTCVIB+3DcXvaAu3gJuEJuvDBYl D7av+y4lXojFKgnMQGQlzafxy9XlcVkxR+Fe18kHnqrAn0ZM/tyJY8+WpSZHva2qo3iD 8RCVBt8zRBFO15s/SXxDBSKXl0kKhJiKA7a1XH9eVwp647726JgynM4gG+ii1ZaWJZoi GCSg== X-Gm-Message-State: AOAM533SXXHUgcMPDY2UmQ+Uye+xdQNgn/s1BdPTW++4Mt8QztULwKOA Pxh54wleYZXDz4vo10We0kw0vg== X-Google-Smtp-Source: ABdhPJy7zrM5YCr7iei7P3TQ1p1czRxSwzHDcmsTEDOLCOb7BHJV1BkIhTKc85yfOWuz7ZxXezzsIA== X-Received: by 2002:a05:620a:f95:: with SMTP id b21mr13224232qkn.251.1617370154974; Fri, 02 Apr 2021 06:29:14 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id r35sm6782817qtd.95.2021.04.02.06.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Apr 2021 06:29:14 -0700 (PDT) Subject: Re: [PATCH] Linux: Add execveat system call wrapper To: alexandra.khirnova@gmail.com Cc: libc-alpha@sourceware.org, =?UTF-8?Q?Alexandra_H=c3=a1jkov=c3=a1?= References: <20200428122019.26826-1-ahajkova@redhat.com> <20210324135402.2685623-1-ahajkova@redhat.com> From: Adhemerval Zanella Message-ID: <2a703011-e99b-05c5-8f9a-15d639940da9@linaro.org> Date: Fri, 2 Apr 2021 10:29:12 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 13:29:17 -0000 On 02/04/2021 09:13, Alexandra Hájková wrote: > Thank you for the review. > >>> + if (WIFEXITED (status)) >>> + { >>> + if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) >>> + FAIL_UNSUPPORTED ("execveat is unimplemented"); >>> + else if (expected_fail != 0) > Isn't comparing WEXITSTATUS (status) with 0 sufficient? It just to handle possible return code due signaling or other possible value, similar to what support/support_capture_subprocess_check.c does. >>> + TEST_COMPARE (WEXITSTATUS (status), 0); >>> + else >>> + TEST_COMPARE (WEXITSTATUS (status), 3); >>> + } >> >> Also log a failure for !WIFEXITED (status).