All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common: handle old versions of modprobe which don't support --help
@ 2022-02-01 23:19 Theodore Ts'o
  2022-02-02  2:47 ` Luis Chamberlain
  2022-02-02 13:48 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Theodore Ts'o @ 2022-02-01 23:19 UTC (permalink / raw)
  To: fstests; +Cc: Theodore Ts'o, Leah Rumancik, Luis Chamberlain

There exists versions of modprobe out there which are so old that
modprobe --help isn't a thing.  They're certainly not going to support
modprobe --remove-patiently, so test to make sure modprobe --help
works to suppress a spurious warning.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fixes: 405c21d40aa1 ("common/module: add patient module rmmod support")
Reported-by: Leah Rumancik <leah.rumancik@gmail.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
---
 common/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/config b/common/config
index be741c6b..cac528e8 100644
--- a/common/config
+++ b/common/config
@@ -256,7 +256,7 @@ export UDEV_SETTLE_PROG
 # Set MODPROBE_PATIENT_RM_TIMEOUT_SECONDS to "forever" if you want the patient
 # modprobe removal to run forever trying to remove a module.
 MODPROBE_REMOVE_PATIENT=""
-modprobe --help | grep -q -1 "remove-patiently"
+modprobe --help >& /dev/null && modprobe --help | grep -q -1 "remove-patiently"
 if [[ $? -ne 0 ]]; then
 	if [[ -z "$MODPROBE_PATIENT_RM_TIMEOUT_SECONDS" ]]; then
 		# We will open code our own implementation of patient module
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] common: handle old versions of modprobe which don't support --help
  2022-02-01 23:19 [PATCH] common: handle old versions of modprobe which don't support --help Theodore Ts'o
@ 2022-02-02  2:47 ` Luis Chamberlain
  2022-02-02 13:48 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2022-02-02  2:47 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, Leah Rumancik

On Tue, Feb 01, 2022 at 06:19:36PM -0500, Theodore Ts'o wrote:
> There exists versions of modprobe out there which are so old that
> modprobe --help isn't a thing.  They're certainly not going to support
> modprobe --remove-patiently, so test to make sure modprobe --help
> works to suppress a spurious warning.

Wow.

> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Fixes: 405c21d40aa1 ("common/module: add patient module rmmod support")
> Reported-by: Leah Rumancik <leah.rumancik@gmail.com>
> Cc: Luis Chamberlain <mcgrof@kernel.org>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] common: handle old versions of modprobe which don't support --help
  2022-02-01 23:19 [PATCH] common: handle old versions of modprobe which don't support --help Theodore Ts'o
  2022-02-02  2:47 ` Luis Chamberlain
@ 2022-02-02 13:48 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2022-02-02 13:48 UTC (permalink / raw)
  To: fstests; +Cc: Leah Rumancik, Luis Chamberlain

On Tue, Feb 01, 2022 at 06:19:36PM -0500, Theodore Ts'o wrote:
> There exists versions of modprobe out there which are so old that
> modprobe --help isn't a thing.  They're certainly not going to support
> modprobe --remove-patiently, so test to make sure modprobe --help
> works to suppress a spurious warning.

I was going to reword the last part of the commit message, but forgot
to do it before sending out the message.

- works to suppress a spurious warning.
+ works to avoid causing all tests to fail due to the error message
+ to stderr showing up in $seq.out.

	     	    	       	  - Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-02 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 23:19 [PATCH] common: handle old versions of modprobe which don't support --help Theodore Ts'o
2022-02-02  2:47 ` Luis Chamberlain
2022-02-02 13:48 ` Theodore Ts'o

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.