Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766159 - dev-ruby/http-parser-1.2.3: test failures (on sparc)
Summary: dev-ruby/http-parser-1.2.3: test failures (on sparc)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2021-01-19 17:32 UTC by Sam James
Modified: 2022-12-01 00:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_766159.txt,5.25 KB, text/plain)
2021-01-19 17:32 UTC, Sam James
Details
build.log (ppc, 1.2.3) (http-parser-1.2.3-r1:20220625-171620.log,7.61 KB, text/plain)
2022-06-25 17:18 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-19 17:32:04 UTC
Created attachment 683758 [details]
build.log

Builds fine, but tests fail.
----

>>> Test phase: dev-ruby/http-parser-1.2.3
 * Running test phase for ruby26 ...
..FF....F......................F..

Failures:

  1) HttpParser::Parser#initialize the error should be inspectable
     Failure/Error: expect(@inst.error).to be_kind_of(::HttpParser::Error::INVALID_METHOD)
       expected #<HttpParser::Error::UNKNOWN: an unknown error occurred (UNKNOWN)> to be a kind of HttpParser::Error::INVALID_METHOD
     # ./spec/error_spec.rb:20:in `block (2 levels) in <top (required)>'

  2) HttpParser::Parser#initialize raises different error types depending on the error
     Failure/Error: expect(@inst.error).to be_kind_of(::HttpParser::Error::INVALID_VERSION)
       expected #<HttpParser::Error::INVALID_CONSTANT: invalid constant string (INVALID_CONSTANT)> to be a kind of HttpParser::Error::INVALID_VERSION
     # ./spec/error_spec.rb:26:in `block (2 levels) in <top (required)>'

  3) HttpParser::Instance#initialize #type should default to :both
     Failure/Error: expect(subject.type).to eq(:both)

       expected: :both
            got: :request

       (compared using ==)

       Diff:
       @@ -1 +1 @@
       -:both
       +:request

     # ./spec/instance_spec.rb:24:in `block (3 levels) in <top (required)>'

  4) HttpParser::Parser#initialize #upgrade? should return true if the Upgrade header was set
     Failure/Error: expect(@inst.upgrade?).to eq(true)

       expected: true
            got: false

       (compared using ==)

       Diff:
       @@ -1 +1 @@
       -true
       +false

     # ./spec/parser_spec.rb:270:in `block (3 levels) in <top (required)>'

Finished in 0.07467 seconds (files took 0.41179 seconds to load)
34 examples, 4 failures

Failed examples:

rspec ./spec/error_spec.rb:18 # HttpParser::Parser#initialize the error should be inspectable
rspec ./spec/error_spec.rb:24 # HttpParser::Parser#initialize raises different error types depending on the error
rspec ./spec/instance_spec.rb:23 # HttpParser::Instance#initialize #type should default to :both
rspec ./spec/parser_spec.rb:269 # HttpParser::Parser#initialize #upgrade? should return true if the Upgrade header was set

 * ERROR: dev-ruby/http-parser-1.2.3::gentoo failed (test phase):
 *   rspec failed

----
Portage 3.0.13 (python 3.7.9-final-0, default/linux/sparc/17.0/64ul, gcc-10.2.0, glibc-2.32-r7, 5.9.6-gentoo sparc)
=================================================================
System uname: Linux-5.9.6-gentoo-sparc-sun4v-with-gentoo-2.7
KiB Mem:   531351440 total, 459797856 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 19 Jan 2021 17:02:56 +0000
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.0-r1::gentoo
dev-lang/python:          2.7.18-r5::gentoo, 3.6.12-r1::gentoo, 3.7.9-r1::gentoo, 3.8.7::gentoo, 3.9.1::gentoo
dev-util/cmake:           3.19.3::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="sparc ~sparc"
ACCEPT_LICENSE="@FREE"
CBUILD="sparc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="sparc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/bound/distfiles"
EMERGE_DEFAULT_OPTS="--complete-graph --with-bdeps=y --keep-going --deep"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -mcpu=ultrasparc -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -mcpu=ultrasparc -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j100 -l257"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl berkdb big-endian bzip2 cli crypt dbus dri elogind fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline sparc split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python2_7 python3_8 python3_7 python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev glint mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Hans de Graaff gentoo-dev Security 2021-01-19 17:58:06 UTC
(In reply to Sam James from comment #0)

>   1) HttpParser::Parser#initialize the error should be inspectable
>      Failure/Error: expect(@inst.error).to
> be_kind_of(::HttpParser::Error::INVALID_METHOD)
>        expected #<HttpParser::Error::UNKNOWN: an unknown error occurred
> (UNKNOWN)> to be a kind of HttpParser::Error::INVALID_METHOD
>      # ./spec/error_spec.rb:20:in `block (2 levels) in <top (required)>'

I've just looked at this one assuming that they may all have the underlying cause. What happens here is that the test should trigger HPE_INVALID_METHOD in the http-parser.c code but it doesn't and then falls back to UNKNOWN.

The http-parser code in the gem looks to be 2.8.1, so perhaps this is an issue already fixed in net-libs/http-parser. Unfortunately we can't just drop in the .so since the C code gets compiled with ffi-compiler which adds ruby-specific code to make it easy to handle on the ruby side.

Upstream also seems to consider moving from http-parser to llparser from llhttp, e.g. https://github.com/httprb/http/pull/639

Not sure if it's worth the time to investigate this further or hope for a new release based on llhttp.
Comment 2 ernsteiswuerfel archtester 2022-06-25 17:18:16 UTC
Created attachment 787640 [details]
build.log (ppc, 1.2.3)

Same on ppc.