Files
apfstests/tests/generic
Dave Chinner 7aaf557970 common/xfs: Initialise OPTIND for getopts calls
According to the bash man page:

	OPTIND is initialized to 1 each time the shell or a shell
	script is invoked.

This doesn't appear to be true - in tests scripts with no other
getopts calls, I'm seeing the getopts loop in _xfs_check to fail to
parse input parameters correctly. Tracing shows the parameters are
being passed to _xfs_check correctly, but on occassion getopts
simply doesn't see them.

Hence when running tests with both external log and real time
devices, tests are failing at random because xfs_check is
mis-parsing the parameters passed to it and not configuring the
external log correctly:

_check_xfs_filesystem: filesystem on /dev/sdg is inconsistent (c)
*** xfs_check output ***
aborting - no external log specified for FS with an external log
*** end xfs_check output

Fix this by ensuring OPTIND is correctly initialised before using
getopts. Do it for all places that call getopts that don't already
set OPTIND=1 before starting their parsing loop.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2018-02-23 13:11:53 +08:00
..
2016-11-14 10:37:49 +08:00
2015-12-21 18:01:47 +11:00
2014-04-11 10:18:20 +10:00
2014-04-14 10:35:27 +10:00
2014-04-14 11:19:23 +10:00
2014-04-14 10:37:32 +10:00
2014-04-28 10:55:12 +10:00
2015-03-18 14:57:49 +11:00
2014-05-27 12:07:17 +10:00
2014-06-18 09:31:38 +10:00
2014-09-29 12:58:24 +10:00
2014-09-29 13:26:32 +10:00
2014-10-14 17:40:34 +11:00
2014-10-14 17:40:34 +11:00
2016-02-19 10:49:17 +11:00
2016-05-09 10:54:48 +10:00
2015-01-21 15:58:23 +11:00
2015-02-25 15:32:47 +11:00
2015-02-25 15:33:19 +11:00
2015-03-18 14:58:51 +11:00
2016-02-19 10:40:56 +11:00
2015-04-02 09:41:15 +11:00
2015-10-14 14:08:42 +11:00
2017-07-24 12:34:52 +08:00
2017-07-24 12:34:52 +08:00
2016-01-11 14:43:40 +11:00
2017-07-24 12:13:35 +08:00
2017-07-24 12:13:35 +08:00
2016-11-14 10:37:49 +08:00
2017-07-24 12:17:42 +08:00
2017-07-24 12:17:42 +08:00
2017-07-24 12:23:39 +08:00
2017-07-24 12:23:39 +08:00
2017-08-03 20:44:04 +08:00
2016-02-19 10:49:17 +11:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-09-23 12:52:32 +10:00
2015-09-21 13:06:18 +10:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-29 10:17:56 +11:00
2013-12-03 10:29:26 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2013-12-03 10:29:26 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-02-19 10:45:04 +11:00
2016-05-09 16:03:27 +10:00
2017-10-12 11:05:49 +08:00
2016-02-19 10:45:04 +11:00
2015-12-21 18:13:37 +11:00
2016-02-19 10:45:04 +11:00
2015-12-21 18:13:37 +11:00
2016-02-19 10:45:04 +11:00
2015-12-21 18:13:37 +11:00
2016-02-19 10:45:04 +11:00
2015-12-21 18:13:37 +11:00
2016-06-15 15:35:57 +08:00
2016-06-15 15:35:57 +08:00
2016-02-19 10:49:17 +11:00
2014-09-29 13:07:26 +10:00
2016-11-14 10:37:49 +08:00
2016-05-09 16:03:27 +10:00
2016-02-19 10:49:17 +11:00
2016-12-24 18:12:10 +08:00
2016-02-08 09:27:14 +11:00
2016-11-14 10:37:49 +08:00
2018-02-22 13:59:06 +08:00
2014-12-16 10:53:57 +11:00
2014-12-16 10:53:57 +11:00
2018-02-22 13:59:06 +08:00
2016-02-12 09:39:05 -08:00
2017-08-03 20:44:04 +08:00
2016-01-11 14:43:40 +11:00
2016-02-19 10:49:17 +11:00
2016-04-05 11:46:12 +10:00
2016-06-28 11:30:49 +08:00
2016-02-19 10:45:04 +11:00
2018-02-03 00:33:51 +08:00
2016-02-19 10:49:17 +11:00
2014-01-20 12:47:56 +11:00
2014-12-12 11:26:15 +11:00
2016-02-19 10:49:17 +11:00
2014-08-13 11:19:33 +10:00
2016-02-12 09:39:05 -08:00
2016-02-12 09:39:05 -08:00
2016-02-12 09:39:05 -08:00
2016-02-12 09:39:05 -08:00
2016-02-12 09:39:05 -08:00
2016-03-23 17:39:11 +11:00
2016-03-23 17:39:11 +11:00
2016-03-23 17:39:11 +11:00
2016-03-23 17:39:11 +11:00
2017-08-03 20:44:04 +08:00
2017-08-03 20:44:04 +08:00
2017-08-03 20:44:04 +08:00
2017-08-03 20:44:04 +08:00
2016-05-09 10:55:24 +10:00
2016-05-09 16:03:29 +10:00
2016-05-09 16:03:29 +10:00
2016-05-09 16:03:29 +10:00
2016-05-09 16:03:29 +10:00
2016-05-09 16:03:29 +10:00
2016-05-09 16:03:29 +10:00
2017-08-03 20:44:04 +08:00
2016-06-15 15:44:49 +08:00
2016-06-15 15:44:49 +08:00
2017-03-13 11:58:56 +08:00
2016-06-15 16:35:20 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-07-01 11:17:08 +08:00
2016-08-26 15:45:00 +08:00
2017-01-27 16:06:12 +08:00
2017-01-27 16:06:12 +08:00
2017-01-27 16:06:12 +08:00
2016-09-24 00:39:13 +08:00
2016-12-24 16:47:12 +08:00
2017-01-27 16:06:12 +08:00
2016-12-24 20:21:55 +08:00
2017-08-03 20:44:04 +08:00
2017-02-15 17:55:41 +08:00
2017-02-15 17:55:57 +08:00
2017-03-02 12:26:17 +08:00
2017-03-02 12:26:17 +08:00
2017-04-11 12:34:24 +08:00
2017-04-11 12:34:24 +08:00
2017-05-12 21:13:19 +08:00
2017-05-12 21:13:19 +08:00
2017-05-12 21:13:19 +08:00
2017-05-17 20:21:59 +08:00
2017-08-15 14:37:59 +08:00
2017-08-15 14:37:59 +08:00
2017-09-09 18:15:53 +08:00
2017-09-09 18:15:53 +08:00
2017-11-26 15:38:55 +08:00
2017-09-09 18:15:53 +08:00
2017-09-09 18:15:53 +08:00
2017-09-09 18:15:53 +08:00
2017-11-26 15:38:55 +08:00
2017-09-09 18:15:53 +08:00
2017-09-30 00:53:30 +08:00
2017-09-30 00:53:30 +08:00
2017-12-10 17:46:05 +08:00
2017-12-14 12:39:57 +08:00
2017-12-14 12:39:57 +08:00
2017-12-14 12:39:57 +08:00
2017-12-14 12:39:57 +08:00
2017-12-14 12:39:57 +08:00
2017-12-24 21:30:58 +08:00
2017-12-24 21:30:58 +08:00
2018-02-16 01:28:32 +08:00
2018-02-16 01:28:32 +08:00
2018-02-16 01:28:32 +08:00