From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7097264153945964544 X-Received: by 2002:a63:d10a:0:b0:3c6:c6e0:9b1e with SMTP id k10-20020a63d10a000000b003c6c6e09b1emr25857221pgg.410.1653421820262; Tue, 24 May 2022 12:50:20 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a63:86c6:0:b0:3f5:d3ea:bfc2 with SMTP id x189-20020a6386c6000000b003f5d3eabfc2ls6379813pgd.0.gmail; Tue, 24 May 2022 12:50:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwJEr/3cxJx2puDy4a0l4iGWfR+8ThzwzCKJHfzmzlLqGG7I45gr/+v32WKYrh42/bmd5g X-Received: by 2002:a05:6a00:2148:b0:4fa:92f2:bae3 with SMTP id o8-20020a056a00214800b004fa92f2bae3mr30173483pfk.69.1653421819454; Tue, 24 May 2022 12:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653421819; cv=none; d=google.com; s=arc-20160816; b=t4xBUdGsD/DEG2pvhG9ARDmuO707Bo970T1dibuBPuwzn7J0HILYEldpKoFXRv0HpZ sEcsJ49jN+zcFHMP4hZY4CSWdJMz86G6YNCSCGguZCYex44PijYZWXkMKTdi/QYU0Q8w VlapshABfqJjIbOvib+QbBiFZWzCcVKyWlwJuNNaByMKmG12+DmT2e68+EKC5ZPnwEsl 066TBSnUXPmE5imUj/tgmq43AraRNet/zjfx2yjs6/ONjpQejiCKG81Vrzw4o5fLXBaf JMOMcKgwzYhntdWxGIQdzNA0lTxPkA8KEJTiNGY6UHVyxpCWeUW2VXApLZP7s555zSo1 mBFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id; bh=keKP9nQPxvrP2MqliWG2RdVQfcjEZobVPItLw0GtbrI=; b=G/+26OzwKVl3VbUEaRt5y5x+qIjk1t70KgWTqn+wXde7pUHLkxW/hpPAdSnsOJhG3X uC/I7aLzT8B7xhUtbyjx+4OEJQywaywjYvc7vLuhaOsfxGdrC153X90gTTyfqifSPrGz cg7PPKEtL4uuN2TnDdIWSFAcXDAceaSM31b0FEoHmJcCQ+uvKuq1w6xG6nbGyDyiQQJx 1gAPKKmRJMAEQz3ThA++Ib21cM67N/QF1ynDaLoMUJRQtWN/uo+RMEamSoHFx7iNjAzn g9zHqjc3Y3c5UPSuZmxSOI7R00A91fNuwcrT+biCxzH8O02M/Sj229vfkMs3CvCYLCvm hcgg== 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 k1-20020a170902d58100b0015a1cc64912si394057plh.3.2022.05.24.12.50.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 May 2022 12:50:19 -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 24OJoFZp031164 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 21:50:16 +0200 Message-ID: Date: Tue, 24 May 2022 22:50:10 +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 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> From: Anton Mikanovich In-Reply-To: <8dfafe2e-de10-458b-82b2-591983d8bb8c@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: /DzJN48aKrPp 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 >