Commit Graph

455 Commits

Author SHA1 Message Date
Bart Van Assche c4cc4bdcbc scstadmin: Avoid dereferencing variables that have the value undef
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-18 00:38:50 +00:00
Bart Van Assche 27d90a3563 scstadmin: Improve the consistency of test 07
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-18 00:34:48 +00:00
Bart Van Assche 4f762acebd scstadmin: Set remote targets and remote rel_tgt_ids in test 07
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-18 00:34:03 +00:00
Bart Van Assche f2b4c0d256 scstadmin: Restrict a source code line to 80 columns
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 22:08:58 +00:00
Bart Van Assche 2da0ddd47d scstadmin: Avoid passing 'undef' to chomp()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 22:07:35 +00:00
Bart Van Assche 477c49a7a6 scstadmin: Fix regression test 07
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 22:05:12 +00:00
Bart Van Assche d5c1e5ba79 scstadmin: Use defined() instead of !... eq '' to check whether arguments have been specified
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 19:33:44 +00:00
Bart Van Assche b75421e3ef scstadmin: Add a test for the messages printed for invalid args
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 19:29:46 +00:00
Bart Van Assche b347e79a40 scstadmin: Fix an ALUA command line option error message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7942 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-17 19:26:50 +00:00
Bart Van Assche 0c676b034d scstadmin: Avoid shadowing the errorString declaration, part 5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 19:19:48 +00:00
Bart Van Assche 0f2dae492f scstadmin: Rearrange addVirtualTarget()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7940 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 19:11:27 +00:00
Bart Van Assche 7d9212affb scstadmin: Avoid shadowing the errorString declaration, part 4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 19:08:50 +00:00
Bart Van Assche 2b238a6abb scstadmin: Avoid shadowing the errorString declaration, part 3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 19:03:39 +00:00
Bart Van Assche 6b566f8adf scstadmin: Avoid shadowing the errorString declaration, part 2
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7937 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 18:59:50 +00:00
Bart Van Assche 2a84df8445 scstadmin: Avoid shadowing the errorString declaration
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7936 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 18:44:33 +00:00
Bart Van Assche b56d94a153 scstadmin: Make it easier to debug regression test 06
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7935 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 18:32:42 +00:00
Bart Van Assche 27893e7e58 scstadmin: Avoid shadowed declarations in test 03
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7934 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 18:31:19 +00:00
Bart Van Assche 1d85efa936 scstadmin: Improve handling of write-only ALUA attributes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7933 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 17:47:12 +00:00
Bart Van Assche 64b7f7057d scstadmin: Add tests for the scstadmin -list_* options
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7932 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 17:40:56 +00:00
Bart Van Assche 52f9a2b285 scstadmin: Improve test script robustness
Check the return value of most system() calls. Use gawk instead of awk
when using GNU extensions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7931 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 17:37:12 +00:00
Bart Van Assche b2119c2133 scstadmin: Sort output of -list_* options alphabetically
Making the output of these options predictable is necessary because
a later patch will add regression tests for the -list_* options.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7930 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 17:15:45 +00:00
Bart Van Assche a645fe5294 scstadmin: Enable Perl warnings in tests scripts
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7929 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-16 17:13:50 +00:00
Bart Van Assche 3dcace8794 Remove trailing whitespace from multiple files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 18:26:51 +00:00
Bart Van Assche 1587638134 Remove support for "make enable_proc" and "make disable_proc"
Since RHEL 5 and kernel versions before 2.6.26 rely on procfs support,
this patch removes support for RHEL 5.x and also for kernel versions
before 2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-22 22:13:40 +00:00
Bart Van Assche 7c0540c556 Merge r7814:7819 from the 3.3.x branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7820 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-19 04:25:36 +00:00
Bart Van Assche a009f41028 scstadmin.spec: Add /usr/bin/killall to the requirements list
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 23:52:32 +00:00
Bart Van Assche 69fde133e9 Revert r7524
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:25:52 +00:00
Bart Van Assche 91b99af914 scst, srpt, iscsi-scst, qla2x00t, fcst: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7524 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:24:20 +00:00
Bart Van Assche 73dca5af22 Remove trailing whitespace from documentation files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:57:13 +00:00
Bart Van Assche 5f1fd232ae scst*.spec: Set default attributes for directories
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7376 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-04 19:35:13 +00:00
Bart Van Assche 2d9858d894 scstadmin: Remove 'use Test'
Since scstadmin doesn't use the Perl module 'Test', remove 'use Test'.
See also trunk r6736.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-04 19:34:55 +00:00
Bart Van Assche 51e4ded159 scst.spec, scstadmin.spec: Add support for Fedora
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7374 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-04 19:34:18 +00:00
Bart Van Assche 8f22880dee scstadmin: Slightly change the output format of exported LUNs
An example:

