From: Sebastian Gniazdowski <psprint@zdharma.org>
To: zsh-workers@zsh.org
Subject: Valgrind testing, ideas
Date: Fri, 26 May 2017 07:04:24 +0200 [thread overview]
Message-ID: <etPan.5927b758.12200854.1a9@MacMini.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]
Hello
The arrlen branch seems to faint. I had this idea of employing valgrind, to get certain about code in the branch. Currently I do this for myself, for my module, as follows:
diff --git a/module/ValTest/runtests.zsh b/module/ValTest/runtests.zsh
integer success failure skipped retval
for file in "${(f)ZTST_testlist}"; do
- $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
+ if (( ${+commands[colour-valgrind]} )); then
+ colour-valgrind --leak-check=full $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
+ else
+ valgrind --leak-check=full $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
+ fi
retval=$?
Found 4 errors, instantly. The coloring may seem ridiculous, but the attached screenshot shows it is serious thing. It's like viewing data from XML, the data is logically divided, no need to parse with eyes.
The python module colour-valgrind should be rewritten to Zsh. With extended-glob, I see no problems with this, although it's a piece of work.
Next is the most important thing: known errors should be removed from output. Like the error from screenshot: array holding database-tied parameters should be left for OS to collect. Has anyone ideas of definition of an error, that could be used to remove blocks from valgrind output?
Also I get multiple PIDs from valgrind. I now know that single Zsh instance is used for whole test file. So the multiple PIDs are weird, not sure from where they come from.
Last thing, there should be much more test files. Single test per-file, I think.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
[-- Attachment #2: colovalg.png --]
[-- Type: image/png, Size: 217618 bytes --]
next reply other threads:[~2017-05-26 5:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 5:04 Sebastian Gniazdowski [this message]
2017-05-26 5:50 ` Bart Schaefer
2017-05-26 7:57 ` Sebastian Gniazdowski
2017-05-26 10:56 ` Daniel Shahaf
2017-05-26 23:48 ` Bart Schaefer
2017-05-28 19:43 ` mikachu/badarrays (Re: Valgrind testing, ideas) Bart Schaefer
2017-05-29 13:21 ` Mikael Magnusson
2017-05-31 5:47 ` Bart Schaefer
2017-06-01 16:31 ` Sebastian Gniazdowski
2017-06-01 20:35 ` Bart Schaefer
2017-06-02 1:40 ` Sebastian Gniazdowski
2017-06-02 22:00 ` Bart Schaefer
2017-06-04 0:49 ` Bart Schaefer
2017-06-04 7:08 ` Sebastian Gniazdowski
2017-06-01 21:22 ` Mikael Magnusson
2017-06-01 21:38 ` Bart Schaefer
2017-06-07 10:53 ` PM_ flags (Re: mikachu/badarrays ...) Oliver Kiddle
2017-06-07 18:15 ` Mikael Magnusson
2017-06-07 22:18 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=etPan.5927b758.12200854.1a9@MacMini.local \
--to=psprint@zdharma.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).