Skip to content
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

fix FAB-17148 defer to delete 'bccsp-sw' directory #328

Merged
merged 2 commits into from
Dec 1, 2019

Conversation

baidang201
Copy link
Contributor

@baidang201 baidang201 commented Nov 29, 2019

Signed-off-by: baidang201 jinrishouji@sina.com
Type of change
Bug fix

Description
fix when unit test in bccsp\sw,we find in the /tmp folder, has a lot of file like 'bccsp-sw' and can not delete auto by test program.

Additional details
the reason is when os.exit, it do not run defer to delete 'bccsp-sw' folder.
we can put os.exit in the head of function and import another defer for os.exit.

Related issues
https://jira.hyperledger.org/browse/FAB-17148

Signed-off-by: baidang201 <jinrishouji@sina.com>
@@ -76,10 +80,10 @@ func TestMain(m *testing.M) {
ret := m.Run()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be code = m.Run()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

bccsp/sw/impl_test.go Outdated Show resolved Hide resolved
Signed-off-by: baidang201 <jinrishouji@sina.com>
Copy link
Contributor

@yacovm yacovm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix

@yacovm yacovm merged commit 0264eb6 into hyperledger:master Dec 1, 2019
raftAtGit pushed a commit to raftAtGit/fabric that referenced this pull request Dec 2, 2019
* fix FAB-17148 defer to delete 'bccsp-sw' directory

Signed-off-by: baidang201 <jinrishouji@sina.com>

* 1 set code = m.Run  2 delete not user 'code =0' at last line

Signed-off-by: baidang201 <jinrishouji@sina.com>
raftAtGit pushed a commit to raftAtGit/fabric that referenced this pull request Dec 2, 2019
* fix FAB-17148 defer to delete 'bccsp-sw' directory

Signed-off-by: baidang201 <jinrishouji@sina.com>

* 1 set code = m.Run  2 delete not user 'code =0' at last line

Signed-off-by: baidang201 <jinrishouji@sina.com>
Signed-off-by: Hakan Eryargi <hakan.eryargi@gmail.com>
cendhu pushed a commit to cendhu/fabric that referenced this pull request Dec 11, 2019
* fix FAB-17148 defer to delete 'bccsp-sw' directory

Signed-off-by: baidang201 <jinrishouji@sina.com>

* 1 set code = m.Run  2 delete not user 'code =0' at last line

Signed-off-by: baidang201 <jinrishouji@sina.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants