-
Notifications
You must be signed in to change notification settings - Fork 690
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
tests/test_rm.py::test_secure_delete_capability on Focal #5601
Comments
If I add a print call and one after the subprocess call in the code, I can see all of them executing properly. Wondering how the test is actually failing.
diff --git a/securedrop/rm.py b/securedrop/rm.py
index d9e083d19..baf1a8c94 100644
--- a/securedrop/rm.py
+++ b/securedrop/rm.py
@@ -93,7 +93,9 @@ def check_secure_delete_capability() -> bool:
bool: True if the program is available, otherwise False.
"""
try:
+ print("before call")
subprocess.check_output(["shred", "--help"])
+ print("after call")
return True
except EnvironmentError as e:
if e.errno != errno.ENOENT:
@@ -101,4 +103,6 @@ def check_secure_delete_capability() -> bool:
logging.error("The shred utility is missing.")
except subprocess.CalledProcessError as e:
logging.error("The shred utility is broken: %s %s", e, e.output)
+ except:
+ logging.error("The shred utility is crying: %s %s", e, e.output)
return False |
Now I realized, this code will keep doing the right thing, as in |
kushaldas
added a commit
that referenced
this issue
Oct 28, 2020
On Focal `/bin/shred` exists, that was reason for the failure. `/sbin` does not contain the `shred` executable in both Xenial and Focal.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The test_rm.py is failing.
Steps to Reproduce
BASE_OS=focal securedrop/bin/dev-shell bin/run-test -s -v tests/test_rm.py
Expected Behavior
All tests should pass.
Actual Behavior
The text was updated successfully, but these errors were encountered: