Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Valgrind tests (was: Re: Zsh: [7] + 23074 suspended (tty output))
- X-seq: zsh-workers 44492
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Valgrind tests (was: Re: Zsh: [7] + 23074 suspended (tty output))
- Date: Thu, 4 Jul 2019 01:31:35 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <CAKc7PVDFnYkS4sX+==ivpyegO4t5TUh_752u6-x-bPV+bg1SPA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <ef42fe7f-4ecf-4dbc-cdb0-2d6e4cf27377@xk2c.de> <CAKc7PVAsJXv=jxcbrENM4LtcBkz86mbVe3WgCYBs6cwdEO=9hQ@mail.gmail.com> <1537195773.3258650.1510860136.6AA9F0BA@webmail.messagingengine.com> <CAKc7PVD0aoqenFzNeo-3HitqAtxi27-t=EcNQwc4=t57SYs0Hg@mail.gmail.com> <1537286139.1154549.1512322472.101174D6@webmail.messagingengine.com> <CAKc7PVDFnYkS4sX+==ivpyegO4t5TUh_752u6-x-bPV+bg1SPA@mail.gmail.com>
Ah, also: using the ztst.zsh from the repo will cause the descriptions
of all tests to be printed before executing – 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=$match[1]
ZTST_flags=$match[2]
ZTST_message=${match[3]:+${match[3][2,-1]}}
+ [[ $VLGRND_TEST_DESC = 1 ]] && print -- "VATS-test-desc:
$ZTST_message"
else
ZTST_testfailed "expecting test status at:
On Thu, 4 Jul 2019 at 01:29, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> On Tue, 18 Sep 2018 at 17:55, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Sebastian Gniazdowski wrote on Tue, 18 Sep 2018 07:21 +0200:
> > > On Mon, 17 Sep 2018 at 16:50, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author