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

compress/gzip: issue6550 test fails #21661

Closed
ghost opened this issue Aug 28, 2017 · 7 comments
Closed

compress/gzip: issue6550 test fails #21661

ghost opened this issue Aug 28, 2017 · 7 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@ghost
Copy link

ghost commented Aug 28, 2017

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: go1.4-bootstrap-20170531.tar.gz,
go1.9.src.tar.gz

I created a package for installation on Slackware-14.0 (32bit) here.

I've never seen this output before near the end of running a .SlackBuild script.

This also occurs with version 1.8.3.

WARNING: gzip test failed on usr/lib/go1.9/go/src/compress/gzip/testdata/issue6550.gz

http://nurmi-labs.blogspot.com/2017/08/bootstrapping-go.html

@ianlancetaylor ianlancetaylor changed the title gzip test compress/gzip: issue6550 test fails Aug 28, 2017
@ianlancetaylor ianlancetaylor added the Testing An issue that has been verified to require only test changes, not just a test failure. label Aug 28, 2017
@ianlancetaylor
Copy link
Contributor

I don't know what the .SlackBuild script does. There should be more information printed somewhere, showing what exactly failed. Can you find that?

Note that compress/gzip/testdata/issue6550.gz is a binary file, so please verify that it was not corrupted anywhere during the build process.

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Aug 28, 2017
@dsnet
Copy link
Member

dsnet commented Aug 28, 2017

issue6550.gz is an intentionally corrupted file used in the unit tests... why does SlackBuild care about inspecting whether it is valid or not?

@ghost
Copy link
Author

ghost commented Aug 29, 2017

The google-go-lang.SlackBuild script runs /sbin/makepkg at the end.

The output as "WARNING: gzip test failed on usr/lib/go1.9/go/src/compress/gzip/testdata/issue6550.gz"
was from the makepkg script.

https://mirrors.slackware.com/slackware/slackware-14.0/source/a/pkgtools/scripts/

Index of /slackware/slackware-14.0/source/a/pkgtools/scripts

makepkg

# Warn of corrupt or empty gzip files:
find . -type f -name '*.gz' | while read file ; do
  if ! gzip -t $file 1> /dev/null 2> /dev/null ; then
    echo "WARNING:  gzip test failed on $(echo $file | cut -b3-)"
  else
    if [ "$(gzip -l $file | tail -n 1 | tr -s ' ' | cut -f 3 -d ' ')" -eq 0 ]; then
      echo "WARNING:  $(echo $file | cut -b3-) is an empty gzipped file"
    fi
  fi
done

@dsnet
Copy link
Member

dsnet commented Aug 29, 2017

My question is why SlackBuild cares about this at all? I don't see why some other packaging system should care about the files (especially test files) within a package. I really don't want our tests to be at the whim of whatever obscure rule package managers have.

#14937 was already a case where we had to scrub all MTIME fields from gzip files for Debian.

@ghost
Copy link
Author

ghost commented Aug 29, 2017

It was /sbin/makepkg (not the build script) that output this warning which informed what the package will contain, if the package factually is created, which it was, so I recommend closing the issue.

The script /sbin/makepkg (not the Go code) was the source of the warning.

@dsnet
Copy link
Member

dsnet commented Aug 29, 2017

Since this is just a warning, and I believe the correct place to fix this in makepkg, and not the Go project. Am I to correct to believe that there is nothing that we can do here?

@ghost
Copy link
Author

ghost commented Aug 29, 2017

As dsnet inferred "issue6550.gz is an intentionally corrupted file used in the unit tests...".

bash-4.2# file issue6550.gz
issue6550.gz: gzip compressed data, extra field, encrypted
bash-4.2# 

Therefore, presuming the accuracy of that quoted statement, there's nothing to fix on the makepkg end; makepkg is doing its job WARNING of zero length files and also of the corrupt gzip file.

Am I to correct to believe that there is nothing that we can do here?

bash-4.2# grep -nr 6550 gzip
gzip/gunzip_test.go:415: func TestIssue6550(t *testing.T) {
gzip/gunzip_test.go:416:     f, err := os.Open("testdata/issue6550.gz")
gzip/gunzip_test.go:422:             t.Fatalf("NewReader(testdata/issue6550.gz): %v", err)
bash-4.2#

Seems that's the case.

@ghost ghost closed this as completed Aug 29, 2017
@golang golang locked and limited conversation to collaborators Sep 26, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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