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

Add regression test for 954 #1022

Merged
merged 1 commit into from
Aug 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/test_linux.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

import os
import errno
import pickle
import shutil
import tempfile
import unittest
Expand Down Expand Up @@ -260,3 +261,11 @@ def test_symbolic_argv_envp(self):
self.assertEqual(mem[6], b'\0')
self.assertTrue(issymbolic(mem[5]))

def test_serialize_state_with_closed_files(self):
# regression test: issue 954

platform = self.linux
filename = platform.current.push_bytes('/bin/true\x00')
fd = platform.sys_open(filename, os.O_RDONLY, 0o600)
platform.sys_close(fd)
pickle.dumps(platform)