From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] shell: Extend timeout tests, to run on multiple shells
Date: Wed, 19 May 2021 14:57:51 +0200 [thread overview]
Message-ID: <YKULT1tIBFIR+U70@pevik> (raw)
In-Reply-To: <2f8e652b-aaa8-5f98-4f9d-5b7c138c17fa@jv-coder.de>
> HI Cyril,
> On 5/19/2021 12:28 PM, Cyril Hrubis wrote:
> > Hi!
> > > There are some differences especially in signal handling
> > > between the shells, so execute the tests on as many
> > > shells as possible.
> > I'm not sure that we want to support anything but bash, dash and
> > busybox and even these three are enough trouble.
> > One of my friends once told me that it's easier to write a portable
> > shell than portable shell code and it looks like he was right...
> In general I would say: YES
> But if at some point in the future there are features used, that really only
> work for one shell,
> we can still reduce the tested shells for this script.
> Btw: ksh is not really support, it complains about all local variables,
> because it only allows them in "function <name>"-style functions.
> But the timeout code still works even there.
Although I generally agree that scrips should be portable to some extent
(it's already hard trying to keep it POSIX), it should be for shells which are
used on Linux distros as a default shell (/bin/sh). That's why besides the
default bash on most of distros we also care about dash (Debian/Ubuntu by
default) and busybox sh implementation (embedded distros and Alpine).
I'm not aware of any distro using ksh, csh or zsh as a default.
Trying to remember when I met ksh as a default, I guess it was on some old
Solaris, more than decade ago :).
We state this in shell shoding style chapter [1]. Maybe I should have added it
into Supported kernel ... page [2], but not many people run shell tests anyway.
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines#132-shell-coding-style
[2] https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
> J?rg
next prev parent reply other threads:[~2021-05-19 12:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 6:31 [LTP] [PATCH 1/2] shell: Fix timeout process termination for zsh Joerg Vehlow
2021-05-19 6:31 ` [LTP] [PATCH 2/2] shell: Extend timeout tests, to run on multiple shells Joerg Vehlow
2021-05-19 10:28 ` Cyril Hrubis
2021-05-19 11:03 ` Joerg Vehlow
2021-05-19 12:57 ` Petr Vorel [this message]
2021-06-21 7:25 ` Petr Vorel
2021-06-21 8:01 ` Joerg Vehlow
2021-06-21 8:19 ` Petr Vorel
2021-05-19 10:18 ` [LTP] [PATCH 1/2] shell: Fix timeout process termination for zsh Li Wang
2021-05-19 10:26 ` Joerg Vehlow
2021-05-19 10:29 ` Li Wang
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=YKULT1tIBFIR+U70@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.