Discussion:
tests/server/sws.c: S_ISSOCK is undefined
Kevin R. Bulgrien via curl-library
2021-04-20 02:24:05 UTC
Permalink
On SCO OpenServer 5.0.7, /usr/include/sys/stat.h does not define S_IFSOCK.
This is conditionally required when USE_UNIX_SOCKETS is defined. This
impedes `make tests` on this platform.

Please consider a patch similar to the following:

$ cat ../curl-7.76.0-i686-pc-sco3.2v5.0.7-4.patch
--- curl-7.76.0/tests/server/sws.c.orig 2021-03-30 07:39:13.000000000 -0500
+++ curl-7.76.0/tests/server/sws.c 2021-04-19 19:37:03.000000000 -0500
@@ -2092,11 +2092,13 @@
unix_socket, errno, strerror(errno));
goto sws_cleanup;
}
+#ifdef S_IFSOCK
if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) {
logmsg("Error binding socket, failed to stat %s: (%d) %s",
unix_socket, error, strerror(error));
goto sws_cleanup;
}
+#endif /* S_IFSOCK */
/* dead socket, cleanup and retry bind */
rc = unlink(unix_socket);
if(0 != rc) {

I believe this may be reasonable in that S_IFSOCK appears to only
pedantically check for a type on a socket connection that has
already failed, but do please feel free to correct any
misconception on my part.

When I applied the patch, I was able to run the tests:

TESTDONE: 1419 tests were considered during 783 seconds.
TESTDONE: 1009 tests out of 1069 reported OK: 94%

TESTFAIL: These test cases failed: 574 575 576 586 588 591 592 593 595 596 597 661 706 707 711 712 713 714 715 1000 1003 1005 1006 1010 1013 1014 1022 1023 1028 1036 1037 1038 1039 1047 1055 1057 1062 1086 1233 1388 1389 1390 1391 1392 1393 1405 1414 1444 1449 1501 1569 1570 1913 1914 2000 2001 2002 2003 2039 2045

On the bright side, more tests passed than failed. LOL.

--

Kevin R. Bulgrien
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: ht
Kevin R. Bulgrien via curl-library
2021-04-28 03:49:32 UTC
Permalink
----- Original Message -----
Sent: Monday, April 19, 2021 9:24:05 PM
Subject: tests/server/sws.c: S_ISSOCK is undefined
On SCO OpenServer 5.0.7, /usr/include/sys/stat.h does not define S_IFSOCK.
This is conditionally required when USE_UNIX_SOCKETS is defined.
This
impedes `make tests` on this platform.
$ cat ../curl-7.76.0-i686-pc-sco3.2v5.0.7-4.patch
--- curl-7.76.0/tests/server/sws.c.orig 2021-03-30 07:39:13.000000000 -0500
+++ curl-7.76.0/tests/server/sws.c 2021-04-19 19:37:03.000000000 -0500
@@ -2092,11 +2092,13 @@
unix_socket, errno, strerror(errno));
goto sws_cleanup;
}
+#ifdef S_IFSOCK
if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) {
logmsg("Error binding socket, failed to stat %s: (%d) %s",
unix_socket, error, strerror(error));
goto sws_cleanup;
}
+#endif /* S_IFSOCK */
/* dead socket, cleanup and retry bind */
rc = unlink(unix_socket);
if(0 != rc) {
I believe this may be reasonable in that S_IFSOCK appears to only
pedantically check for a type on a socket connection that has
already failed, but do please feel free to correct any
misconception on my part.
TESTDONE: 1419 tests were considered during 783 seconds.
TESTDONE: 1009 tests out of 1069 reported OK: 94%
TESTFAIL: These test cases failed: 574 575 576 586 588 591 592 593
595 596 597 661 706 707 711 712 713 714 715 1000 1003 1005 1006 1010
1013 1014 1022 1023 1028 1036 1037 1038 1039 1047 1055 1057 1062
1086 1233 1388 1389 1390 1391 1392 1393 1405 1414 1444 1449 1501
1569 1570 1913 1914 2000 2001 2002 2003 2039 2045
On the bright side, more tests passed than failed. LOL.
Is there opposition to this patch?
Daniel Stenberg via curl-library
2021-04-28 06:03:24 UTC
Permalink
Post by Kevin R. Bulgrien via curl-library
Is there opposition to this patch?
This was merged a week ago:

https://github.com/curl/curl/commit/415d6fa7da852d655ac79f5b11fd7170644f2e27

I recommend you following/using the github repository if you want to monitor
what goes into curl and also for submitting your work to us in a more
effective way using pull-requests.
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette
Loading...