-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example setup, open-iscsi, libiscsi test scripts #64
Conversation
README.md
Outdated
@@ -48,6 +48,7 @@ Note that the examples directory is intended to show static configurations that | |||
### Test | |||
|
|||
You can test this with [open-iscsi](http://www.open-iscsi.com/) or [libiscsi](https://github.com/gostor/libiscsi). | |||
For more information and example test scripts, please refer to the test directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a link to the test directory? for example: test
test/README.md
Outdated
|
||
## Making contributions | ||
As a way to get you started and get you familiar with the gotgt project, | ||
you can check out this file https://github.com/gostor/gotgt/issues/55 (Issue 55) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can check out this file at issue #55 ?
test/gotgt-daemon.sh
Outdated
dd if=/dev/zero of=/var/tmp/disk.img bs=1024 count=102400 | ||
|
||
## kick off the target library daemon for testing purposes | ||
killall gotgt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may break the travis test. Travis evaluates each line as a failed case if its $?
is not 0
.
On Tuesday, October 3, 2017, 5:36:05 PM GMT+8, Lei Xue <notifications@github.com> wrote:
@carmark requested changes on this pull request.
In README.md:
@@ -48,6 +48,7 @@ Note that the examples directory is intended to show static configurations that
### Test
You can test this with [open-iscsi](http://www.open-iscsi.com/) or [libiscsi](https://github.com/gostor/libiscsi).
+For more information and example test scripts, please refer to the test directory.
add a link to the test directory? for example: test
Will change toplease refer to the [test directory](./test/).
In test/README.md:
+These have been tested with Ubuntu Linux versions as of 2017.
+Please update them as more Linux variants and platforms are verified or added.
+
+### Noises in the test results
+Note that the "[FAILED]" lines during the libiscsi test are often
+due to the standard procedure to check the unknown devices with inquiry command.
+It will not impact the real test. The "CUnit" testing noises can also
+be safely ignored.
+Also note that some testing using fdisk and mkfs in the openiscsi-gotgt-test.sh
+create state information for the partition and the file system.
+You should run the test-cleanup.sh to remove those state information.
+That is not foolproof however, and you may need to do some manually.
+
+## Making contributions
+As a way to get you started and get you familiar with the gotgt project,
+you can check out this file #55 (Issue 55)
you can check out this file at issue #55 ?
>> Will change to below per convention [label ] (link) syntaxyou can check out this file at issue [#55](https://github.com/gostor/ gotgt/issues/55)
In test/gotgt-daemon.sh:
+## TO-DO/TO-RESOLVE supply some test files to do more unit testing
+go test -v ./pkg/...
+
+### create target json configuration file for testing
+### create a flat file for target backend for testing
+[ ! -d ${HOME}/.gotgt ] && mkdir ${HOME}/.gotgt
+#
+echo '{"storages":[{"deviceID":1000,"path":"file:/var/tmp/disk.img","online":true}],' > ${HOME}/.gotgt/config.json
+echo '"iscsiportals":[{"id":0,"portal":"127.0.0.1:3260"}],' >> ${HOME}/.gotgt/config.json
+echo '"iscsitargets":{"iqn.2016-09.com.gotgt.gostor:example_tgt_0":{"tpgts":{"1":[0]},"luns":{"0":1000}}}}' >> ${HOME}/.gotgt/config.json
+
+[ ! -f /var/tmp/disk.img ] && touch /var/tmp/disk.img
+dd if=/dev/zero of=/var/tmp/disk.img bs=1024 count=102400
+
+## kick off the target library daemon for testing purposes
+killall gotgt
It may break the travis test. Travis evaluates each line as a failed case if its $? is not 0.
>> You mean the last line? killall gotgtI would propose to change it to# [ `ps -ef | grep "gotgt daemon" | wc -l ` -gt 1 ] && killall gotgtSince this would produce 1 in $? when there is no daemon running, I would comment this out.I propose to add .yml file when new functionality is added, which serves as a regression test. I would process not to integrate these developer friendly scripts in its entirety.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
cead79b
to
58d5eb9
Compare
LGTM |
No description provided.