Skip to content

Commit

Permalink
some fixes to run tests from pycharm with a suid-python binary
Browse files Browse the repository at this point in the history
  • Loading branch information
psy0rz committed Sep 17, 2024
1 parent c52857f commit a2f4dd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/basetest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

import os
# To run tests as non-root, use this hack:
# chmod 4755 /usr/sbin/zpool /usr/sbin/zfs

Expand Down Expand Up @@ -51,6 +51,10 @@
else:
OutputIO=io.StringIO

# for when we're using a suid-root python binary during development
os.setuid(0)
os.setgid(0)


# for python2 compatibility (python 3 has this already)
@contextlib.contextmanager
Expand Down
1 change: 1 addition & 0 deletions tests/tests

0 comments on commit a2f4dd4

Please sign in to comment.