Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: TestReadLine fails on OpenSuse Linux #65905

Closed
muhlemmer opened this issue Feb 23, 2024 · 2 comments
Closed

net: TestReadLine fails on OpenSuse Linux #65905

muhlemmer opened this issue Feb 23, 2024 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@muhlemmer
Copy link
Contributor

muhlemmer commented Feb 23, 2024

Go version

go version go1.22.0 linux/amd64

Output of go env in your module/workspace:

Note: go env from 1.21 as I couldn't compile 1.22.

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/tim/.cache/go-build'
GOENV='/home/tim/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/tim/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/tim/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib64/go/1.21'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/lib64/go/1.21/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.7'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/tim/Repositories/goroot/src/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1949393045=/tmp/go-build -gno-record-gcc-switches'

What did you do?

OS details:

~ cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20240216"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20240216"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
# CPE 2.3 format, boo#1217921
CPE_NAME="cpe:2.3:o:opensuse:tumbleweed:20240216:*:*:*:*:*:*:*"
#CPE 2.2 format
#CPE_NAME="cpe:/o:opensuse:tumbleweed:20240216"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"
  1. Follow Installing Go from source
    2 Shell commands:
git clone https://go.googlesource.com/go goroot
cd goroot
git checkout go1.22.0
cd src
./all.bash

What did you see happen?

Building Go cmd/dist using /usr/lib64/go/1.21. (go1.21.7 linux/amd64)
Building Go toolchain1 using /usr/lib64/go/1.21.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/amd64.

##### Test execution environment.
# GOARCH: amd64
# CPU: AMD Ryzen 7 6800HS with Radeon Graphics        
# GOOS: linux
# OS Version: Linux 6.7.4-1-default #1 SMP PREEMPT_DYNAMIC Tue Feb  6 05:32:37 UTC 2024 (01735a3) x86_64

##### Testing packages.
<omitted output of ok packages>
--- FAIL: TestReadLine (0.00s)
    parse_test.go:25: open /etc/services: no such file or directory
2024/02/23 15:16:22 killing splice client after 5 second shutdown timeout
FAIL
FAIL    net     9.296s
<omitted output of ok packages>
FAIL
go tool dist: Failed: exit status 1

OpenSuse linux does not provide the /etc/services file.

ls /etc
aclocal_dirlist        bash_command_not_found  cron.hourly      dracut.conf          gpm                 issue          locale.conf       named.d         paperspecs         reader.conf.d     signon-ui              swtpm_setup.conf     X11
adjtime                bash_completion.d       cron.monthly     dracut.conf.d        group               issue.d        localtime         nanorc          passwd             request-key.conf  skel                   sysconfig            xattr.conf
aliases                bind.keys               crontab          ethertypes           group-              issue.net      login.defs.d      netconfig       passwd-            request-key.d     slp.conf               sysctl.d             xdg
aliases.d              bindresvport.blacklist  cron.weekly      exports              grub.d              java           logrotate.d       NetworkManager  permissions.d      resolv.conf       slp.spi                systemd              xinetd.conf
aliases.lmdb           binfmt.d                crypto-policies  exports.d            gtk-2.0             jvm            lvm               Nextcloud       permissions.local  rpc               smartd.conf            tcsd.conf            xinetd.d
aliases.YaST2save      blkid.conf              crypttab         firewalld            gtk-3.0             jvm-common     machine-id        nfs.conf        pkcs11             rpm               smart_drivedb.h        termcap              xml
alsa                   bluetooth               csh.cshrc        flatpak              host.conf           keys           magic             nfsmount.conf   pkgconfig          samba             smartd_warning.d       terminfo             xscreensaver
alternatives           ca-certificates         csh.login        fonts                hostname            krb5.conf      manpath.config    nftables        pki                sane.d            smartd_warning.sh      tigervnc             YaST2
apparmor               ceph                    cups             fstab                hosts               krb5.conf.d    mcelog            nscd.conf       plymouth           sasl2             snapper                tmpfiles.d           zypp
apparmor.d             chromium                cupshelpers      fuse3.conf           hosts.allow         ksysguarddrc   mdevctl.d         nsswitch.conf   polkit-1           screenrc          snmp                   tuned
audit                  chrony.conf             dbus-1           fuse.conf            hosts.deny          ld.so.cache    mime.types        nvme            postfix            sddm.conf.d       ssh                    udev
autofs.conf            chrony.d                dconf            fwupd                hp                  ld.so.conf     mke2fs.conf       openal          ppp                security          ssl                    udisks2
autofs_ldap_auth.conf  chrony.keys             debuginfod       gcrypt               icewm               ld.so.conf.d   modprobe.d        openconnect     pptp.d             selinux           subgid                 uefi
auto.master            cifs-utils              default          gdbinit              idmapd.conf         libao.conf     modules-load.d    openldap        products.d         sensors3.conf     subgid-                unbound
auto.master.d          containerd              depmod.d         gdbinit.d            ImageMagick-7       libaudit.conf  motd.d            openvpn         profile            sensors.d         subuid                 UPower
auto.misc              credstore               dhcp             gemrc                ImageMagick-7-SUSE  libblockdev    mtab              opi.cfg         profile.d          sgml              subuid-                usb_modeswitch.conf
auto.net               credstore.encrypted     dialogrc         geoclue              inputrc             libibverbs.d   multipath         opt             pulse              shadow            sudoers                vconsole.conf
auto.smb               cron.d                  dnsmasq.conf     gimp                 iscsi               libnl          my.cnf            os-release      pythonstart        shadow-           sudoers.d              vnc
avahi                  cron.daily              dnsmasq.d        gnome_defaults.conf  iscsid.conf         libssh         my.cnf.d          PackageKit      qemu               shells            swtpm-localca.conf     wgetrc
bash.bashrc            cron.deny               docker           gnupg                isns                libvirt        mysqlaccess.conf  pam.d           rdma               signond.conf      swtpm-localca.options  wpa_supplicant

What did you expect to see?

Go to compile, test and install correctly.

https://github.com/golang/go/blob/ad377e906a8ee6f27545d83de280206dacec1e58/src/net/parse_test.go#L15C2-L21C48

If the test needs to read a line from a file, why not just generate a temp file instead of relying on a distribution specific file?

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 23, 2024
@bcmills bcmills added this to the Go1.23 milestone Feb 23, 2024
@bcmills
Copy link
Contributor

bcmills commented Feb 23, 2024

(attn @ianlancetaylor @neild)

@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Feb 23, 2024
@gopherbot
Copy link

Change https://go.dev/cl/566535 mentions this issue: net: skip TestReadLine if /etc/services does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants