Hi,
On Tue, Apr 12, 2022 at 11:05:56AM +0200, Axel Beckert wrote:
> On Tue, Apr 12, 2022 at 03:30:28PM +0900, Jun T wrote:
> > diff --git a/Test/ztst.zsh b/Test/ztst.zsh
> > index 89fe69b5b..263573333 100755
> > --- a/Test/ztst.zsh
> > +++ b/Test/ztst.zsh
> > @@ -30,6 +30,7 @@ emulate -R zsh
> > [[ -n $LC_NUMERIC ]] && LC_NUMERIC=C
> > [[ -n $LC_MESSAGES ]] && LC_MESSAGES=C
> > [[ -n $LANG ]] && LANG=C
> > +export LANG
> >
> > # Don't propagate variables that are set by default in the shell.
> > typeset +x WORDCHARS
>
> Yay, this patch at least fixed the Gitlab runner builds! See
> https://salsa.debian.org/debian/zsh/-/pipelines/367955
>
> I will soon make another upload to the official build infrastructure
> on all architectures and will report back how it went.
Done now, looks good so far:
https://buildd.debian.org/status/package.php?p=zsh&suite=experimental
I though noticed one odd warning on STDERR when running the test suite
against the installed zsh-static binary in the log from
https://salsa.debian.org/debian/zsh/-/jobs/2665273:
872 **************************************
873 47 successful test scripts, 0 failures, 15 skipped
874 **************************************
875 run-testsuite-static FAIL stderr: (eval):7: permission denied: /file
^^^^^^^^^^^^^^^^^^^^^^^^
(run-testsuite-static is the script at
https://salsa.debian.org/debian/zsh/-/blob/debian/debian/tests/run-testsuite-static
— This script is meant to run the test suite against /bin/zsh-static,
i.e. to do as-installed-testing. We also skip all PCRE-related tests
as this doesn't seem to work with a really static zsh binary.)
The warning looks a lot as if in a _single_ case of e.g.
"$tst_dir/file" the variable $tst_dir is empty or undefined. And given
that "$tst_dir" only seems to appear in Test/V14system.ztst, it
probably must be in there somewhere. I can also reproduce this warning
with this command:
% zsh-static +Z -f Test/ztst.zsh Test/V14system.ztst
Test/V14system.ztst: starting.
(eval):7: permission denied: /file
Test/V14system.ztst: skipped (the zsh/system and zsh/zselect modules are not available)
And I think I found the issue:
3 %prep
4
5 if zmodload -s zsh/system && zmodload -s zsh/zselect; then
6 tst_dir=V14.tmp
7 mkdir -p -- $tst_dir
8 else
9 ZTST_unimplemented='the zsh/system and zsh/zselect modules are not available'
10 fi
11 : > $tst_dir/file # File on which to acquire flock.
So line 11 works fine of those modules are there. But if they aren't,
$tst_dir never gets set and this explains very well the odd error
message above.
The question is how to fix this properly. My suggestion would be to
move "tst_dir=V14.tmp" as well as "mkdir -p -- $tst_dir" out of the
conditional, something along these lines:
diff --git a/Test/V14system.ztst b/Test/V14system.ztst
index 100daab08..1e683b5b9 100644
--- a/Test/V14system.ztst
+++ b/Test/V14system.ztst
@@ -2,10 +2,9 @@
%prep
- if zmodload -s zsh/system && zmodload -s zsh/zselect; then
- tst_dir=V14.tmp
- mkdir -p -- $tst_dir
- else
+ tst_dir=V14.tmp
+ mkdir -p -- $tst_dir
+ if ! ( zmodload -s zsh/system && zmodload -s zsh/zselect ); then
ZTST_unimplemented='the zsh/system and zsh/zselect modules are not available'
fi
: > $tst_dir/file # File on which to acquire flock.
Kind regards, Axel
--
PGP: 2FF9CD59612616B5 /~\ Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: abe@xxxxxxxxxxxxxxx \ / Say No to HTML in E-Mail and Usenet
Mail+Jabber: abe@xxxxxxxxx X
https://axel.beckert.ch/ / \ I love long mails: https://email.is-not-s.ms/
Attachment:
signature.asc
Description: PGP signature