unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 4a590dd400ace4bd8e562ad2b3afa485f07f1356 1139 bytes (raw)
name: gnu/packages/patches/rnp-fix-test.patch 	 # note: path name is non-authoritative(*)

 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
 
From fd0122b0f77fdd0b9e136ba7a3a07e48f6c3080c Mon Sep 17 00:00:00 2001
From: Nickolay Olshevsky <o.nickolay@gmail.com>
Date: Wed, 11 Mar 2020 18:16:35 +0200
Subject: [PATCH 2/6] Fix possible rare failure in test_key_unlock_pgp() test.

Fixed upstream in ba5030620dba3e8684b31ef28687390ca693bf9d.
---
 src/tests/key-unlock.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/tests/key-unlock.cpp b/src/tests/key-unlock.cpp
index 66a44f0d..f7491757 100644
--- a/src/tests/key-unlock.cpp
+++ b/src/tests/key-unlock.cpp
@@ -148,9 +148,10 @@ TEST_F(rnp_tests, test_key_unlock_pgp)
     // verify (negative)
     std::fstream verf("dummyfile.dat.pgp",
                       std::ios_base::binary | std::ios_base::out | std::ios_base::in);
-    off_t        versize = file_size("dummyfile.dat.pgp");
-    verf.seekg(versize - 3, std::ios::beg);
-    verf.write("0x0C", 1);
+    verf.seekg(-3, std::ios::end);
+    char bt = verf.peek() ^ 0xff;
+    verf.seekp(-3, std::ios::end);
+    verf.write(&bt, 1);
     verf.close();
     assert_false(cli_rnp_process_file(&cfg, &rnp));
     rnp_cfg_free(&cfg);
-- 
2.20.1


debug log:

solving 4a590dd400 ...
found 4a590dd400 in https://yhetil.org/guix-patches/20200724124341.18545-1-justus@sequoia-pgp.org/

applying [1/1] https://yhetil.org/guix-patches/20200724124341.18545-1-justus@sequoia-pgp.org/
diff --git a/gnu/packages/patches/rnp-fix-test.patch b/gnu/packages/patches/rnp-fix-test.patch
new file mode 100644
index 0000000000..4a590dd400

1:35: trailing whitespace.
-- 
Checking patch gnu/packages/patches/rnp-fix-test.patch...
1:37: new blank line at EOF.
+
Applied patch gnu/packages/patches/rnp-fix-test.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 4a590dd400ace4bd8e562ad2b3afa485f07f1356	gnu/packages/patches/rnp-fix-test.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).