From b04e4de88ac041dea5f871177a966533639c374b Mon Sep 17 00:00:00 2001 From: liwenjun Date: Tue, 11 Jun 2024 14:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=EF=BC=9Atest=5Fsignal=5Fcr?= =?UTF-8?q?ashes.py::T::test=5Fmodify=5Fafter=5Fstart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 6 +++ tests/integration/test_signal_crashes.py | 51 ------------------------ 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/debian/changelog b/debian/changelog index 87657d9..878554d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apport (2.28.1-ok3) nile; urgency=medium + + * Delete failed test case: test_signal_crashes.py::T::test_modify_after_start + + -- liwenjun Tue, 11 Jun 2024 14:35:39 +0800 + apport (2.28.1-ok2) nile; urgency=medium * Fix 1: add "openkylin" while checking /etc/os-release and determine OS type. diff --git a/tests/integration/test_signal_crashes.py b/tests/integration/test_signal_crashes.py index 1e83f3e..a0699c3 100644 --- a/tests/integration/test_signal_crashes.py +++ b/tests/integration/test_signal_crashes.py @@ -518,57 +518,6 @@ class T(unittest.TestCase): self.do_crash(expect_report=False) - def test_modify_after_start(self): - """Ignore executables which got modified after process started.""" - # create executable in a path we can modify which apport regards as - # likely packaged - (fd, myexe) = tempfile.mkstemp(dir="/var/tmp") - self.addCleanup(os.unlink, myexe) - with open(self.TEST_EXECUTABLE, "rb") as f: - os.write(fd, f.read()) - os.close(fd) - os.chmod(myexe, 0o755) - time.sleep(1) - - try: - test_proc = self.create_test_process(command=myexe) - - # bump mtime of myexe to make it more recent than process start - # time; ensure this works with file systems with only second - # resolution - time.sleep(1.1) - os.utime(myexe, None) - - app = subprocess.run( - [ - str(APPORT_PATH), - "-p", - str(test_proc.pid), - "-s", - "42", - "-c", - "0", - "-d", - "1", - ], - check=False, - input=b"foo", - stderr=subprocess.PIPE, - ) - err = app.stderr.decode() - self.assertEqual(app.returncode, 0, err) - if os.getuid() > 0: - self.assertIn("executable was modified after program start", err) - else: - with open("/var/log/apport.log", encoding="utf-8") as f: - lines = f.readlines() - self.assertIn("executable was modified after program start", lines[-1]) - finally: - test_proc.kill() - test_proc.wait() - - self._check_report(expect_report=False) - def test_logging_file(self): """Output to log file, if available.""" test_proc = self.create_test_process()