GNU bug report logs -
#63618
[PATCH WIP] Socat tests
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Sat, 20 May 2023 21:51:02 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63618 in the body.
You can then email your comments to 63618 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
ludo <at> gnu.org, guix-patches <at> gnu.org
:
bug#63618
; Package
guix-patches
.
(Sat, 20 May 2023 21:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Victal <mirai <at> makinata.eu>
:
New bug report received and forwarded. Copy sent to
ludo <at> gnu.org, guix-patches <at> gnu.org
.
(Sat, 20 May 2023 21:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've noticed that socat does have a test-suite (under a "test" target)
though I am having some trouble with some of the tests failures.
Going through the build log, there's some lines of interest:
Test 59:
--8<---------------cut here---------------start------------->8---
…
test 59 CHILDDEFAULT: child process default properties... FAILED:
./socat -t 0.1 -u exec:./procan -
…
--8<---------------cut here---------------end--------------->8---
In test 227, tests fail due to an absent /etc/services.
--8<---------------cut here---------------start------------->8---
…
test 227 EXECPTYKILL: exec:...,pty explicitely kills sub process... OK
grep: /etc/services: No such file or directory
test 228 TCP4SERVICE: echo via connection to TCP V4 socket... !port 1 timed out! FAILED: ./socat:
./socat -t 0.1 TCP4-LISTEN:,reuseaddr PIPE &
2023/05/20 20:48:44 socat[8835] E empty port/service
./socat -t 0.1 stdin!!stdout TCP4:127.0.0.1:
2023/05/20 20:48:49 socat[8857] E empty port/service
test 229 EXCEED_FOPEN_MAX: more than FOPEN_MAX FDs in use... OK
…
--8<---------------cut here---------------end--------------->8---
Note: a similar failure was already observed in
d6f6b57766e95d2fa8af63d4460a2b303ca4d867.
I wonder if it's feasible to include /etc/services
in the build environment?
Test 418:
--8<---------------cut here---------------start------------->8---
…
test 418 ABSTRACT_USER: Is the fs related user option on ABSTRACT socket applied to FD... FAILED
./socat ABSTRACT-LISTEN:temp,accept-timeout=0.1,user= FILE:/dev/null
2023/05/20 20:50:55 socat[12189] E getpwnam(""): no such user
…
--8<---------------cut here---------------end--------------->8---
I'm out of clues as to how to get these 3 tests sorted out.
Any ideas?
I've attached the build logs for socat with the tests enabled below.
Regards,
Bruno
[2y5a746gxzg94kmsg7qv107vj952mj-socat-1.7.4.3.drv.lz (application/x-lzip, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#63618
; Package
guix-patches
.
(Sat, 20 May 2023 21:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 63618 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/networking.scm (socat)[arguments]: Enable tests.
[native-inputs]: Add test dependencies: net-tools, which and procps.
---
gnu/packages/networking.scm | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 85fb352ebf..4a2ed0e8a5 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1204,9 +1204,25 @@ (define-public socat
version ".tar.bz2"))
(sha256
(base32
- "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))))
+ "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (substitute* "test.sh"
+ (("/sbin/ifconfig") "ifconfig")
+ (("^/bin/rm") "rm"))))))
(build-system gnu-build-system)
- (arguments '(#:tests? #f)) ; no test suite
+ (arguments
+ (list
+ #:test-target "test"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'patch-source-shebangs 'patch-test-shebangs
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; test.sh embeds some shell scripts.
+ (substitute* "test.sh"
+ (("/usr/bin/env") (search-input-file inputs "/bin/env"))))))))
+ (native-inputs (list net-tools which procps)) ; for tests
(inputs (list openssl))
(home-page "http://www.dest-unreach.org/socat/")
(synopsis
base-commit: cebf0e36d1e5439f43046ec3d6d995fb18f27218
--
2.39.2
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Mon, 14 Apr 2025 04:37:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Victal <mirai <at> makinata.eu>
:
bug acknowledged by developer.
(Mon, 14 Apr 2025 04:37:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 63618-done <at> debbugs.gnu.org (full text, mbox):
Hi Bruno,
Bruno Victal <mirai <at> makinata.eu> writes:
> * gnu/packages/networking.scm (socat)[arguments]: Enable tests.
> [native-inputs]: Add test dependencies: net-tools, which and procps.
> ---
> gnu/packages/networking.scm | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 85fb352ebf..4a2ed0e8a5 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -1204,9 +1204,25 @@ (define-public socat
> version ".tar.bz2"))
> (sha256
> (base32
> - "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))))
> + "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))
> + (modules '((guix build utils)))
> + (snippet
> + #~(begin
> + (substitute* "test.sh"
> + (("/sbin/ifconfig") "ifconfig")
> + (("^/bin/rm") "rm"))))))
> (build-system gnu-build-system)
> - (arguments '(#:tests? #f)) ; no test suite
> + (arguments
> + (list
> + #:test-target "test"
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'patch-source-shebangs 'patch-test-shebangs
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; test.sh embeds some shell scripts.
> + (substitute* "test.sh"
> + (("/usr/bin/env") (search-input-file inputs "/bin/env"))))))))
> + (native-inputs (list net-tools which procps)) ; for tests
> (inputs (list openssl))
> (home-page "http://www.dest-unreach.org/socat/")
> (synopsis
I came up with something similar in #77765, you may want to take a look.
Closing this one.
--
Thanks,
Maxim
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 12 May 2025 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.