Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: mikachu/badarrays (Re: Valgrind testing, ideas)



On 31 maja 2017 at 07:47:59, Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> With respect to "it doesn't work" -- in commits f4ab07b4 and b7c2ddf6
> you say you're adding typeset -C and typeset -c to control PM_CACHELEN
> and PM_CHECKLEN but looking at the diffs you only added the argument
> parsing; I can't find anywhere that PM_CACHELEN or PM_CHECKLEN are ever
> assigned to the parameter flags?
>  
> I believe I've now merged params.c ... I tried forcing both of the new
> flags on for non-special PM_ARRAY params in createparam(), and all tests
> seem to pass except those involving the $match array, which implies one
> of us did something wrong in setarrvalue() for post_assignment_length.
> I think.

I've got slightly demotivated after Mikachu said the code doesn't work, but you say you have merged this and it works?

As for my thesis on Valgrind testing, I was now running for a week the many-test-cases-in-single-test-run method, and I can now say this is a very plausible method. Valgrind messages appear, one just observes, scrolling terminal, and if a report appears, it doesn't have to be connected with distinct test case, it has its own context which is the source code and the single line pointed by Valgrind. I'm a happy Valgrind user with errors like pm->gsu.s = &stdscalar_gsu assigned instead of pm->gsu.a = &stdarray_gsu reported (interestingly this one indirectly, as memory leak). One tip maybe, I do:

if [[ 2 -nt 1 ]]; then
    colour-valgrind $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
else
    colour-valgrind --leak-check=full $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
fi

to easily switch by touch {1|2} between errors checking and leak checking. Actually have also file "3", to disable the "possibly lost" reports.

--
Sebastian Gniazdowski
psprint /at/ zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author