[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Potential spiped 1.6.1 release -- please test



On Sat, Dec 21, 2019 at 07:05:42PM -0800, Colin Percival wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi spiped users,
> 
> I've just uploaded a tarball which may be (modulo version number update)
> spiped 1.6.1.  Please test this -- even if all you have time to do is check
> that it compiles on your platform, that's better than nothing, but running
> 'make all test' and/or testing with live usage would be much better.
> 
> You can download the spiped code at
>   https://www.tarsnap.com/spiped/spiped-1.6.1a.tgz
> and the tarball has SHA256 hash
>   11690b81e68d8aa1997a17fd5fe6b692fcb9d1d2a2eba4bc7b3d78b5e32546b7
> .  You can also see the tree from which I rolled this almost-release at
> https://github.com/Tarsnap/spiped if you find it useful to crawl through
> VCS history.

Hi,

Thanks for your work on spiped! What do you think about the attached
trivial patches to the new pushbits test?

Thanks again, and keep up the great work!

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} pp@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
Description: Provide proper C function prototypes.
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2019-12-28

--- a/tests/pushbits/main.c
+++ b/tests/pushbits/main.c
@@ -62,7 +62,7 @@
 }
 
 static int
-echo_stdin_stdout()
+echo_stdin_stdout(void)
 {
 	pthread_t thread;
 
@@ -109,7 +109,7 @@
 }
 
 static int
-chain_one()
+chain_one(void)
 {
 	pthread_t thread;
 	int in[2];
@@ -191,7 +191,7 @@
 }
 
 static int
-chain_two()
+chain_two(void)
 {
 	pthread_t thread[2];
 	int in[2];
Description: Report pthread errors correctly in tests.
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2019-12-28

--- a/tests/pushbits/main.c
+++ b/tests/pushbits/main.c
@@ -21,6 +21,7 @@
 {
 	pthread_t thread;
 	int in, out;
+	int rc;
 
 	/* Open input and output. */
 	if ((in = open(filename_in, O_RDONLY)) == -1) {
@@ -40,8 +41,8 @@
 	}
 
 	/* Wait for thread to finish. */
-	if (pthread_join(thread, NULL)) {
-		warnp("pthread_join");
+	if ((rc = pthread_join(thread, NULL)) != 0) {
+		warn0("pthread_join: %s", strerror(rc));
 		goto err2;
 	}
 
@@ -65,6 +66,7 @@
 echo_stdin_stdout(void)
 {
 	pthread_t thread;
+	int rc;
 
 	/* Start echoing. */
 	if (pushbits(STDIN_FILENO, STDOUT_FILENO, &thread)) {
@@ -74,14 +76,14 @@
 
 	/* Wait a short while, then cancel the thread. */
 	sleep(1);
-	if (pthread_cancel(thread)) {
-		warnp("pthread_cancel");
+	if ((rc = pthread_cancel(thread)) != 0) {
+		warn0("pthread_cancel: %s", strerror(rc));
 		goto err0;
 	}
 
 	/* Wait for thread to finish. */
-	if (pthread_join(thread, NULL)) {
-		warnp("pthread_join");
+	if ((rc = pthread_join(thread, NULL)) != 0) {
+		warn0("pthread_join: %s", strerror(rc));
 		goto err0;
 	}
 
@@ -118,6 +120,7 @@
 	size_t msglen = strlen(msg) + 1;
 	char * buf;
 	ssize_t r;
+	int rc;
 
 	/* Initialize output message buffer. */
 	if ((buf = malloc(msglen)) == NULL) {
@@ -170,8 +173,8 @@
 	}
 
 	/* Wait for thread to finish, then clean up. */
-	if (pthread_join(thread, NULL)) {
-		warnp("pthread_join");
+	if ((rc = pthread_join(thread, NULL)) != 0) {
+		warn0("pthread_join: %s", strerror(rc));
 		goto err1;
 	}
 	free(buf);
@@ -201,6 +204,7 @@
 	size_t msglen = strlen(msg) + 1;
 	char * buf;
 	ssize_t r;
+	int rc;
 
 	/* Initialize output message buffer. */
 	if ((buf = malloc(msglen)) == NULL) {
@@ -251,8 +255,8 @@
 	}
 
 	/* Shut down the first thread. */
-	if (pthread_join(thread[0], NULL)) {
-		warnp("pthread_join");
+	if ((rc = pthread_join(thread[0], NULL)) != 0) {
+		warn0("pthread_join: %s", strerror(rc));
 		goto err2;
 	}
 
@@ -267,8 +271,8 @@
 	}
 
 	/* Wait for the second thread to finish, then clean up. */
-	if (pthread_join(thread[1], NULL)) {
-		warnp("pthread_join");
+	if ((rc = pthread_join(thread[1], NULL)) != 0) {
+		warn0("pthread_join: %s", strerror(rc));
 		goto err1;
 	}
 	free(buf);

Attachment: signature.asc
Description: PGP signature