From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7097264153945964544 X-Received: by 2002:a65:52cd:0:b0:3f5:f3fb:6780 with SMTP id z13-20020a6552cd000000b003f5f3fb6780mr28027576pgp.150.1653456647676; Tue, 24 May 2022 22:30:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:99d:b0:518:8516:7ab6 with SMTP id u29-20020a056a00099d00b0051885167ab6ls5272585pfg.0.gmail; Tue, 24 May 2022 22:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnm1K5PDZT6F6P+t7QqrdCy7Mergg3aMIJ9v1ficFBYqFQtM7IW/Btgr7IoKQkxf7+udjY X-Received: by 2002:a63:64c5:0:b0:3fa:321e:610b with SMTP id y188-20020a6364c5000000b003fa321e610bmr12901409pgb.208.1653456646703; Tue, 24 May 2022 22:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653456646; cv=none; d=google.com; s=arc-20160816; b=fsSs/aBvE4ij7lvV693SnHwbsC/jXOTstHN16T3c9+aOG6dtljcUpV/+/s3uEatFwo R59u8sjxnkFcIxFJKbP187m4yc+yxA6x3ml7IKjkweZUKX0sz4qk8Epsw1kQo46iYfbd 3QboygY4ELQjw9Sk6TY0dwMcPtfZVYF+c7fz+2zwHc3k/jh9DnBRZK0z5Q59/qPT+Ph6 soyyNc7/WBMSWElHOYeZHQemo3d9KLi7Hxy0YZ75GMakTkD81jszUfUpQdS1vc/v5lv9 5WKckmkNNtPoQ6cGTkwWxjV8j861tFE0V6/E8jFzBfi3l6D59N+3JT0Oz6RR6lUHYoe9 M0ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id; bh=1krq556a1TjSX29ZAiOR/5XUcz58voQS02vzZ7jeuQg=; b=H9oSMSSZJU8+eKEy26i+oab0lsRL4JuSsDmBBuC2BZ3JMp+jkE+2DOB1GoUZ6BFHrN 6LsESVmoBkVYYRAfNJlOddLdNkii/NHPYemRd2kRuKrd3JDS8y9Uha2l3s/w16oi17A2 lPUV+Xkltvqpy0VRW1nguE9SOM/9rFReuOxQgOeGbw2hM/iWPijJ30KujbSDu64fKdEm bMm7ONVxz/VqzRBJfjFKo0IEmhR6oJ1KK9f7I8XyIYVSrDNSyMgY/0WpYMUDhPn7sbKF 4X5ciRCkC7pGJByFPwUSXE/NDV+l3iYo/kYsN8Cz75lhN1Su9w7nwDilTNm7bF9KJkKi DukQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id mh4-20020a17090b4ac400b001df69691b34si164701pjb.0.2022.05.24.22.30.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 May 2022 22:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 24P5UgVv000340 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 07:30:43 +0200 Message-ID: Date: Wed, 25 May 2022 08:30:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Error logging broken with next? Content-Language: en-US From: Anton Mikanovich To: Jan Kiszka , isar-users Cc: Baurzhan Ismagulov References: <75340600-5180-2f78-86f8-d5dc0c757a35@siemens.com> <3ddcda7f-41ba-5e25-3ec8-959a5ff356cc@ilbers.de> <46894ccf-242c-68fa-1553-b99a5670c160@siemens.com> <5bb4f88d-0285-4407-6bad-04e6b6e3703f@ilbers.de> <2be1421c-b534-c5c7-cf5e-1510cc3c81a5@siemens.com> <76ed79b1-4397-4329-4332-7fa1c45fe56b@siemens.com> <29defe79-8b13-9b5a-10b5-3e24bda9c7d3@ilbers.de> <34c4d2c5-2968-1f23-c89f-2d8ff8778bae@siemens.com> <13d962c5-bb1e-fb46-277f-4c6ff8fdeb3e@ilbers.de> <8dfafe2e-de10-458b-82b2-591983d8bb8c@siemens.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: GB6I3zNjfx2b 24.05.2022 22:50, Anton Mikanovich wrote: > 24.05.2022 19:36, Jan Kiszka wrote: >> I'm afraid we are talking past each other. This is what I retried again: >> $ . oe-init-build-env build >> >> recipe.bb: >> LICENSE = "" >> >> test_fun() { >>      echo "FAIL!" >>      false >> } >> >> python do_test() { >>      bb.build.exec_func("test_fun", d) >> } >> addtask test >> >> conf/local.conf: >> ... >> >> BBFILES += "recipe.bb" >> >> >> $ bitbake -c test recipe >> ... >> NOTE: No setscene tasks >> NOTE: Executing Tasks >> ERROR: recipe-1.0-r0 do_test: >> ExecutionError('/poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/run.test_fun.260', >> 1, None, None) >> ERROR: Logfile of failure stored in: >> /poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/log.do_test.260 >> Log data follows: >> | DEBUG: Executing python function do_test >> | DEBUG: Executing shell function test_fun >> | FAIL! >> | WARNING: exit code 1 from a shell command. >> | DEBUG: Python function do_test finished >> ERROR: Task (recipe.bb:do_test) failed with exit code '1' >> NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be >> rerun and 1 failed. >> >> Summary: 1 task failed: >>    recipe.bb:do_test >> Summary: There was 1 ERROR message, returning a non-zero exit code. >> >> All fine for me. >> >> Is this what you saw as well? > Hmm... no. > What Yocto/Bitbake version did you use? > I'm using Yocto 3.4 based on Bitbake 1.52.0 as the most similar to the > version we use in Isar (1.50.5). > And in Yocto 3.4 there is no log for that example. >> Now with Isar, using isar-init-build-env instead: >> ... >> NOTE: No setscene tasks >> NOTE: Executing Tasks >> ERROR: recipe-1.0-r0 do_test: Error executing a python function in >> exec_python_func() autogenerated: >> >> The stack trace of python calls that resulted in this >> exception/failure was: >> File: 'exec_python_func() autogenerated', lineno: 2, function: >>       0001: >>   *** 0002:do_test(d) >>       0003: >> File: 'recipe.bb', lineno: 9, function: do_test >>    File "recipe.bb", line 9, in do_test >>      bb.build.exec_func("test_fun", d) >> >> File: '/isar/bitbake/lib/bb/build.py', lineno: 256, function: exec_func >>       0252:    with bb.utils.fileslocked(lockfiles): >>       0253:        if ispython: >>       0254:            exec_func_python(func, d, runfile, cwd=adir) >>       0255:        else: >>   *** 0256:            exec_func_shell(func, d, runfile, cwd=adir) >>       0257: >>       0258:    try: >>       0259:        curcwd = os.getcwd() >>       0260:    except: >> File: '/isar/bitbake/lib/bb/build.py', lineno: 507, function: >> exec_func_shell >>       0503:    with open(fifopath, 'r+b', buffering=0) as fifo: >>       0504:        try: >>       0505:            bb.debug(2, "Executing shell function %s" % func) >>       0506:            with open(os.devnull, 'r+') as stdin, logfile: >>   *** 0507:                bb.process.run(cmd, shell=False, >> stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)]) >>       0508:        except bb.process.ExecutionError as exe: >>       0509:            # Find the backtrace that the shell trap >> generated >>       0510:            backtrace_marker_regex = re.compile(r"WARNING: >> Backtrace \(BB generated script\)") >>       0511:            stdout_lines = (exe.stdout or "").split("\n") >> File: '/isar/bitbake/lib/bb/process.py', lineno: 186, function: run >>       0182: >>       0183:    if pipe.returncode != 0: >>       0184:        if log: >>       0185:            # Don't duplicate the output in the exception >> if logging it >>   *** 0186:            raise ExecutionError(cmd, pipe.returncode, >> None, None) >>       0187:        raise ExecutionError(cmd, pipe.returncode, stdout, >> stderr) >>       0188:    return stdout, stderr >> Exception: bb.process.ExecutionError: Execution of >> '/isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/run.test_fun.1487' >> failed with exit code 1 >> >> ERROR: Logfile of failure stored in: >> /isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/log.do_test.1487 >> ERROR: Task (recipe.bb:do_test) failed with exit code '1' >> NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be >> rerun and 1 failed. >> >> Summary: 1 task failed: >>    recipe.bb:do_test >> Summary: There was 1 ERROR message shown, returning a non-zero exit >> code. >> >> >> This is NOT what we want to have. And this is an Isar bug at this level. >> >> Jan >> > Ok, it looks like I've found it. Did you use Yocto/Bitbake which already include this commit? https://github.com/openembedded/bitbake/commit/23a6f11b089b14382c21d431edf34fa7224c66bf Tried to apply on Isar's Bitbake and it works like it should be (error log is printed). So we just need to update BItbake version to at least 1.52.3