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 1f5538db for ; Wed, 3 Jul 2019 23:32:27 +0000 (UTC) Received: (qmail 5590 invoked by alias); 3 Jul 2019 23:32:22 -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: 44492 Received: (qmail 9342 invoked by uid 1010); 3 Jul 2019 23:32:22 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f194.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.167.194):SA:0(-2.0/5.0):. Processed in 1.333401 secs); 03 Jul 2019 23:32:22 -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.167.194 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:content-transfer-encoding; bh=An5HMkFScnZ+4qzicSnyvg7r9lMZWMuPIVf1tlajy00=; b=rVlRARjf9aAeOEO8htKl+2fytCZx4yStE+CCypUzAp3/ohkTc5LzOxw/N+ERN4+apO Xnmp60ma4WbUGNv2N8zPQIfV8W4t/KGBIbC25hvQhaJ3VXRuP69r3qfRGlmJOZnWJ44o kYoaCSryB0f+LsK+VNzuDDhpfBduPsl2G/VdJP4/AbKc+K2jKJjT+dbfFsM5QFrJL3VD R8k8xBPI1vdCLenQ1SjDkYv/SSAXW2lNbifHVFcBUiZ/AxFoo/8PVu8mUjIJm+BBg2Q0 FeiqfejZwF2qCd2CsACoiPkJ3A1zp2YElcwMqwVy87UsqGEmFzOsstz2CWlAiPGcDNk7 m0YA== 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:content-transfer-encoding; bh=An5HMkFScnZ+4qzicSnyvg7r9lMZWMuPIVf1tlajy00=; b=XhDcKaBKnNG+x407M/C9zcEkQLIU/SBJ2FtxmIh4xsVgOLVGdQ1/fBv+0T9W+AL6gD 9CeBZFFC8IeghgcPxyxSb/3Uo4CZxHT/SwVO4cUYxk3NF6P8jM5lsp/mvypHnL22rJ1C P+HiaxYe/GR8cN9+Hc99LHaAbEA+epyfgaznYqNdYmjvziPjOfNJGxAQSZpPkYv0fltL vXYWwN3SpqbNuRmJ9bo8IVxvqTP1cMFEpGIYCLmKXhWyTTfg0cIFT3d3RX39PgmSLNFO DvOz2/IvcFJqYp+vIKmkNsbdmycvBUxZz9CaRLoI0pqBdsqd+JUZ+E9AC1Q/0VjXnrzI AdQQ== X-Gm-Message-State: APjAAAVPmUCj5FZ25uCIneidlIm6BJaggr04JAqcpqe1F0fVmDVHnarQ /2hf4URXPgwX7K3if5VCgTS1bOjsDa16pgaDy0Y= X-Google-Smtp-Source: APXvYqxRKOr7iAUH08HTnaFbIYSKhzI8JkhDMVdnjLjipfXP+GkgmcqbfQFNiDNnbPmojDDImRSeMBhk9i4/08VFaoE= X-Received: by 2002:aca:1a0e:: with SMTP id a14mr112336oia.51.1562196707367; Wed, 03 Jul 2019 16:31:47 -0700 (PDT) MIME-Version: 1.0 References: <1537195773.3258650.1510860136.6AA9F0BA@webmail.messagingengine.com> <1537286139.1154549.1512322472.101174D6@webmail.messagingengine.com> In-Reply-To: From: Sebastian Gniazdowski Date: Thu, 4 Jul 2019 01:31:35 +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" Content-Transfer-Encoding: quoted-printable Ah, also: using the ztst.zsh from the repo will cause the descriptions of all tests to be printed before executing =E2=80=93 to allow matching up = the valgrind reports against concrete Zsh code. The change to the file is very simple: diff --git a/Test/ztst.zsh b/Test/ztst.zsh index d835e0edb..d20893f53 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -402,6 +402,7 @@ $ZTST_curline" ZTST_xstatus=3D$match[1] ZTST_flags=3D$match[2] ZTST_message=3D${match[3]:+${match[3][2,-1]}} + [[ $VLGRND_TEST_DESC =3D 1 ]] && print -- "VATS-test-desc: $ZTST_message" else ZTST_testfailed "expecting test status at: On Thu, 4 Jul 2019 at 01:29, Sebastian Gniazdowski wrote: > > On Tue, 18 Sep 2018 at 17:55, Daniel Shahaf wrot= e: > > > > 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=3D1 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 =3D @srcdir@ > sdir =3D @srcdir@ > sdir_top =3D @top_srcdir@ > INSTALL =3D @INSTALL@ > +VLGRND =3D $(VALGRIND:1=3Dv) > > @DEFS_MK@ > > @@ -49,7 +50,7 @@ check test: > do echo $$f; done`" \ > ZTST_srcdir=3D"$(sdir)" \ > ZTST_exe=3D$(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=3D0; \ > else \ > stat=3D1; \ > > > > 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: > > =3D=3D52847=3D=3D 79 (24 direct, 55 indirect) bytes in 1 blocks are defin= itely > lost in loss record 349 of 550 > =3D=3D52847=3D=3D at 0x10017B545: malloc (vg_replace_malloc.c:302) > =3D=3D52847=3D=3D by 0x10004899E: zalloc (mem.c:966) > =3D=3D52847=3D=3D by 0x10004316D: znewlinklist (linklist.c:120) > =3D=3D52847=3D=3D by 0x10003989D: addfilelist (jobs.c:1297) > =3D=3D52847=3D=3D by 0x100017AC0: getoutputfile (exec.c:4796) > =3D=3D52847=3D=3D by 0x100078474: stringsubst (subst.c:254) > =3D=3D52847=3D=3D by 0x100077E46: prefork (subst.c:142) > =3D=3D52847=3D=3D by 0x10001A24F: execfuncdef (exec.c:2567) > =3D=3D52847=3D=3D by 0x10001DC23: execcmd_exec (exec.c:3896) > =3D=3D52847=3D=3D by 0x10001AAF6: execpline2 (exec.c:1927) > =3D=3D52847=3D=3D by 0x100015938: execpline (exec.c:1658) > =3D=3D52847=3D=3D 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=3D1 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 --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org