Skip to content

regression test failed on rooted android/arm #27364

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

Closed
benshi001 opened this issue Aug 30, 2018 · 2 comments
Closed

regression test failed on rooted android/arm #27364

benshi001 opened this issue Aug 30, 2018 · 2 comments
Milestone

Comments

@benshi001
Copy link
Member

"ALL TESTS PASSED" on android/arm64 and non rooted android/arm. But there are failures on rooted android/arm.

SPREADTRUM\ben.shi@tj07598pcu:~/Desktop/go/src$ CC_FOR_TARGET=~/android/ndk-standalone-r17b/arm/bin/arm-linux-androideabi-gcc GOARCH=arm GOARM=7 ./androidtest.bash 
Building Go cmd/dist using /usr/lib/go-1.6.
Building Go toolchain1 using /usr/lib/go-1.6.
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 host, linux/amd64.
Building packages and commands for target, android/arm.
# Syncing test files to android device

real	0m24.585s
user	0m0.016s
sys	0m0.156s
4282 KB/s (2740335 bytes in 0.624s)
2018/08/30 08:35:08 removing /data/local/tmp/goroot/pkg/android_arm64


##### Testing packages.
ok  	archive/tar	1.848s
ok  	archive/zip	6.697s
ok  	bufio	1.650s
ok  	bytes	2.957s
ok  	compress/bzip2	1.205s
ok  	compress/flate	3.725s
ok  	compress/gzip	1.614s
ok  	compress/lzw	1.464s
ok  	compress/zlib	1.175s
ok  	container/heap	1.130s
ok  	container/list	1.247s
ok  	container/ring	1.242s
ok  	context	2.140s
ok  	crypto	1.188s
ok  	crypto/aes	1.185s
ok  	crypto/cipher	1.245s
ok  	crypto/des	1.216s
ok  	crypto/dsa	1.144s
ok  	crypto/ecdsa	1.816s
ok  	crypto/elliptic	1.620s
ok  	crypto/hmac	1.467s
ok  	crypto/internal/subtle	1.450s
ok  	crypto/md5	1.609s
ok  	crypto/rand	1.754s
ok  	crypto/rc4	1.624s
ok  	crypto/rsa	1.977s
ok  	crypto/sha1	1.316s
ok  	crypto/sha256	1.522s
ok  	crypto/sha512	1.537s
ok  	crypto/subtle	1.471s
ok  	crypto/tls	4.609s
ok  	crypto/x509	3.736s
ok  	database/sql	2.216s
ok  	database/sql/driver	1.147s
ok  	debug/dwarf	1.233s
ok  	debug/elf	1.171s
ok  	debug/gosym	1.147s
ok  	debug/macho	0.981s
ok  	debug/pe	1.529s
ok  	debug/plan9obj	1.198s
ok  	encoding/ascii85	1.194s
ok  	encoding/asn1	1.135s
ok  	encoding/base32	1.248s
ok  	encoding/base64	1.215s
ok  	encoding/binary	1.178s
ok  	encoding/csv	1.135s
ok  	encoding/gob	1.743s
ok  	encoding/hex	0.986s
ok  	encoding/json	3.844s
ok  	encoding/pem	1.792s
ok  	encoding/xml	1.746s
ok  	errors	1.337s
ok  	expvar	1.818s
ok  	flag	1.152s
ok  	fmt	1.473s
ok  	go/ast	1.502s
ok  	go/build	1.858s
ok  	go/constant	1.396s
ok  	go/doc	1.644s
ok  	go/format	1.350s
ok  	go/importer	2.019s
ok  	go/internal/gccgoimporter	1.440s
ok  	go/internal/gcimporter	2.125s
ok  	go/internal/srcimporter	4.026s
ok  	go/parser	1.508s
ok  	go/printer	2.369s
ok  	go/scanner	1.030s
ok  	go/token	1.371s
ok  	go/types	2.790s
ok  	hash	1.256s
ok  	hash/adler32	1.142s
ok  	hash/crc32	1.641s
ok  	hash/crc64	1.557s
ok  	hash/fnv	1.588s
ok  	html	1.110s
ok  	html/template	1.883s
ok  	image	1.779s
ok  	image/color	1.592s
ok  	image/draw	1.631s
ok  	image/gif	2.845s
ok  	image/jpeg	2.072s
ok  	image/png	1.717s
ok  	index/suffixarray	1.537s
ok  	internal/cpu	1.237s
ok  	internal/poll	1.258s
ok  	internal/singleflight	1.061s
ok  	internal/trace	4.499s
ok  	io	1.323s
ok  	io/ioutil	1.167s
ok  	log	1.184s
ok  	log/syslog	2.576s
ok  	math	1.268s
ok  	math/big	7.910s
ok  	math/bits	1.412s
ok  	math/cmplx	1.344s
ok  	math/rand	1.725s
ok  	mime	1.054s
ok  	mime/multipart	2.419s
ok  	mime/quotedprintable	1.334s
ok  	net	4.544s
ok  	net/http	10.546s
ok  	net/http/cgi	1.856s
ok  	net/http/cookiejar	2.373s
ok  	net/http/fcgi	2.279s
ok  	net/http/httptest	2.337s
ok  	net/http/httptrace	2.237s
ok  	net/http/httputil	2.430s
ok  	net/http/internal	1.183s
ok  	net/http/pprof	5.216s
ok  	net/internal/socktest	1.682s
ok  	net/mail	1.957s
ok  	net/rpc	2.946s
ok  	net/rpc/jsonrpc	2.686s
ok  	net/smtp	1.847s
ok  	net/textproto	1.292s
ok  	net/url	1.367s
ok  	os	2.725s
ok  	os/exec	3.911s
ok  	os/signal	4.587s
ok  	os/user	1.644s
ok  	path	0.962s
ok  	path/filepath	1.031s
ok  	reflect	3.556s
ok  	regexp	1.488s
ok  	regexp/syntax	2.186s
ok  	runtime	9.202s
ok  	runtime/debug	1.245s
ok  	runtime/internal/atomic	2.850s
ok  	runtime/internal/sys	1.439s
ok  	runtime/pprof	7.792s
ok  	runtime/pprof/internal/profile	1.359s
ok  	runtime/trace	4.427s
ok  	sort	1.482s
ok  	strconv	2.472s
ok  	strings	2.348s
ok  	sync	2.097s
ok  	sync/atomic	1.352s
go_android_exec: adb shell mkdir -p /data/local/tmp/syscall.test-13657
go_android_exec: adb push /tmp/go-build542677525/b979/syscall.test /data/local/tmp/syscall.test-13657/syscall.test-13657-tmp
3622 KB/s (2838542 bytes in 0.765s)
go_android_exec: adb shell cp '/data/local/tmp/syscall.test-13657/syscall.test-13657-tmp' '/data/local/tmp/syscall.test-13657/syscall.test-13657'
go_android_exec: adb shell rm '/data/local/tmp/syscall.test-13657/syscall.test-13657-tmp'
go_android_exec: adb shell export TMPDIR="/data/local/tmp/syscall.test-13657"; export GOROOT="/data/local/tmp/goroot"; export GOPATH="/data/local/tmp/gopath"; cd "/data/local/tmp/goroot/src/syscall"; '/data/local/tmp/syscall.test-13657/syscall.test-13657' -test.short=true -test.timeout=18m0s; echo -n exitcode=$?
--- FAIL: TestSyscallNoError (0.05s)
    syscall_linux_test.go:358: expected 4294967295 / 2 / 4294967294, got 0 / 0 / 0
FAIL
exitcode=1go_android_exec: adb shell rm -rf /data/local/tmp/syscall.test-13657
FAIL	syscall	1.698s
ok  	testing	2.132s
ok  	testing/quick	1.495s
ok  	text/scanner	1.171s
ok  	text/tabwriter	1.083s
ok  	text/template	2.028s
ok  	text/template/parse	1.393s
ok  	time	4.813s
ok  	unicode	1.002s
ok  	unicode/utf16	1.281s
ok  	unicode/utf8	1.355s
ok  	vendor/golang_org/x/crypto/chacha20poly1305	1.890s
ok  	vendor/golang_org/x/crypto/cryptobyte	1.113s
ok  	vendor/golang_org/x/crypto/curve25519	1.324s
ok  	vendor/golang_org/x/crypto/internal/chacha20	1.235s
ok  	vendor/golang_org/x/crypto/poly1305	1.110s
ok  	vendor/golang_org/x/net/dns/dnsmessage	1.522s
ok  	vendor/golang_org/x/net/http/httpguts	1.194s
ok  	vendor/golang_org/x/net/http/httpproxy	1.308s
ok  	vendor/golang_org/x/net/http2/hpack	1.211s
ok  	vendor/golang_org/x/net/idna	1.411s
ok  	vendor/golang_org/x/net/nettest	2.436s
ok  	vendor/golang_org/x/text/transform	1.372s
ok  	vendor/golang_org/x/text/unicode/norm	0.977s
ok  	cmd/addr2line	1.434s
ok  	cmd/api	1.832s
ok  	cmd/asm/internal/asm	4.156s
ok  	cmd/asm/internal/lex	1.317s
ok  	cmd/compile	2.896s
ok  	cmd/compile/internal/gc	3.462s
ok  	cmd/compile/internal/ssa	7.209s
ok  	cmd/compile/internal/syntax	1.371s
ok  	cmd/compile/internal/test	1.182s [no tests to run]
ok  	cmd/compile/internal/types	1.237s
ok  	cmd/cover	1.653s
ok  	cmd/doc	1.612s
ok  	cmd/fix	1.513s
ok  	cmd/go	3.766s
ok  	cmd/go/internal/cache	2.194s
ok  	cmd/go/internal/dirhash	1.476s
ok  	cmd/go/internal/generate	3.302s
ok  	cmd/go/internal/get	3.163s
ok  	cmd/go/internal/imports	1.782s
ok  	cmd/go/internal/load	2.303s
ok  	cmd/go/internal/modconv	5.113s
ok  	cmd/go/internal/modfetch	4.865s
ok  	cmd/go/internal/modfetch/codehost	2.551s
ok  	cmd/go/internal/modfile	1.120s
ok  	cmd/go/internal/modload	4.184s
ok  	cmd/go/internal/module	1.296s
ok  	cmd/go/internal/mvs	2.047s
ok  	cmd/go/internal/par	1.625s
ok  	cmd/go/internal/search	1.698s
ok  	cmd/go/internal/semver	1.433s
ok  	cmd/go/internal/txtar	1.369s
ok  	cmd/go/internal/web2	2.703s
ok  	cmd/go/internal/work	2.089s
ok  	cmd/gofmt	1.885s
ok  	cmd/internal/buildid	2.396s
ok  	cmd/internal/dwarf	1.213s
ok  	cmd/internal/edit	1.178s
ok  	cmd/internal/goobj	1.191s
ok  	cmd/internal/obj	1.117s
ok  	cmd/internal/obj/arm64	1.405s
ok  	cmd/internal/obj/x86	1.643s
ok  	cmd/internal/objabi	1.460s
ok  	cmd/internal/src	1.346s
ok  	cmd/internal/test2json	1.443s
ok  	cmd/link	1.580s
ok  	cmd/link/internal/ld	2.142s
ok  	cmd/link/internal/sym	1.225s
ok  	cmd/nm	2.157s
ok  	cmd/objdump	2.169s
ok  	cmd/pack	1.613s
ok  	cmd/trace	3.881s
ok  	cmd/vendor/github.com/google/pprof/internal/binutils	2.986s
ok  	cmd/vendor/github.com/google/pprof/internal/driver	4.956s
ok  	cmd/vendor/github.com/google/pprof/internal/elfexec	1.589s
ok  	cmd/vendor/github.com/google/pprof/internal/graph	1.621s
ok  	cmd/vendor/github.com/google/pprof/internal/measurement	1.408s
ok  	cmd/vendor/github.com/google/pprof/internal/report	3.724s
ok  	cmd/vendor/github.com/google/pprof/internal/symbolizer	3.166s
ok  	cmd/vendor/github.com/google/pprof/internal/symbolz	2.805s
ok  	cmd/vendor/github.com/google/pprof/profile	1.954s
ok  	cmd/vendor/github.com/ianlancetaylor/demangle	1.560s
ok  	cmd/vendor/golang.org/x/arch/arm/armasm	1.591s
ok  	cmd/vendor/golang.org/x/arch/arm64/arm64asm	1.798s
ok  	cmd/vendor/golang.org/x/arch/ppc64/ppc64asm	1.355s
ok  	cmd/vendor/golang.org/x/arch/x86/x86asm	1.650s
ok  	cmd/vendor/golang.org/x/crypto/ssh/terminal	1.263s
ok  	cmd/vendor/golang.org/x/sys/unix	1.618s
ok  	cmd/vet	2.148s
ok  	cmd/vet/internal/cfg	1.312s
2018/08/30 16:38:14 Failed: exit status 1
@benshi001 benshi001 added this to the Go1.12 milestone Aug 30, 2018
@benshi001
Copy link
Member Author

This is a bug of the syscall geteuid, with the following test program.

#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
int main()
{
	printf("%d\n", geteuid());
	return 0;
}

I did

  1. build it with android NDK r16b, then a.out generated
  2. root my phone, and push it /data/local/tmp
  3. chown other:other a.out
  4. chmod a+s a.out
  5. run a.out
  6. still got 0 printed

I can not find a formal link about this android issue. But the above result is true on my rooted nexus5/android 8.1/

@benshi001 benshi001 self-assigned this Aug 30, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/132175 mentions this issue: syscall: skip an inproper on rooted android/arm

@golang golang locked and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants