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 856a00b9 for ; Wed, 3 Jul 2019 23:46:36 +0000 (UTC) Received: (qmail 10795 invoked by alias); 3 Jul 2019 23:46:31 -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: 44493 Received: (qmail 8240 invoked by uid 1010); 3 Jul 2019 23:46:31 -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 1.100862 secs); 03 Jul 2019 23:46:31 -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:content-transfer-encoding; bh=GrfaMdrkPzf1AMznfoZwY4HRcQUelEm5mtjnpPm2ucA=; b=DnY2KoJW1gBGnuLOOLLkEZyaMybSiOHWtfLgMBY+89O91EsU7CsouZn4wzWeEM+swu yBeg0DNqQhP11rISb3LxcGkQyZN30NP67xs0yRdlglwRMW7raI3aQR+xDh+F46XzA3gh AOgk90hKL2s3p1Oi15yhiZj4+yP4UF5z7wXdQR8o44bkm0zpXXzxUbtXfXzMfvBqY2km L1FiOS5kAwNoGZmnPsk45H7LZnDrxaBPu8TkMwFYie947YL+aO8GqAiAoDl/kl5jKrFr HndzgQ06/OCtVgII7IeB0IEow8hmrOaEHJMyn/eG/OmIIJT74ahLJfJqOp9za5IIQ5Ct VIVg== 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=GrfaMdrkPzf1AMznfoZwY4HRcQUelEm5mtjnpPm2ucA=; b=JIp1dDFuyucwq9RAeUImvW8hIRlnQySTfE9bKgAxEZ1t+JYcDsUgxxcEL0GL30th7u /zfyw00NOUWyYNcR6cLqE4Eb5zu9J4yx35YAhaWVoBArV8q5WqcTXMO2j6BCvZhTE9Vo GrRSrcKETbEL+pWYw7MvxVLNi0uQ5heflqUDBW1Vtktb+KrDq31KRuJ/tNW1egthQ/sB Mts4PuOyV3myGkM68K2P/F2lXmNJDCZn7UMmP5qU9Lo75XTiVBl9xJ4dXQWfxkHgp77j doH07nWRNA7SozP1XoPLbsesu1K+CxoJwcjbUtKGcx0ERM9FASDcEa8xTG6IuuqwH5Oh af4w== X-Gm-Message-State: APjAAAUd7BkZ+OdGp1jsDxAbIR8Wqmap3FiSn6qiLDvcp3m3sf04pnVE HG7ywO60pKuARssOZEjpRHk6uAlTW4E/SuCAjf4= X-Google-Smtp-Source: APXvYqyhYSnDXhLk0wzyA490wlFWu0IJQpYUe35lCfmsKjHGOn1wDQXFbeEaRixNkoQNUmMUT0/d/ghLXqkoI/FsDdU= X-Received: by 2002:a05:6830:2148:: with SMTP id r8mr32145399otd.179.1562197557233; Wed, 03 Jul 2019 16:45:57 -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:45:44 +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 I've made a 20 seconds asciinema to show the new test-descriptions feature: https://asciinema.org/a/255371 On Thu, 4 Jul 2019 at 01:31, Sebastian Gniazdowski wrote: > > 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 u= p 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 wr= ote: > > > > > > 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 def= initely > > 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 > > > > -- > 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