# scstadmin -noprompt -handler vdisk_fileio -close_dev diskf0
Collecting current configuration: done.


-> Making requested changes.
Device 'diskf0' is currently in use by the following:

        Driver     Target                  Group Lun 
        ---------- ----------------------- ----- ----
        iscsi      iqn.2012-06.be.bva:tgt1       61  
        scst_local disks                         1   


FATAL: Received the following error:

        Device 'diskf0' still in use, aborting. Use -force to override.




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 02:25:10 +00:00
Bart Van Assche 2ccb2b1003 scstadmin, listExported: Remove dead code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 02:23:49 +00:00
Bart Van Assche 843e1e755d scstadmin: Align exports columns properly
An example:

# scstadmin -noprompt -handler vdisk_fileio -close_dev diskf0
Collecting current configuration: done.


-> Making requested changes.
Device 'diskf0' is currently in use by the following:

        Driver     Target                  Group Lun 
        --------------------------------------------
        iscsi      iqn.2012-06.be.bva:tgt1       61  
        scst_local disks                         1   


FATAL: Received the following error:

        Device 'diskf0' still in use, aborting. Use -force to override.

This patch is based on a proposal from Dzmitry Kotsikau.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 01:04:08 +00:00
Bart Van Assche e3770250bb scstadmin: Synchronize test 07 with trunk r7327
Trunk r7327 restored the 'dummy' attribute for the vdisk_nullio handler
and hence changed the outcome of test 07. Update the expected output.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 01:02:42 +00:00
Bart Van Assche e0903d4ce0 scstadmin: Fix parsing of the soft links under the 'exported' directory
Reported-by: Dzmitry Kotsikau <dkotsikau@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:02:47 +00:00
Bart Van Assche 7baba46a23 scstadmin: Improve test 08
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:01:16 +00:00
Bart Van Assche e02fb4b9ad scstadmin tests: Remove temporary files after tests 05 and 06 have finished
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:00:48 +00:00
Bart Van Assche 3ef72409bd scstadmin: Add test 08 for -close_dev
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:17:23 +00:00
Bart Van Assche efff1b524d scstadmin: Skip the copy manager when computing exported LUNs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:16:04 +00:00
Bart Van Assche a8f0afeb50 scstadmin: Add the -dumpAttrs command line option
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:15:11 +00:00
Bart Van Assche 6aaefd6882 scstadmin, test 07: Make a filename more specific
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:14:08 +00:00
Bart Van Assche 31ff7ecab8 scstadmin: Revert r7310 because it was reported not to fix the issue it should have fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 02:40:13 +00:00
Bart Van Assche 41491391f8 scstadmin: Fix -close_dev
Avoid that closing a device fails and an empty export list is reported
if a device is currently not exported. This patch is based on a patch
provided by Dzmitry Kotsikau <dkotsikau@gmail.com>.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-31 05:39:38 +00:00
Bart Van Assche 3abfda9ec0 scstadmin: Fix a few bugs in the regression test code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-04 02:36:37 +00:00
Bart Van Assche 2a074789ac scstadmin: Revert r7014
The immediateExit() call introduced in r7014 prevents to assign multiple
values to attributes that support multiple values, e.g. 'allowed_portal'.
Hence revert r7014.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7092 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-02-05 06:52:06 +00:00
Bart Van Assche 449eb5944b scstadmin: Avoid that specifying an attribute multiple times results in an incomprehensible error message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-21 21:54:02 +00:00
Bart Van Assche 7c4b50692c scst regression tests: Unload the scst kernel module explicitly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7013 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-21 21:21:29 +00:00
Bart Van Assche cf02e20771 scstadmin: Sort group and device group names alphabetically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-07 00:22:47 +00:00