From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 417ff523 for ; Wed, 3 Jul 2019 23:30:48 +0000 (UTC) Received: (qmail 13271 invoked by alias); 3 Jul 2019 23:30:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44491 Received: (qmail 22755 invoked by uid 1010); 3 Jul 2019 23:30:40 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f65.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25496. spamassassin: 3.4.2. Clear:RC:0(209.85.210.65):SA:0(-2.0/5.0):. Processed in 3.675395 secs); 03 Jul 2019 23:30:40 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.210.65 as permitted sender) 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=ndVY+lmQ8dX3CnTMYe083keMzwRxCTJyCHcKGohyxqo=; b=EqEy4OMY8EhposfwRnenrQAxZlxpRUxQAlyk/KVf5vChfJUCFlH4esSX7DhrOMnvjO aind+okX6zzcsg2c01E9HyhGNxvFImlWhEg/F4HFQsVNPg109s9VPh9CU2V+uZmNT3H3 mXJVJpoOXPBcVXzRR+bKle9AzzKN1mgWevr5Ag6acYpk8k5nzKniiHwwMN9iGxHZZWlN S8bLiKDoHXC5UDkQ4qAdTnoSACGoxIQl34t7d9z8oP7YXRDZQ/2yv+SsCp5PSRB636Bs 5uuVtC+EuwiUmr2QtF1gsigfZ6dL2lFnxlFI7Pcw9P4vxy/7uxD/SjSIvwQgI4vmWhIB zOKQ== 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=ndVY+lmQ8dX3CnTMYe083keMzwRxCTJyCHcKGohyxqo=; b=UaFJ8a2a3yOaZvj9EbR/7jJaYkKsjFqtTOKcflWP184RYizmwAudqV4msxSucFJrRc xr8+yX8ULdRzenL79ZqIRZj0NHtZSxdKLmyVUy2W7sRQqVHl97/0ubTBvvj+iIwFy6fM NFH0LJqV92A/pdbaqQDmHj0pLDozQbRJwr/t+0LhziJZTqP71o9bUjGeokW3Z5bJVtTi Zgl2IKO52n8tZ4xx0Lf+DICvxHCrjwP/oec5ZQvuUQnwoJYS8JirSHQGYORQPZnLY8Ft qt1IQyR9mDQROjrtoyyTkw1cKRBUTAPAkmYM+wnmiaK3PO7/CRk4PY4/M44/DzZtwSIW OuNw== X-Gm-Message-State: APjAAAWrwmSuHxagV0OLTl3k4rkrDik7kg9McctbAISqDZ9QsKa2279N /zHQqr/n/13sBOPsTS4I3ib20Pj/2F7WLAL1tyE= X-Google-Smtp-Source: APXvYqwgYVA6F8w//FhuKaAmVEEkaGZrzmksQ2MDIS3CtosNpGde69b8lbAxAZbxDjBrFO0STsbOTh9P2Je4nbmzKZs= X-Received: by 2002:a9d:7c83:: with SMTP id q3mr32024694otn.273.1562196602986; Wed, 03 Jul 2019 16:30:02 -0700 (PDT) MIME-Version: 1.0 References: <1537195773.3258650.1510860136.6AA9F0BA@webmail.messagingengine.com> <1537286139.1154549.1512322472.101174D6@webmail.messagingengine.com> In-Reply-To: <1537286139.1154549.1512322472.101174D6@webmail.messagingengine.com> From: Sebastian Gniazdowski Date: Thu, 4 Jul 2019 01:29:51 +0200 Message-ID: Subject: Re: Valgrind tests (was: Re: Zsh: [7] + 23074 suspended (tty output)) To: Daniel Shahaf Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Tue, 18 Sep 2018 at 17:55, Daniel Shahaf wrote: > > Sebastian Gniazdowski wrote on Tue, 18 Sep 2018 07:21 +0200: > > On Mon, 17 Sep 2018 at 16:50, Daniel Shahaf wrote: > > > > > Can you describe what changes would be involved? Would the test > > > suite remain as portable as it should be? What's needed is currently only this +-2 patch. It makes passing VALGRIND=1 to the tests' make run the tests through VATS/valgrind. It creates a conditional variable VLGRND which has a value of "v" in such case, making the tests go throguh vruntests.zsh and not runtests.zsh: @@ -35,6 +35,7 @@ VPATH = @srcdir@ sdir = @srcdir@ sdir_top = @top_srcdir@ INSTALL = @INSTALL@ +VLGRND = $(VALGRIND:1=v) @DEFS_MK@ @@ -49,7 +50,7 @@ check test: do echo $$f; done`" \ ZTST_srcdir="$(sdir)" \ ZTST_exe=$(dir_top)/Src/zsh@EXEEXT@ \ - $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/runtests.zsh; then \ + $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/$(VLGRND)runtests.zsh; then \ stat=0; \ else \ stat=1; \ > > The readme of this project is unnecessarily very long, the thing is > > very simple, I need some time to approach this again with original > > Test/ in mind. > > For avoidance of doubt, I am simply asking for information on the > proposal. I am not yet sold on it. I hope the valgrind tests will be added. I've spend 2 days on carefully building the errors database on OS X. I think that on Linux there will be no such problem, as it seems that it's OS X that embraces the fact that freed memory is actually never returned to the OS (so it apparently does allocations here and there, without any code to release the memory). The tests apparently reveal one memory leak currently: ==52847== 79 (24 direct, 55 indirect) bytes in 1 blocks are definitely lost in loss record 349 of 550 ==52847== at 0x10017B545: malloc (vg_replace_malloc.c:302) ==52847== by 0x10004899E: zalloc (mem.c:966) ==52847== by 0x10004316D: znewlinklist (linklist.c:120) ==52847== by 0x10003989D: addfilelist (jobs.c:1297) ==52847== by 0x100017AC0: getoutputfile (exec.c:4796) ==52847== by 0x100078474: stringsubst (subst.c:254) ==52847== by 0x100077E46: prefork (subst.c:142) ==52847== by 0x10001A24F: execfuncdef (exec.c:2567) ==52847== by 0x10001DC23: execcmd_exec (exec.c:3896) ==52847== by 0x10001AAF6: execpline2 (exec.c:1927) ==52847== by 0x100015938: execpline (exec.c:1658) ==52847== by 0x1000150E2: execlist (exec.c:1413) The full procedure to add the valgrind tests to Zsh is: 1. Apply the patch 2. Add files: vruntests.zsh, vtest.conf, zsh-valgrind-parse.cmd to the Test subdirectory After this running make VALGRIND=1 inside the Test subdirectory will run the valgrind tests. The files and additional information are available at: https://github.com/zdharma/VATS-zsh -- Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org