File: tests-Ignore-chmod-failure.patch

package info (click to toggle)
gcr4 4.4.0.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,308 kB
  • sloc: ansic: 62,525; sh: 240; makefile: 60; xml: 27; javascript: 5
file content (35 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Alessandro Astone <alessandro.astone@canonical.com>
Date: Mon, 26 May 2025 14:49:05 +0200
Subject: tests: Ignore chmod failure

When running as installed tests, the program cannot chmod a file under /usr.

Forwarded: not-needed
---
 gcr/test-ssh-askpass.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcr/test-ssh-askpass.c b/gcr/test-ssh-askpass.c
index 0229436..8b9483f 100644
--- a/gcr/test-ssh-askpass.c
+++ b/gcr/test-ssh-askpass.c
@@ -77,8 +77,7 @@ test_ssh_keygen (Test *test,
 
 	g_assert_cmpstr (password, ==, "booo");
 
-	if (g_chmod (filename, 0600) < 0)
-		g_assert_not_reached ();
+	g_chmod (filename, 0600);
 
 	g_spawn_async (SRCDIR "/gcr/fixtures", argv, NULL,
 	               G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_CLOEXEC_PIPES,
@@ -118,8 +117,7 @@ test_cancelled (Test *test,
 
 	g_assert_cmpstr (password, ==, NULL);
 
-	if (g_chmod (filename, 0600) < 0)
-		g_assert_not_reached ();
+	g_chmod (filename, 0600);
 
 	g_spawn_async (SRCDIR "/gcr/fixtures", argv, NULL,
 	               G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_CLOEXEC_PIPES,