Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8631 closed defect (fixed)

Integ tests rename process

Reported by: atagar Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords: testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

While running stem's integ tests the process name, according to ps, becomes...

p   y   t   h   o   n       .   /   r   u   n   _   t   e   s

This is likely due to the integ test for process renaming (maybe it's failing to revert the activity it takes?).

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by ragwater

Status: newneeds_review

get_process_name() seems to return uncooperative encoding in some cases

Quick hotfix:

https://github.com/ragwater/stem/commit/059b0c936bce24a18395d9c67b859e4acd65d237

comment:2 Changed 4 years ago by atagar

Resolution: fixed
Status: needs_reviewclosed

Very nice catch! The str_tools module has methods for unicode/bytes conversions to better support python3 compatibility but strangely it doesn't work in this case. The call I tried was...

process_name_encoded = stem.util.str_tools._to_unicode(process_name)

... which would functionally be the same as what you have, but with 'replace' (rather than bulking at characters it can't convert)...

process_name_encoded = process_name.encode('utf8', 'replace')

But it didn't work. Oh well, I ran your patch with both python2 and python3 and they're both happy now so pushed.

Thanks! -Damian

PS. Minor nitpick but git has a specific format it expects commit messages to have. There's no need to state the modified files (that's easily seen from the commit), but it does expect...

Short summary line

Description of stuff, preferably explaining the issue,
your fix, the ticket url, testing done, etc...

http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

For instance I changed the commit message for this one to...

https://gitweb.torproject.org/stem.git/commitdiff/8adc55c0139ff9f0925541be1254bea4767716ed

comment:3 Changed 4 years ago by ragwater

Live and learn, I'll make sure to follow those specs in the future :)

Thanks,
Tom

Note: See TracTickets for help on using tickets.