All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 0/4] checkbashisms.pl in make check + fixed docs
Date: Thu, 2 Sep 2021 13:50:54 +0200	[thread overview]
Message-ID: <YTC6nujBQURztwei@pevik> (raw)
In-Reply-To: <20210902103740.19446-1-pvorel@suse.cz>

Hi All,

> checkbashisms.pl has problem with type. Although it's in POSIX [1] even
> in old one from 2004 [2] and it's supported by all common shells (i.e.
> bash, zsh, dash, busybox sh, mksh; even in ksh; maybe just csh does not
> support it) checkbashisms.pl complains about it:

> $ make check-tst_test.sh
> CHECK testcases/lib/tst_test.sh
> possible bashism in tst_test.sh line 33 (type):
> 		if type $TST_CLEANUP >/dev/null 2>/dev/null; then
> possible bashism in tst_test.sh line 694 (type):
> 		if type $TST_SETUP >/dev/null 2>/dev/null; then
> possible bashism in tst_test.sh line 726 (type):
> 		if type ${TST_TESTFUNC}1 > /dev/null 2>&1; then
> make: [../../include/mk/rules.mk:58: check-tst_test.sh] Error 1 (ignored)


> Should I report it to Debian (the upstream)? Or at least ask for way to
> suppress the warning?

type is part of POSIX, but as part of the X/Open Systems Interfaces option
(XSI). The checkbashisms man page explicitly says:

	Note that the definition of a bashism in this context roughly equates to "a
	shell feature that is not required to be supported by POSIX"; this means that
	some issues flagged may be permitted under optional sections of POSIX, such as
	XSI or User Portability.

=> type is flagged because it is an optional feature.

I just send a patch which disabled it from source code.

Kind regards,
Petr

  parent reply	other threads:[~2021-09-02 11:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 10:37 [LTP] [PATCH 0/4] checkbashisms.pl in make check + fixed docs Petr Vorel
2021-09-02 10:37 ` [LTP] [PATCH 1/4] doc: Mention make check Petr Vorel
2021-09-02 13:17   ` Cyril Hrubis
2021-09-02 15:46     ` Petr Vorel
2021-09-02 10:37 ` [LTP] [PATCH 2/4] Vendor checkbashisms.pl version 2.20.5 Petr Vorel
2021-09-02 13:25   ` Cyril Hrubis
2021-09-02 10:37 ` [LTP] [PATCH 3/4] rules.mk: Add checkbashisms to 'make check' for *.sh Petr Vorel
2021-09-02 13:27   ` Cyril Hrubis
2021-09-02 15:51     ` Petr Vorel
2021-09-02 10:37 ` [LTP] [PATCH 4/4] doc: Update for vendored checkbashisms.pl Petr Vorel
2021-09-02 13:29   ` Cyril Hrubis
2021-09-09 10:55     ` Petr Vorel
2021-09-09 10:55       ` Petr Vorel
2021-09-02 11:50 ` Petr Vorel [this message]
2021-09-02 14:01 ` [LTP] [PATCH 0/4] checkbashisms.pl in make check + fixed docs Joerg Vehlow
2021-09-02 15:09   ` Petr Vorel
2021-09-03  4:28     ` Joerg Vehlow
2021-09-03  7:43       ` Petr Vorel
2021-09-03  8:10         ` Joerg Vehlow
2021-09-03  8:53           ` Petr Vorel
2021-09-02 15:14   ` Petr Vorel

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=YTC6nujBQURztwei@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.