Diff of the two buildlogs: -- --- b1/build.log 2024-12-05 18:16:23.490853364 +0000 +++ b2/build.log 2024-12-05 18:43:27.373021427 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Thu Dec 5 06:07:54 -12 2024 -I: pbuilder-time-stamp: 1733422074 +I: Current time: Fri Dec 6 08:16:45 +14 2024 +I: pbuilder-time-stamp: 1733422605 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -28,52 +28,84 @@ dpkg-source: info: applying 246.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/21755/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/D01_modify_environment starting +debug: Running on cbxi4a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Dec 5 18:18 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="32" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.32(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='1d54d10433394deab844a4072d4e8b6c' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='21755' - PS1='# ' - PS2='> ' + INVOCATION_ID=3082cda8d43340f195f4e4e5fd792a29 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=23215 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Z0F0Wc3X/pbuilderrc_L4ob --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Z0F0Wc3X/b1 --logfile b1/build.log golang-github-rogpeppe-go-internal_1.12.0-3.dsc' - SUDO_GID='113' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Z0F0Wc3X/pbuilderrc_5LlE --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Z0F0Wc3X/b2 --logfile b2/build.log golang-github-rogpeppe-go-internal_1.12.0-3.dsc' + SUDO_GID=113 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt64c 6.1.0-28-arm64 #1 SMP Debian 6.1.119-1 (2024-11-22) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-23-armmp #1 SMP Debian 6.1.99-1 (2024-07-15) armv7l GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/21755/tmp/hooks/D02_print_environment finished +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -167,7 +199,7 @@ Get: 44 http://deb.debian.org/debian trixie/main armhf golang-golang-x-net-dev all 1:0.27.0-1 [898 kB] Get: 45 http://deb.debian.org/debian trixie/main armhf golang-golang-x-sync-dev all 0.7.0-1 [19.0 kB] Get: 46 http://deb.debian.org/debian trixie/main armhf golang-golang-x-tools-dev all 1:0.23.0+ds-1 [1593 kB] -Fetched 72.3 MB in 3s (21.0 MB/s) +Fetched 72.3 MB in 12s (6058 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package sensible-utils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19684 files and directories currently installed.) @@ -373,7 +405,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../golang-github-rogpeppe-go-internal_1.12.0-3_source.changes +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../golang-github-rogpeppe-go-internal_1.12.0-3_source.changes dpkg-buildpackage: info: source package golang-github-rogpeppe-go-internal dpkg-buildpackage: info: source version 1.12.0-3 dpkg-buildpackage: info: source distribution unstable @@ -391,18 +427,18 @@ dh_autoreconf -O--builddirectory=_build -O--buildsystem=golang dh_auto_configure -O--builddirectory=_build -O--buildsystem=golang dh_auto_build -O--builddirectory=_build -O--buildsystem=golang - cd _build && go install -trimpath -v -p 3 github.com/rogpeppe/go-internal/cache github.com/rogpeppe/go-internal/cmd/testscript github.com/rogpeppe/go-internal/cmd/txtar-addmod github.com/rogpeppe/go-internal/cmd/txtar-c github.com/rogpeppe/go-internal/cmd/txtar-goproxy github.com/rogpeppe/go-internal/cmd/txtar-x github.com/rogpeppe/go-internal/diff github.com/rogpeppe/go-internal/dirhash github.com/rogpeppe/go-internal/fmtsort github.com/rogpeppe/go-internal/goproxytest github.com/rogpeppe/go-internal/gotooltest github.com/rogpeppe/go-internal/imports github.com/rogpeppe/go-internal/internal/misspell github.com/rogpeppe/go-internal/internal/os/execpath github.com/rogpeppe/go-internal/internal/syscall/windows github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll github.com/rogpeppe/go-internal/lockedfile github.com/rogpeppe/go-internal/lockedfile/internal/filelock github.com/rogpeppe/go-internal/modfile github.com/rogpeppe/go-internal/module github.com/rogpeppe/go-internal/par github.com/rogpeppe/go-internal/renameio github.com/rogpeppe/go-internal/robustio github.com/rogpeppe/go-internal/semver github.com/rogpeppe/go-internal/testenv github.com/rogpeppe/go-internal/testscript github.com/rogpeppe/go-internal/testscript/internal/pty github.com/rogpeppe/go-internal/txtar + cd _build && go install -trimpath -v -p 4 github.com/rogpeppe/go-internal/cache github.com/rogpeppe/go-internal/cmd/testscript github.com/rogpeppe/go-internal/cmd/txtar-addmod github.com/rogpeppe/go-internal/cmd/txtar-c github.com/rogpeppe/go-internal/cmd/txtar-goproxy github.com/rogpeppe/go-internal/cmd/txtar-x github.com/rogpeppe/go-internal/diff github.com/rogpeppe/go-internal/dirhash github.com/rogpeppe/go-internal/fmtsort github.com/rogpeppe/go-internal/goproxytest github.com/rogpeppe/go-internal/gotooltest github.com/rogpeppe/go-internal/imports github.com/rogpeppe/go-internal/internal/misspell github.com/rogpeppe/go-internal/internal/os/execpath github.com/rogpeppe/go-internal/internal/syscall/windows github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll github.com/rogpeppe/go-internal/lockedfile github.com/rogpeppe/go-internal/lockedfile/internal/filelock github.com/rogpeppe/go-internal/modfile github.com/rogpeppe/go-internal/module github.com/rogpeppe/go-internal/par github.com/rogpeppe/go-internal/renameio github.com/rogpeppe/go-internal/robustio github.com/rogpeppe/go-internal/semver github.com/rogpeppe/go-internal/testenv github.com/rogpeppe/go-internal/testscript github.com/rogpeppe/go-internal/testscript/internal/pty github.com/rogpeppe/go-internal/txtar internal/goarch internal/unsafeheader internal/byteorder internal/cpu -internal/abi -internal/chacha8rand -internal/bytealg internal/coverage/rtcov +internal/abi internal/godebugs +internal/chacha8rand internal/goexperiment internal/goos +internal/bytealg internal/profilerecord internal/runtime/atomic internal/runtime/syscall @@ -413,7 +449,6 @@ sync/atomic unicode internal/runtime/exithook -runtime unicode/utf8 math/bits crypto/internal/alias @@ -428,6 +463,7 @@ unicode/utf16 internal/nettrace container/list +runtime vendor/golang.org/x/crypto/cryptobyte/asn1 vendor/golang.org/x/crypto/internal/alias github.com/rogpeppe/go-internal/internal/misspell @@ -437,13 +473,15 @@ github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll internal/reflectlite crypto/subtle -sync iter +sync slices internal/weak maps -internal/testlog internal/bisect +internal/singleflight +internal/testlog +runtime/cgo errors sort io @@ -453,10 +491,10 @@ internal/oserror path internal/godebug -crypto crypto/cipher -reflect syscall +crypto +reflect crypto/internal/boring crypto/sha256 strings @@ -466,29 +504,43 @@ time internal/syscall/unix internal/syscall/execenv -github.com/rogpeppe/go-internal/par regexp/syntax +github.com/rogpeppe/go-internal/par +golang.org/x/mod/semver +vendor/golang.org/x/net/dns/dnsmessage +regexp +math/rand/v2 io/fs +internal/fmtsort internal/poll internal/filepathlite -regexp -internal/fmtsort -os encoding/binary -encoding/base64 -golang.org/x/mod/semver context -vendor/golang.org/x/net/dns/dnsmessage -internal/singleflight -math/rand/v2 +internal/concurrent +unique +crypto/internal/randutil +crypto/aes +os +net/netip +crypto/des +encoding/base64 +crypto/internal/edwards25519/field +crypto/internal/nistec/fiat +crypto/sha512 +crypto/internal/edwards25519 +crypto/hmac +vendor/golang.org/x/crypto/chacha20 +vendor/golang.org/x/crypto/internal/poly1305 +vendor/golang.org/x/crypto/hkdf fmt github.com/rogpeppe/go-internal/lockedfile/internal/filelock path/filepath golang.org/x/mod/internal/lazyregexp -internal/concurrent -unique -runtime/cgo -net/netip +net +vendor/golang.org/x/crypto/chacha20poly1305 +vendor/golang.org/x/sys/cpu +vendor/golang.org/x/crypto/sha3 +crypto/md5 encoding/hex github.com/rogpeppe/go-internal/lockedfile log @@ -496,100 +548,84 @@ github.com/rogpeppe/go-internal/cache compress/flate encoding/json -archive/zip golang.org/x/mod/module golang.org/x/tools/txtar -compress/gzip -crypto/internal/randutil math/big -crypto/aes -crypto/des -crypto/internal/edwards25519/field -crypto/internal/nistec/fiat +archive/zip +compress/gzip +crypto/internal/nistec +crypto/rc4 +crypto/sha1 +encoding/pem +net/url +crypto/ecdh +vendor/golang.org/x/text/transform crypto/rand +crypto/elliptic crypto/internal/bigmod -crypto/internal/nistec crypto/internal/boring/bbig -crypto/sha512 encoding/asn1 -crypto/ecdh -crypto/elliptic -vendor/golang.org/x/crypto/cryptobyte -crypto/internal/edwards25519 -crypto/ecdsa -crypto/hmac -vendor/golang.org/x/crypto/chacha20 crypto/ed25519 -vendor/golang.org/x/crypto/internal/poly1305 -vendor/golang.org/x/crypto/hkdf -vendor/golang.org/x/sys/cpu -vendor/golang.org/x/crypto/chacha20poly1305 -vendor/golang.org/x/crypto/sha3 crypto/internal/hpke -crypto/md5 crypto/internal/mlkem768 -crypto/rc4 crypto/rsa -crypto/sha1 crypto/dsa +vendor/golang.org/x/crypto/cryptobyte crypto/x509/pkix -encoding/pem -net/url -vendor/golang.org/x/text/transform vendor/golang.org/x/text/unicode/bidi -net vendor/golang.org/x/text/unicode/norm +crypto/ecdsa vendor/golang.org/x/text/secure/bidirule vendor/golang.org/x/net/http2/hpack mime mime/quotedprintable -vendor/golang.org/x/net/idna net/http/internal net/http/internal/ascii github.com/rogpeppe/go-internal/diff io/ioutil -github.com/rogpeppe/go-internal/imports os/exec +vendor/golang.org/x/net/idna +github.com/rogpeppe/go-internal/imports internal/sysinfo runtime/debug -runtime/trace github.com/rogpeppe/go-internal/internal/os/execpath -github.com/rogpeppe/go-internal/testscript/internal/pty +runtime/trace +crypto/x509 +net/textproto testing +mime/multipart +vendor/golang.org/x/net/http/httpguts +vendor/golang.org/x/net/http/httpproxy +github.com/rogpeppe/go-internal/testscript/internal/pty github.com/rogpeppe/go-internal/txtar go/token +go/build/constraint go/scanner +go/doc/comment go/ast github.com/rogpeppe/go-internal/testenv -go/build/constraint -go/doc/comment internal/lazyregexp -go/internal/typeparams -go/parser -go/doc internal/buildcfg internal/goroot +crypto/tls github.com/rogpeppe/go-internal/cmd/txtar-addmod -go/build github.com/rogpeppe/go-internal/cmd/txtar-c -crypto/x509 -net/textproto -vendor/golang.org/x/net/http/httpproxy -vendor/golang.org/x/net/http/httpguts -mime/multipart +go/doc +go/internal/typeparams +go/parser github.com/rogpeppe/go-internal/cmd/txtar-x -github.com/rogpeppe/go-internal/testscript -crypto/tls github.com/rogpeppe/go-internal/dirhash github.com/rogpeppe/go-internal/fmtsort -github.com/rogpeppe/go-internal/gotooltest golang.org/x/mod/modfile github.com/rogpeppe/go-internal/module github.com/rogpeppe/go-internal/renameio github.com/rogpeppe/go-internal/robustio +go/build github.com/rogpeppe/go-internal/semver github.com/rogpeppe/go-internal/modfile +github.com/rogpeppe/go-internal/testscript net/http/httptrace +github.com/rogpeppe/go-internal/gotooltest net/http github.com/rogpeppe/go-internal/goproxytest github.com/rogpeppe/go-internal/cmd/testscript @@ -600,26 +636,26 @@ patching file _build/src/github.com/rogpeppe/go-internal/testscript/testscript.go Hunk #1 succeeded at 1155 (offset 57 lines). GOPROXY= dh_auto_test - cd _build && go test -vet=off -v -p 3 github.com/rogpeppe/go-internal/cache github.com/rogpeppe/go-internal/cmd/testscript github.com/rogpeppe/go-internal/cmd/txtar-addmod github.com/rogpeppe/go-internal/cmd/txtar-c github.com/rogpeppe/go-internal/cmd/txtar-goproxy github.com/rogpeppe/go-internal/cmd/txtar-x github.com/rogpeppe/go-internal/diff github.com/rogpeppe/go-internal/dirhash github.com/rogpeppe/go-internal/fmtsort github.com/rogpeppe/go-internal/goproxytest github.com/rogpeppe/go-internal/gotooltest github.com/rogpeppe/go-internal/imports github.com/rogpeppe/go-internal/internal/misspell github.com/rogpeppe/go-internal/internal/os/execpath github.com/rogpeppe/go-internal/internal/syscall/windows github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll github.com/rogpeppe/go-internal/lockedfile github.com/rogpeppe/go-internal/lockedfile/internal/filelock github.com/rogpeppe/go-internal/modfile github.com/rogpeppe/go-internal/module github.com/rogpeppe/go-internal/par github.com/rogpeppe/go-internal/renameio github.com/rogpeppe/go-internal/robustio github.com/rogpeppe/go-internal/semver github.com/rogpeppe/go-internal/testenv github.com/rogpeppe/go-internal/testscript github.com/rogpeppe/go-internal/testscript/internal/pty github.com/rogpeppe/go-internal/txtar + cd _build && go test -vet=off -v -p 4 github.com/rogpeppe/go-internal/cache github.com/rogpeppe/go-internal/cmd/testscript github.com/rogpeppe/go-internal/cmd/txtar-addmod github.com/rogpeppe/go-internal/cmd/txtar-c github.com/rogpeppe/go-internal/cmd/txtar-goproxy github.com/rogpeppe/go-internal/cmd/txtar-x github.com/rogpeppe/go-internal/diff github.com/rogpeppe/go-internal/dirhash github.com/rogpeppe/go-internal/fmtsort github.com/rogpeppe/go-internal/goproxytest github.com/rogpeppe/go-internal/gotooltest github.com/rogpeppe/go-internal/imports github.com/rogpeppe/go-internal/internal/misspell github.com/rogpeppe/go-internal/internal/os/execpath github.com/rogpeppe/go-internal/internal/syscall/windows github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll github.com/rogpeppe/go-internal/lockedfile github.com/rogpeppe/go-internal/lockedfile/internal/filelock github.com/rogpeppe/go-internal/modfile github.com/rogpeppe/go-internal/module github.com/rogpeppe/go-internal/par github.com/rogpeppe/go-internal/renameio github.com/rogpeppe/go-internal/robustio github.com/rogpeppe/go-internal/semver github.com/rogpeppe/go-internal/testenv github.com/rogpeppe/go-internal/testscript github.com/rogpeppe/go-internal/testscript/internal/pty github.com/rogpeppe/go-internal/txtar === RUN TestBasic ---- PASS: TestBasic (0.08s) +--- PASS: TestBasic (0.54s) === RUN TestGrowth ---- PASS: TestGrowth (4.67s) +--- PASS: TestGrowth (50.76s) === RUN TestVerifyPanic cache_test.go:138: go: internal cache error: cache verify failed: id=0100000000000000000000000000000000000000000000000000000000000000 changed:<<< >>> old: cb8379ac2098aa165029e3938a51da0bcecfc008fd6795f401178647f96c5b34 3 new: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad 3 ---- PASS: TestVerifyPanic (0.08s) +--- PASS: TestVerifyPanic (0.73s) === RUN TestCacheTrim ---- PASS: TestCacheTrim (0.10s) +--- PASS: TestCacheTrim (1.04s) === RUN TestHash --- PASS: TestHash (0.00s) === RUN TestHashFile --- PASS: TestHashFile (0.00s) PASS -ok github.com/rogpeppe/go-internal/cache 4.939s +ok github.com/rogpeppe/go-internal/cache 53.200s === RUN TestScripts === RUN TestScripts/continue === PAUSE TestScripts/continue @@ -645,13 +681,13 @@ === PAUSE TestScripts/update === RUN TestScripts/work === PAUSE TestScripts/work -=== CONT TestScripts/continue === CONT TestScripts/nogo -=== CONT TestScripts/skip === CONT TestScripts/env_var_with_go +=== CONT TestScripts/help +=== CONT TestScripts/error === NAME TestScripts/nogo testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -671,15 +707,15 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # should support skip (0.000s) + # should support skip (0.002s) > unquote file.txt # We can't just set PATH to empty because we need the part of it that - # contains the command names, so use a special builtin instead. (0.018s) + # contains the command names, so use a special builtin instead. (0.107s) > dropgofrompath > ! testscript -v file.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -690,18 +726,171 @@ exe= > go env - FAIL: $WORK/.tmp/testscript1789443648/file.txt/script.txtar:1: unknown command "go" + FAIL: $WORK/.tmp/testscript620466970/file.txt/script.txtar:1: unknown command "go" [stderr] - error running file.txt in $WORK/.tmp/testscript1789443648/file.txt + error running file.txt in $WORK/.tmp/testscript620466970/file.txt [exit status 1] > stdout 'unknown command "go"' > stderr 'error running file.txt in' PASS +=== CONT TestScripts/continue +=== NAME TestScripts/help + testscript.go:558: WORK=$WORK + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + GOTRACEBACK=system + HOME=/no-home + TMPDIR=$WORK/.tmp + devnull=/dev/null + /=/ + :=: + $=$ + exe= + GOPATH=$WORK/.gopath + CCACHE_DISABLE=1 + GOARCH=arm + GOOS=linux + GOROOT=/usr/lib/go-1.23 + GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build + GOPROXY=https://proxy.golang.org,direct + goversion=1.23 + GOINTERNALMODPATH=. + GONOSUMDB=* + + # Simply sanity check on help output (0.140s) + > ! testscript -help + [stderr] + The testscript command runs github.com/rogpeppe/go-internal/testscript scripts + in a fresh temporary work directory tree. + + Usage: + testscript [-v] [-e VAR[=value]]... [-u] [-continue] [-work] files... + + The testscript command is designed to make it easy to create self-contained + reproductions of command sequences. + + Each file is opened as a script and run as described in the documentation for + github.com/rogpeppe/go-internal/testscript. The special filename "-" is + interpreted as the standard input. + + As a special case, supporting files/directories in the .gomodproxy subdirectory + will be served via a github.com/rogpeppe/go-internal/goproxytest server which + is available to each script via the GOPROXY environment variable. The contents + of the .gomodproxy subdirectory are not available to the script except via the + proxy server. See the documentation for + github.com/rogpeppe/go-internal/goproxytest for details on the format of these + files/directories. + + Environment variables can be passed through to each script with the -e flag, + where VAR is the name of the variable. Variables override testscript-defined + values, with the exception of WORK which cannot be overridden. The -e flag can + appear multiple times to specify multiple variables. + + The -u flag specifies that if a cmp command within a testscript fails and its + second argument refers to a file inside the testscript file, the command will + succeed and the testscript file will be updated to reflect the actual content. + As such, this is the cmd/testcript equivalent of + testscript.Params.UpdateScripts. + + The -continue flag specifies that if an error occurs, the script will continue running. + All errors will be printed and the exit status will be false. + + The -work flag prints the temporary work directory path before running each + script, and does not remove that directory when testscript exits. + + Examples + ======== + + The following example, fruit.txtar, shows a simple reproduction that includes + .gomodproxy supporting files: + + go get -m fruit.com + go list fruit.com/... + stdout 'fruit.com/fruit' + + -- go.mod -- + module mod + + -- .gomodproxy/fruit.com_v1.0.0/.mod -- + module fruit.com + + -- .gomodproxy/fruit.com_v1.0.0/.info -- + {"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"} + + -- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go -- + package fruit + + const Name = "Apple" + + Running testscript -v fruit.txtar we get: + + ... + > go get -m fruit.com + [stderr] + go: finding fruit.com v1.0.0 + + > go list fruit.com/... + [stdout] + fruit.com/fruit + + [stderr] + go: downloading fruit.com v1.0.0 + + > stdout 'fruit.com/fruit' + PASS + + + The following example, goimports.txtar, shows a simple reproduction involving + goimports: + + go install golang.org/x/tools/cmd/goimports + + # check goimports help information + exec goimports -d main.go + stdout 'import "math"' + + -- go.mod -- + module mod + + require golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 + + -- main.go -- + package mod + + const Pi = math.Pi + + Running testscript -v goimports.txtar we get: + + ... + > go install golang.org/x/tools/cmd/goimports + [stderr] + go: finding golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 + go: downloading golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 + + # check goimports help information (0.015s) + > exec goimports -d main.go + [stdout] + diff -u main.go.orig main.go + --- main.go.orig 2019-01-08 16:03:35.861907738 +0000 + +++ main.go 2019-01-08 16:03:35.861907738 +0000 + @@ -1,3 +1,5 @@ + package mod + + +import "math" + + + const Pi = math.Pi + > stdout 'import "math"' + PASS + [exit status 2] + > ! stdout .+ + > stderr 'The testscript command' + > stderr 'Examples' + PASS + === CONT TestScripts/env_var_no_go testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -723,18 +912,18 @@ # Test passing environment variables to scripts with no go command on PATH # - # This is the counterpart to env_var_with_go.txt (0.001s) + # This is the counterpart to env_var_with_go.txt (0.007s) > unquote noproxy.txt > unquote withproxy.txt > dropgofrompath > env BANANA=banana > env GOPATH=$WORK/ourgopath > env GOPROXY= - # no GOPROXY, no pass-through, no proxy (0.018s) + # no GOPROXY, no pass-through, no proxy (0.181s) > testscript -v noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -755,11 +944,11 @@ > stdout ^GOPATH=$ > stdout ^GOPROXY=$ > ! stderr .+ - # no GOPROXY, no pass-through, with proxy (0.027s) + # no GOPROXY, no pass-through, with proxy (0.167s) > testscript -v withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -768,7 +957,7 @@ :=: $=$ exe= - GOPROXY=http://127.0.0.1:43505/mod + GOPROXY=http://127.0.0.1:35737/mod GONOSUMDB=* > env BANANA @@ -776,17 +965,17 @@ > env GOPATH GOPATH= > env GOPROXY - GOPROXY=http://127.0.0.1:43505/mod + GOPROXY=http://127.0.0.1:35737/mod PASS > stdout ^BANANA=$ > stdout ^GOPATH=$ > stdout ^GOPROXY=http://.*/mod$ > ! stderr .+ - # no GOPROXY, with pass-through, no proxy (0.040s) + # no GOPROXY, with pass-through, no proxy (0.110s) > testscript -v -e BANANA -e GOPATH -e GOPROXY noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -810,11 +999,11 @@ > stdout ^GOPATH=${WORK@R}[/\\]ourgopath$ > stdout ^GOPROXY=$ > ! stderr .+ - # no GOPROXY, with pass-through, with proxy (0.034s) + # no GOPROXY, with pass-through, with proxy (0.203s) > testscript -v -e BANANA -e GOPATH -e GOPROXY withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -840,11 +1029,11 @@ > stdout ^GOPROXY=$ > ! stderr .+ > setfilegoproxy $WORK/proxy - # with GOPROXY, no pass-through, no proxy (0.044s) + # with GOPROXY, no pass-through, no proxy (0.091s) > testscript -v noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -865,11 +1054,11 @@ > stdout ^GOPATH=$ > stdout ^GOPROXY=$ > ! stderr .+ - # with GOPROXY, no pass-through, with proxy (0.035s) + # with GOPROXY, no pass-through, with proxy (0.165s) > testscript -v withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -878,7 +1067,7 @@ :=: $=$ exe= - GOPROXY=http://127.0.0.1:44161/mod + GOPROXY=http://127.0.0.1:33669/mod GONOSUMDB=* > env BANANA @@ -886,17 +1075,17 @@ > env GOPATH GOPATH= > env GOPROXY - GOPROXY=http://127.0.0.1:44161/mod + GOPROXY=http://127.0.0.1:33669/mod PASS > stdout ^BANANA=$ > stdout ^GOPATH=$ > stdout ^GOPROXY=http://.*/mod$ > ! stderr .+ - # with GOPROXY, with pass-through, no proxy (0.045s) + # with GOPROXY, with pass-through, no proxy (0.124s) > testscript -v -e BANANA -e GOPATH -e GOPROXY noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -920,11 +1109,11 @@ > stdout ^GOPATH=${WORK@R}[/\\]ourgopath$ > stdout ^GOPROXY=$GOPROXY$ > ! stderr .+ - # with GOPROXY, with pass-through, with proxy (0.036s) + # with GOPROXY, with pass-through, with proxy (0.080s) > testscript -v -e BANANA -e GOPATH -e GOPROXY withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/sbin:/sbin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/sbin:/sbin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -954,7 +1143,7 @@ === CONT TestScripts/env_values === NAME TestScripts/continue testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -974,21 +1163,21 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # should support -continue (0.000s) + # should support -continue (0.001s) > unquote file.txt # Running with continue, the testscript command itself # should fail, but we should see the results of executing - # both commands. (0.700s) + # both commands. (4.559s) > ! testscript -continue file.txt [stdout] > grep banana in [in] apple - FAIL: $WORK/.tmp/testscript3434626692/file.txt/script.txtar:1: no match for `banana` found in in + FAIL: $WORK/.tmp/testscript1760519935/file.txt/script.txtar:1: no match for `banana` found in in > grep apple in [stderr] - error running file.txt in $WORK/.tmp/testscript3434626692/file.txt + error running file.txt in $WORK/.tmp/testscript1760519935/file.txt [exit status 1] > stdout 'grep banana in' @@ -996,10 +1185,54 @@ > stdout 'grep apple in' PASS +=== CONT TestScripts/skip +=== NAME TestScripts/env_values + testscript.go:558: WORK=$WORK + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + GOTRACEBACK=system + HOME=/no-home + TMPDIR=$WORK/.tmp + devnull=/dev/null + /=/ + :=: + $=$ + exe= + GOPATH=$WORK/.gopath + CCACHE_DISABLE=1 + GOARCH=arm + GOOS=linux + GOROOT=/usr/lib/go-1.23 + GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build + GOPROXY=https://proxy.golang.org,direct + goversion=1.23 + GOINTERNALMODPATH=. + GONOSUMDB=* + + # Test that passing env values, e.g. ENV1=val, works (0.010s) + > unquote test.txt + > env BLAH1= + > env BLAH2=junk + # Normal operation (3.306s) + > testscript -e BLAH1=rubbish -e BLAH2 test.txt + [stdout] + PASS + # It is an error to specify WORK. Note the error message + # appears on stdout because it is written to the log output + # of testscript, which has no concept of stderr. (1.186s) + > ! testscript -e BLAH1=rubbish -e BLAH2 -e WORK test.txt + [stdout] + FAIL: $WORK/.tmp/testscript2188644953/test.txt/script.txtar:0: cannot override WORK variable + [stderr] + error running test.txt in $WORK/.tmp/testscript2188644953/test.txt + + [exit status 1] + > stdout 'cannot override WORK variable' + PASS + === CONT TestScripts/work -=== NAME TestScripts/skip +=== NAME TestScripts/error testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1019,12 +1252,14 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # should support skip (0.709s) + # should support skip (0.001s) > unquote file.txt - > testscript -v file.txt + # stdin (4.754s) + > stdin file.txt + > ! testscript -v [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1042,19 +1277,50 @@ GOPROXY=https://proxy.golang.org,direct goversion=1.23 - > go version + > exec false + [exit status 1] + FAIL: $WORK/.tmp/testscript1009946897/-/script.txtar:1: unexpected command failure + [stderr] + error running in $WORK/.tmp/testscript1009946897/- + + [exit status 1] + > stderr 'error running in' + # file-based (1.111s) + > ! testscript -v file.txt [stdout] - go version go1.23.3 linux/arm + WORK=$WORK + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + GOTRACEBACK=system + HOME=/no-home + TMPDIR=$WORK/.tmp + devnull=/dev/null + /=/ + :=: + $=$ + exe= + GOPATH=$WORK/.gopath + CCACHE_DISABLE=1 + GOARCH=arm + GOOS=linux + GOROOT=/usr/lib/go-1.23 + GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build + GOPROXY=https://proxy.golang.org,direct + goversion=1.23 - > skip - > stdout 'go version' - > ! stderr .+ + > exec false + [exit status 1] + FAIL: $WORK/.tmp/testscript1835361223/file.txt/script.txtar:1: unexpected command failure + [stderr] + error running file.txt in $WORK/.tmp/testscript1835361223/file.txt + + [exit status 1] + > stderr 'error running file.txt in' PASS === CONT TestScripts/update -=== NAME TestScripts/env_values +=== NAME TestScripts/skip testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1074,31 +1340,42 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # Test that passing env values, e.g. ENV1=val, works (0.000s) - > unquote test.txt - > env BLAH1= - > env BLAH2=junk - # Normal operation (0.416s) - > testscript -e BLAH1=rubbish -e BLAH2 test.txt + # should support skip (1.219s) + > unquote file.txt + > testscript -v file.txt [stdout] - PASS - # It is an error to specify WORK. Note the error message - # appears on stdout because it is written to the log output - # of testscript, which has no concept of stderr. (0.165s) - > ! testscript -e BLAH1=rubbish -e BLAH2 -e WORK test.txt + WORK=$WORK + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + GOTRACEBACK=system + HOME=/no-home + TMPDIR=$WORK/.tmp + devnull=/dev/null + /=/ + :=: + $=$ + exe= + GOPATH=$WORK/.gopath + CCACHE_DISABLE=1 + GOARCH=arm + GOOS=linux + GOROOT=/usr/lib/go-1.23 + GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build + GOPROXY=https://proxy.golang.org,direct + goversion=1.23 + + > go version [stdout] - FAIL: $WORK/.tmp/testscript2493962241/test.txt/script.txtar:0: cannot override WORK variable - [stderr] - error running test.txt in $WORK/.tmp/testscript2493962241/test.txt + go version go1.23.3 linux/arm - [exit status 1] - > stdout 'cannot override WORK variable' + > skip + > stdout 'go version' + > ! stderr .+ PASS === CONT TestScripts/simple === NAME TestScripts/work testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1124,12 +1401,12 @@ # # This test also covers the use of multiple scripts which share # the same basename, ensuring that the naming of the directories - # within the working directory. (0.210s) + # within the working directory. (1.238s) > unquote file.txt dir/file.txt > testscript -v -work file.txt dir/file.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1150,7 +1427,7 @@ > exec true PASS WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1171,9 +1448,9 @@ > exec true PASS [stderr] - temporary work directory: $WORK/.tmp/testscript1922186401 - temporary work directory for file.txt: $WORK/.tmp/go-test-script3790203277/script-script - temporary work directory for dir/file.txt: $WORK/.tmp/go-test-script4267700338/script-script + temporary work directory: $WORK/.tmp/testscript2146003560 + temporary work directory for file.txt: $WORK/.tmp/go-test-script2531830318/script-script + temporary work directory for dir/file.txt: $WORK/.tmp/go-test-script4081596254/script-script > stderr '^temporary work directory: \Q'$WORK'\E[/\\]\.tmp[/\\]' > stderr '^temporary work directory for file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]' > stderr '^temporary work directory for dir[/\\]file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]' @@ -1184,7 +1461,7 @@ === CONT TestScripts/noproxy === NAME TestScripts/update testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1204,9 +1481,9 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # should support the -update flag (0.001s) + # should support the -update flag (0.015s) > unquote in.txt res.txt - # Should be an error to use -u with only stdin (0.010s) + # Should be an error to use -u with only stdin (0.086s) > stdin in.txt > ! testscript -u [stderr] @@ -1214,18 +1491,18 @@ [exit status 1] > stderr 'cannot use -u when reading from stdin' # It is ok to use -u when reading from stdin and - # a regular file (0.251s) + # a regular file (1.294s) > testscript -u - in.txt [stdout] PASS PASS - $WORK/.tmp/testscript2843378267/in.txt/script.txtar updated + $WORK/.tmp/testscript493515982/in.txt/script.txtar updated > cmp in.txt res.txt PASS -=== CONT TestScripts/help +=== NAME TestScripts/simple testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1245,140 +1522,57 @@ GOINTERNALMODPATH=. GONOSUMDB=* - # Simply sanity check on help output (0.014s) - > ! testscript -help - [stderr] - The testscript command runs github.com/rogpeppe/go-internal/testscript scripts - in a fresh temporary work directory tree. - - Usage: - testscript [-v] [-e VAR[=value]]... [-u] [-continue] [-work] files... - - The testscript command is designed to make it easy to create self-contained - reproductions of command sequences. - - Each file is opened as a script and run as described in the documentation for - github.com/rogpeppe/go-internal/testscript. The special filename "-" is - interpreted as the standard input. - - As a special case, supporting files/directories in the .gomodproxy subdirectory - will be served via a github.com/rogpeppe/go-internal/goproxytest server which - is available to each script via the GOPROXY environment variable. The contents - of the .gomodproxy subdirectory are not available to the script except via the - proxy server. See the documentation for - github.com/rogpeppe/go-internal/goproxytest for details on the format of these - files/directories. - - Environment variables can be passed through to each script with the -e flag, - where VAR is the name of the variable. Variables override testscript-defined - values, with the exception of WORK which cannot be overridden. The -e flag can - appear multiple times to specify multiple variables. - - The -u flag specifies that if a cmp command within a testscript fails and its - second argument refers to a file inside the testscript file, the command will - succeed and the testscript file will be updated to reflect the actual content. - As such, this is the cmd/testcript equivalent of - testscript.Params.UpdateScripts. - - The -continue flag specifies that if an error occurs, the script will continue running. - All errors will be printed and the exit status will be false. - - The -work flag prints the temporary work directory path before running each - script, and does not remove that directory when testscript exits. - - Examples - ======== - - The following example, fruit.txtar, shows a simple reproduction that includes - .gomodproxy supporting files: - - go get -m fruit.com - go list fruit.com/... - stdout 'fruit.com/fruit' - - -- go.mod -- - module mod - - -- .gomodproxy/fruit.com_v1.0.0/.mod -- - module fruit.com - - -- .gomodproxy/fruit.com_v1.0.0/.info -- - {"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"} - - -- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go -- - package fruit - - const Name = "Apple" - - Running testscript -v fruit.txtar we get: - - ... - > go get -m fruit.com - [stderr] - go: finding fruit.com v1.0.0 - - > go list fruit.com/... - [stdout] - fruit.com/fruit - - [stderr] - go: downloading fruit.com v1.0.0 - - > stdout 'fruit.com/fruit' - PASS - - - The following example, goimports.txtar, shows a simple reproduction involving - goimports: - - go install golang.org/x/tools/cmd/goimports - - # check goimports help information - exec goimports -d main.go - stdout 'import "math"' - - -- go.mod -- - module mod - - require golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 - - -- main.go -- - package mod - - const Pi = math.Pi + # With .gomodproxy supporting files, any GOPROXY from the + # environment should be overridden by the test proxy. (1.792s) + > env GOPROXY=0.1.2.3 + > unquote file.txt + > testscript -v file.txt + [stdout] + WORK=$WORK + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + GOTRACEBACK=system + HOME=/no-home + TMPDIR=$WORK/.tmp + devnull=/dev/null + /=/ + :=: + $=$ + exe= + GOPATH=$WORK/.gopath + CCACHE_DISABLE=1 + GOARCH=arm + GOOS=linux + GOROOT=/usr/lib/go-1.23 + GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build + GOPROXY=http://127.0.0.1:33735/mod + goversion=1.23 + GONOSUMDB=* - Running testscript -v goimports.txtar we get: + > go get -d fruit.com + [stderr] + go: -d flag is deprecated. -d=true is a no-op + go: downloading fruit.com v1.0.0 - ... - > go install golang.org/x/tools/cmd/goimports - [stderr] - go: finding golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 - go: downloading golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 + > go list -m + [stdout] + example.com/mod - # check goimports help information (0.015s) - > exec goimports -d main.go - [stdout] - diff -u main.go.orig main.go - --- main.go.orig 2019-01-08 16:03:35.861907738 +0000 - +++ main.go 2019-01-08 16:03:35.861907738 +0000 - @@ -1,3 +1,5 @@ - package mod + > stdout 'example.com/mod' + > go list fruit.com/... + [stdout] + fruit.com/coretest + fruit.com/fruit - +import "math" - + - const Pi = math.Pi - > stdout 'import "math"' - PASS - [exit status 2] - > ! stdout .+ - > stderr 'The testscript command' - > stderr 'Examples' + > stdout 'fruit.com/fruit' + > stdout 'fruit.com/coretest' + PASS + > stdout 'example.com/mod' + > ! stderr .+ PASS -=== CONT TestScripts/error === NAME TestScripts/noproxy testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1401,13 +1595,13 @@ # With no .gomodproxy supporting files, we use the GOPROXY from # the environment. # Note that Go 1.21 started quoting with single quotes in "go env", - # where older versions used double quotes. (0.242s) + # where older versions used double quotes. (1.201s) > env GOPROXY=0.1.2.3 > unquote file.txt > testscript -v file.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1469,173 +1663,16 @@ CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' - GOGCCFLAGS='-fPIC -marm -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=$WORK/.tmp/go-build4221644241=/tmp/go-build -gno-record-gcc-switches' + GOGCCFLAGS='-fPIC -marm -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=$WORK/.tmp/go-build3550357794=/tmp/go-build -gno-record-gcc-switches' > [!windows] stdout '^GOPROXY=[''"]0.1.2.3[''"]$' > [windows] stdout '^set GOPROXY=0.1.2.3$' PASS PASS -=== NAME TestScripts/simple - testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - GOTRACEBACK=system - HOME=/no-home - TMPDIR=$WORK/.tmp - devnull=/dev/null - /=/ - :=: - $=$ - exe= - GOPATH=$WORK/.gopath - CCACHE_DISABLE=1 - GOARCH=arm - GOOS=linux - GOROOT=/usr/lib/go-1.23 - GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=https://proxy.golang.org,direct - goversion=1.23 - GOINTERNALMODPATH=. - GONOSUMDB=* - - # With .gomodproxy supporting files, any GOPROXY from the - # environment should be overridden by the test proxy. (0.311s) - > env GOPROXY=0.1.2.3 - > unquote file.txt - > testscript -v file.txt - [stdout] - WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - GOTRACEBACK=system - HOME=/no-home - TMPDIR=$WORK/.tmp - devnull=/dev/null - /=/ - :=: - $=$ - exe= - GOPATH=$WORK/.gopath - CCACHE_DISABLE=1 - GOARCH=arm - GOOS=linux - GOROOT=/usr/lib/go-1.23 - GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:40635/mod - goversion=1.23 - GONOSUMDB=* - - > go get -d fruit.com - [stderr] - go: -d flag is deprecated. -d=true is a no-op - go: downloading fruit.com v1.0.0 - - > go list -m - [stdout] - example.com/mod - - > stdout 'example.com/mod' - > go list fruit.com/... - [stdout] - fruit.com/coretest - fruit.com/fruit - - > stdout 'fruit.com/fruit' - > stdout 'fruit.com/coretest' - PASS - > stdout 'example.com/mod' - > ! stderr .+ - PASS - -=== NAME TestScripts/error - testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - GOTRACEBACK=system - HOME=/no-home - TMPDIR=$WORK/.tmp - devnull=/dev/null - /=/ - :=: - $=$ - exe= - GOPATH=$WORK/.gopath - CCACHE_DISABLE=1 - GOARCH=arm - GOOS=linux - GOROOT=/usr/lib/go-1.23 - GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=https://proxy.golang.org,direct - goversion=1.23 - GOINTERNALMODPATH=. - GONOSUMDB=* - - # should support skip (0.000s) - > unquote file.txt - # stdin (0.179s) - > stdin file.txt - > ! testscript -v - [stdout] - WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - GOTRACEBACK=system - HOME=/no-home - TMPDIR=$WORK/.tmp - devnull=/dev/null - /=/ - :=: - $=$ - exe= - GOPATH=$WORK/.gopath - CCACHE_DISABLE=1 - GOARCH=arm - GOOS=linux - GOROOT=/usr/lib/go-1.23 - GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=https://proxy.golang.org,direct - goversion=1.23 - - > exec false - [exit status 1] - FAIL: $WORK/.tmp/testscript3961158539/-/script.txtar:1: unexpected command failure - [stderr] - error running in $WORK/.tmp/testscript3961158539/- - - [exit status 1] - > stderr 'error running in' - # file-based (0.143s) - > ! testscript -v file.txt - [stdout] - WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - GOTRACEBACK=system - HOME=/no-home - TMPDIR=$WORK/.tmp - devnull=/dev/null - /=/ - :=: - $=$ - exe= - GOPATH=$WORK/.gopath - CCACHE_DISABLE=1 - GOARCH=arm - GOOS=linux - GOROOT=/usr/lib/go-1.23 - GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=https://proxy.golang.org,direct - goversion=1.23 - - > exec false - [exit status 1] - FAIL: $WORK/.tmp/testscript742516592/file.txt/script.txtar:1: unexpected command failure - [stderr] - error running file.txt in $WORK/.tmp/testscript742516592/file.txt - - [exit status 1] - > stderr 'error running file.txt in' - PASS - === NAME TestScripts/env_var_with_go testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1661,14 +1698,14 @@ # the string literal $WORK because testscript rewrites the actual directory # to $WORK. Hence we don't want to expand this script's $WORK in such a comparison. # - # This is the counterpart to env_var_no_go.txt (0.001s) + # This is the counterpart to env_var_no_go.txt (0.013s) > unquote noproxy.txt > unquote withproxy.txt - # Baseline (0.722s) + # Baseline (4.705s) > testscript -v noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1700,11 +1737,11 @@ > env BANANA=banana > env GOPATH=$WORK/ourgopath > env GOPROXY= - # no GOPROXY, no pass-through, no proxy (0.209s) + # no GOPROXY, no pass-through, no proxy (1.064s) > testscript -v noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1733,11 +1770,11 @@ > stdout '^GOPATH=\$WORK[/\\]\.gopath'$ > stdout ^GOPROXY=https://proxy.golang.org,direct$ > ! stderr .+ - # no GOPROXY, no pass-through, with proxy (0.192s) + # no GOPROXY, no pass-through, with proxy (1.148s) > testscript -v withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1752,7 +1789,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:38775/mod + GOPROXY=http://127.0.0.1:39615/mod goversion=1.23 GONOSUMDB=* @@ -1761,17 +1798,17 @@ > env GOPATH GOPATH=$WORK/.gopath > env GOPROXY - GOPROXY=http://127.0.0.1:38775/mod + GOPROXY=http://127.0.0.1:39615/mod PASS > stdout ^BANANA=$ > stdout '^GOPATH=\$WORK[/\\]\.gopath'$ > stdout ^GOPROXY=http://.*/mod$ > ! stderr .+ - # no GOPROXY, with pass-through, no proxy (0.136s) + # no GOPROXY, with pass-through, no proxy (1.176s) > testscript -v -e BANANA -e GOPATH -e GOPROXY noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1801,11 +1838,11 @@ > stdout ^GOPATH=${WORK@R}[/\\]ourgopath$ > stdout ^GOPROXY=$ > ! stderr .+ - # no GOPROXY, with pass-through, with proxy (0.138s) + # no GOPROXY, with pass-through, with proxy (1.056s) > testscript -v -e BANANA -e GOPATH -e GOPROXY withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1837,11 +1874,11 @@ > stdout ^GOPROXY=$ > ! stderr .+ > setfilegoproxy $WORK/proxy - # with GOPROXY, no pass-through, no proxy (0.138s) + # with GOPROXY, no pass-through, no proxy (1.212s) > testscript -v noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1870,11 +1907,11 @@ > stdout '^GOPATH=\$WORK[/\\]\.gopath'$ > stdout ^GOPROXY=$GOPROXY$ > ! stderr .+ - # with GOPROXY, no pass-through, with proxy (0.122s) + # with GOPROXY, no pass-through, with proxy (1.152s) > testscript -v withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1889,7 +1926,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:35981/mod + GOPROXY=http://127.0.0.1:34227/mod goversion=1.23 GONOSUMDB=* @@ -1898,17 +1935,17 @@ > env GOPATH GOPATH=$WORK/.gopath > env GOPROXY - GOPROXY=http://127.0.0.1:35981/mod + GOPROXY=http://127.0.0.1:34227/mod PASS > stdout ^BANANA=$ > stdout '^GOPATH=\$WORK[/\\]\.gopath'$ > stdout ^GOPROXY=http://.*/mod$ > ! stderr .+ - # with GOPROXY, with pass-through, no proxy (0.175s) + # with GOPROXY, with pass-through, no proxy (0.956s) > testscript -v -e BANANA -e GOPATH -e GOPROXY noproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1938,11 +1975,11 @@ > stdout ^GOPATH=${WORK@R}[/\\]ourgopath$ > stdout ^GOPROXY=$GOPROXY$ > ! stderr .+ - # with GOPROXY, with pass-through, with proxy (0.137s) + # with GOPROXY, with pass-through, with proxy (0.764s) > testscript -v -e BANANA -e GOPATH -e GOPROXY withproxy.txt [stdout] WORK=$WORK - PATH=/tmp/testscript-main3035742548/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3762699560/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -1975,21 +2012,22 @@ > ! stderr .+ PASS ---- PASS: TestScripts (0.13s) - --- PASS: TestScripts/nogo (0.02s) - --- PASS: TestScripts/env_var_no_go (0.28s) - --- PASS: TestScripts/continue (0.70s) - --- PASS: TestScripts/skip (0.71s) - --- PASS: TestScripts/env_values (0.58s) - --- PASS: TestScripts/work (0.21s) - --- PASS: TestScripts/update (0.26s) - --- PASS: TestScripts/help (0.02s) - --- PASS: TestScripts/noproxy (0.24s) - --- PASS: TestScripts/simple (0.31s) - --- PASS: TestScripts/error (0.32s) - --- PASS: TestScripts/env_var_with_go (1.97s) +--- PASS: TestScripts (0.80s) + --- PASS: TestScripts/nogo (0.14s) + --- PASS: TestScripts/help (0.17s) + --- PASS: TestScripts/env_var_no_go (1.16s) + --- PASS: TestScripts/continue (4.59s) + --- PASS: TestScripts/env_values (4.52s) + --- PASS: TestScripts/error (5.89s) + --- PASS: TestScripts/skip (1.23s) + --- PASS: TestScripts/work (1.29s) + --- PASS: TestScripts/update (1.42s) + --- PASS: TestScripts/simple (1.83s) + --- PASS: TestScripts/noproxy (1.21s) + --- PASS: TestScripts/env_var_with_go (13.27s) PASS -ok github.com/rogpeppe/go-internal/cmd/testscript 2.115s +ok github.com/rogpeppe/go-internal/cmd/testscript 14.163s +? github.com/rogpeppe/go-internal/cmd/txtar-goproxy [no test files] === RUN TestScripts === RUN TestScripts/encode === PAUSE TestScripts/encode @@ -2004,7 +2042,7 @@ go proxy: no archive github.com v0.0.0-20171119174359-809beceb2371 === NAME TestScripts/encode testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1663753230/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main1474747573/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2019,7 +2057,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:43865/mod + GOPROXY=http://127.0.0.1:33283/mod goversion=1.23 GONOSUMDB=* @@ -2032,7 +2070,7 @@ === NAME TestScripts/to_stdout testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1663753230/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main1474747573/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2047,7 +2085,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:43865/mod + GOPROXY=http://127.0.0.1:33283/mod goversion=1.23 GONOSUMDB=* @@ -2074,7 +2112,7 @@ === NAME TestScripts/txtar-addmod-self testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1663753230/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main1474747573/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2089,7 +2127,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:43865/mod + GOPROXY=http://127.0.0.1:33283/mod goversion=1.23 GONOSUMDB=* @@ -2103,12 +2141,12 @@ > grep '-- foobar --' $WORK/out/github.com_gobin-testrepos_simple-main_v1.0.0.txtar PASS ---- PASS: TestScripts (0.10s) - --- PASS: TestScripts/encode (0.09s) - --- PASS: TestScripts/to_stdout (0.19s) - --- PASS: TestScripts/txtar-addmod-self (0.30s) +--- PASS: TestScripts (0.74s) + --- PASS: TestScripts/encode (0.65s) + --- PASS: TestScripts/to_stdout (1.29s) + --- PASS: TestScripts/txtar-addmod-self (2.16s) PASS -ok github.com/rogpeppe/go-internal/cmd/txtar-addmod 0.406s +ok github.com/rogpeppe/go-internal/cmd/txtar-addmod 3.048s === RUN TestScripts === RUN TestScripts/all === PAUSE TestScripts/all @@ -2120,11 +2158,10 @@ === PAUSE TestScripts/txtar-savedir-self === CONT TestScripts/all === CONT TestScripts/quote -=== CONT TestScripts/txtar-savedir-self === CONT TestScripts/needquote -=== NAME TestScripts/quote +=== CONT TestScripts/txtar-savedir-self testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1141345478/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main878519925/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2134,21 +2171,29 @@ $=$ exe= - > unquote blah/withsep > unquote expect - > txtar-c -quote blah + > txtar-c blah [stdout] - unquote withsep - -- withsep -- - >-- separator -- - >foo + -- go.mod -- + module example.com/blah + + -- main.go -- + package main + + import "fmt" + + func main() { + fmt.Println("Hello, world!") + } + -- subdir/x -- + x contents > ! stderr .+ > cmp stdout expect PASS -=== NAME TestScripts/txtar-savedir-self +=== NAME TestScripts/quote testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1141345478/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main878519925/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2158,29 +2203,21 @@ $=$ exe= + > unquote blah/withsep > unquote expect - > txtar-c blah + > txtar-c -quote blah [stdout] - -- go.mod -- - module example.com/blah - - -- main.go -- - package main - - import "fmt" - - func main() { - fmt.Println("Hello, world!") - } - -- subdir/x -- - x contents + unquote withsep + -- withsep -- + >-- separator -- + >foo > ! stderr .+ > cmp stdout expect PASS === NAME TestScripts/needquote testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1141345478/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main878519925/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2204,7 +2241,7 @@ === NAME TestScripts/all testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main1141345478/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main878519925/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2216,7 +2253,7 @@ > unquote expect-all > unquote expect-no-all - # Without the -a flag, it should ignore . files. (0.007s) + # Without the -a flag, it should ignore . files. (0.101s) > txtar-c blah [stdout] -- go.mod -- @@ -2232,7 +2269,7 @@ } > ! stderr .+ > cmp stdout expect-no-all - # With the -a flag, it should include them. (0.009s) + # With the -a flag, it should include them. (0.076s) > txtar-c -a blah [stdout] -- .foo/foo -- @@ -2254,14 +2291,13 @@ > cmp stdout expect-all PASS ---- PASS: TestScripts (0.00s) - --- PASS: TestScripts/quote (0.01s) - --- PASS: TestScripts/txtar-savedir-self (0.02s) - --- PASS: TestScripts/needquote (0.02s) - --- PASS: TestScripts/all (0.02s) +--- PASS: TestScripts (0.01s) + --- PASS: TestScripts/quote (0.12s) + --- PASS: TestScripts/txtar-savedir-self (0.12s) + --- PASS: TestScripts/needquote (0.18s) + --- PASS: TestScripts/all (0.22s) PASS -ok github.com/rogpeppe/go-internal/cmd/txtar-c 0.032s -? github.com/rogpeppe/go-internal/cmd/txtar-goproxy [no test files] +ok github.com/rogpeppe/go-internal/cmd/txtar-c 0.312s === RUN TestScripts === RUN TestScripts/extract-dir === PAUSE TestScripts/extract-dir @@ -2275,9 +2311,9 @@ === CONT TestScripts/extract === CONT TestScripts/extract-stdin === CONT TestScripts/extract-out-of-bounds -=== NAME TestScripts/extract-dir +=== NAME TestScripts/extract testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3878849099/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main2117196181/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2288,14 +2324,14 @@ exe= > unquote file.txtar - > txtar-x -C x/y file.txtar - > cmp x/y/foo expect/foo - > cmp x/y/a/b/bar expect/a/b/bar + > txtar-x file.txtar + > cmp foo expect/foo + > cmp a/b/bar expect/a/b/bar PASS === NAME TestScripts/extract-stdin testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3878849099/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main2117196181/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2312,9 +2348,9 @@ > cmp a/b/bar expect/a/b/bar PASS -=== NAME TestScripts/extract +=== NAME TestScripts/extract-dir testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3878849099/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main2117196181/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2325,14 +2361,14 @@ exe= > unquote file.txtar - > txtar-x file.txtar - > cmp foo expect/foo - > cmp a/b/bar expect/a/b/bar + > txtar-x -C x/y file.txtar + > cmp x/y/foo expect/foo + > cmp x/y/a/b/bar expect/a/b/bar PASS === NAME TestScripts/extract-out-of-bounds testscript.go:558: WORK=$WORK - PATH=/tmp/testscript-main3878849099/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main2117196181/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2356,12 +2392,12 @@ PASS --- PASS: TestScripts (0.00s) - --- PASS: TestScripts/extract-dir (0.02s) - --- PASS: TestScripts/extract (0.02s) - --- PASS: TestScripts/extract-stdin (0.02s) - --- PASS: TestScripts/extract-out-of-bounds (0.02s) + --- PASS: TestScripts/extract (0.10s) + --- PASS: TestScripts/extract-stdin (0.14s) + --- PASS: TestScripts/extract-out-of-bounds (0.13s) + --- PASS: TestScripts/extract-dir (0.18s) PASS -ok github.com/rogpeppe/go-internal/cmd/txtar-x 0.031s +ok github.com/rogpeppe/go-internal/cmd/txtar-x 0.224s === RUN Test === RUN Test/allnew.txt === RUN Test/allold.txt @@ -2375,7 +2411,7 @@ === RUN Test/same.txt === RUN Test/start.txt === RUN Test/triv.txt ---- PASS: Test (0.01s) +--- PASS: Test (0.02s) --- PASS: Test/allnew.txt (0.00s) --- PASS: Test/allold.txt (0.00s) --- PASS: Test/basic.txt (0.00s) @@ -2389,17 +2425,17 @@ --- PASS: Test/start.txt (0.00s) --- PASS: Test/triv.txt (0.00s) PASS -ok github.com/rogpeppe/go-internal/diff 0.016s +ok github.com/rogpeppe/go-internal/diff 0.051s === RUN TestHash1 --- PASS: TestHash1 (0.00s) === RUN TestHashDir ---- PASS: TestHashDir (0.00s) +--- PASS: TestHashDir (0.01s) === RUN TestHashZip ---- PASS: TestHashZip (0.00s) +--- PASS: TestHashZip (0.01s) === RUN TestDirFiles ---- PASS: TestDirFiles (0.00s) +--- PASS: TestDirFiles (0.01s) PASS -ok github.com/rogpeppe/go-internal/dirhash 0.011s +ok github.com/rogpeppe/go-internal/dirhash 0.048s === RUN TestCompare --- PASS: TestCompare (0.00s) === RUN TestOrder @@ -2407,13 +2443,13 @@ === RUN TestInterface --- PASS: TestInterface (0.00s) PASS -ok github.com/rogpeppe/go-internal/fmtsort 0.006s +ok github.com/rogpeppe/go-internal/fmtsort 0.052s === RUN TestScripts === RUN TestScripts/list === PAUSE TestScripts/list === CONT TestScripts/list testscript.go:558: WORK=$WORK - PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2428,7 +2464,7 @@ GOOS=linux GOROOT=/usr/lib/go-1.23 GOCACHE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/go-build - GOPROXY=http://127.0.0.1:42991/mod + GOPROXY=http://127.0.0.1:42581/mod goversion=1.23 GONOSUMDB=* @@ -2453,19 +2489,19 @@ # as that places GOMODCACHE inside the Go module and "mod tidy" walks it. # "mod tidy" then complains about invalid import paths such as # "mod/gopath/pkg/mod/fruit.com@v1.1.0/fruit". - # It's for that reason that we moved the default GOPATH to ${WORK}/.gopath. (0.012s) + # It's for that reason that we moved the default GOPATH to ${WORK}/.gopath. (0.134s) > go mod tidy [stderr] go: warning: "all" matched no packages PASS ---- PASS: TestScripts (0.12s) - --- PASS: TestScripts/list (0.09s) +--- PASS: TestScripts (0.62s) + --- PASS: TestScripts/list (0.70s) PASS -ok github.com/rogpeppe/go-internal/goproxytest 0.230s +ok github.com/rogpeppe/go-internal/goproxytest 1.385s === RUN TestInitGoEnv ---- PASS: TestInitGoEnv (0.11s) +--- PASS: TestInitGoEnv (1.15s) === RUN TestSimple === RUN TestSimple/cover === PAUSE TestSimple/cover @@ -2477,7 +2513,7 @@ === CONT TestSimple/version === CONT TestSimple/env testscript.go:558: WORK=$WORK - PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2497,7 +2533,7 @@ GOINTERNAL_MODULE=/build/reproducible-path/golang-github-rogpeppe-go-internal-1.12.0/_build/src/github.com/rogpeppe/go-internal # GOPATH and GOMODCACHE are not shared with the host, - # but GOCACHE is. (0.037s) + # but GOCACHE is. (0.203s) > go env [stdout] GO111MODULE='' @@ -2542,7 +2578,7 @@ CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' - GOGCCFLAGS='-fPIC -marm -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=$WORK/.tmp/go-build2622725438=/tmp/go-build -gno-record-gcc-switches' + GOGCCFLAGS='-fPIC -marm -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=$WORK/.tmp/go-build3473046536=/tmp/go-build -gno-record-gcc-switches' > stdout GOPATH=.*${WORK@R} > stdout GOMODCACHE=.*${WORK@R} @@ -2551,7 +2587,7 @@ === NAME TestSimple/version testscript.go:558: WORK=$WORK - PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2582,7 +2618,7 @@ === NAME TestSimple/cover testscript.go:1163: testscript.go:558: WORK=$WORK - PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -2603,25 +2639,25 @@ > unquote scripts/exec.txt # The module uses testscript itself. - # Use the checked out module, based on where the test binary ran. (0.376s) + # Use the checked out module, based on where the test binary ran. (2.245s) > go mod edit -replace=github.com/rogpeppe/go-internal=${GOINTERNAL_MODULE} > go mod tidy [stderr] go: found github.com/rogpeppe/go-internal/gotooltest in github.com/rogpeppe/go-internal v0.0.0-00010101000000-000000000000 go: found github.com/rogpeppe/go-internal/testscript in github.com/rogpeppe/go-internal v0.0.0-00010101000000-000000000000 go: github.com/rogpeppe/go-internal@v0.0.0-00010101000000-000000000000 requires - golang.org/x/mod@v0.9.0: Get "https://proxy.golang.org/golang.org/x/mod/@v/v0.9.0.mod": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:46304->[::1]:53: read: connection refused + golang.org/x/mod@v0.9.0: Get "https://proxy.golang.org/golang.org/x/mod/@v/v0.9.0.mod": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:46012->[::1]:53: read: connection refused [exit status 1] FAIL: testdata/cover.txt:6: unexpected go command failure SKIP: TestSimple/cover: Possible restricted network access ---- PASS: TestSimple (0.11s) - --- PASS: TestSimple/env (0.04s) - --- PASS: TestSimple/version (0.13s) - --- SKIP: TestSimple/cover (0.38s) +--- PASS: TestSimple (1.24s) + --- PASS: TestSimple/env (0.23s) + --- PASS: TestSimple/version (0.82s) + --- SKIP: TestSimple/cover (2.28s) PASS -ok github.com/rogpeppe/go-internal/gotooltest 0.611s +ok github.com/rogpeppe/go-internal/gotooltest 4.739s === RUN TestReadImports --- PASS: TestReadImports (0.00s) === RUN TestReadComments @@ -2631,11 +2667,14 @@ === RUN TestReadFailuresIgnored --- PASS: TestReadFailuresIgnored (0.00s) === RUN TestScan ---- PASS: TestScan (0.00s) +--- PASS: TestScan (0.02s) === RUN TestScanStar ---- PASS: TestScanStar (0.00s) +--- PASS: TestScanStar (0.01s) PASS -ok github.com/rogpeppe/go-internal/imports 0.010s +ok github.com/rogpeppe/go-internal/imports 0.091s +? github.com/rogpeppe/go-internal/internal/os/execpath [no test files] +? github.com/rogpeppe/go-internal/internal/syscall/windows [no test files] +? github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll [no test files] === RUN TestAlmostEqual === PAUSE TestAlmostEqual === CONT TestAlmostEqual @@ -2653,7 +2692,7 @@ === RUN FuzzAlmostEqual/5bd9cd4e8c887808 === RUN FuzzAlmostEqual/b323cef1fc26e507 === RUN FuzzAlmostEqual/c6edde4256d6f5eb ---- PASS: FuzzAlmostEqual (0.00s) +--- PASS: FuzzAlmostEqual (0.03s) --- PASS: FuzzAlmostEqual/seed#0 (0.00s) --- PASS: FuzzAlmostEqual/seed#1 (0.00s) --- PASS: FuzzAlmostEqual/seed#2 (0.00s) @@ -2667,10 +2706,7 @@ --- PASS: FuzzAlmostEqual/b323cef1fc26e507 (0.00s) --- PASS: FuzzAlmostEqual/c6edde4256d6f5eb (0.00s) PASS -ok github.com/rogpeppe/go-internal/internal/misspell 0.014s -? github.com/rogpeppe/go-internal/internal/os/execpath [no test files] -? github.com/rogpeppe/go-internal/internal/syscall/windows [no test files] -? github.com/rogpeppe/go-internal/internal/syscall/windows/sysdll [no test files] +ok github.com/rogpeppe/go-internal/internal/misspell 0.077s ? github.com/rogpeppe/go-internal/modfile [no test files] ? github.com/rogpeppe/go-internal/module [no test files] ? github.com/rogpeppe/go-internal/renameio [no test files] @@ -2684,29 +2720,30 @@ === RUN TestCanLockExistingFile === PAUSE TestCanLockExistingFile === RUN TestSpuriousEDEADLK ---- PASS: TestSpuriousEDEADLK (0.02s) +--- PASS: TestSpuriousEDEADLK (0.09s) === RUN TestTransform ---- PASS: TestTransform (1.09s) +--- PASS: TestTransform (6.84s) === CONT TestMutexExcludes - lockedfile_test.go:85: mu := MutexAt(_) - lockedfile_test.go:91: unlock, _ := mu.Lock() - lockedfile_test.go:94: mu2 := MutexAt(mu.Path) === CONT TestCanLockExistingFile +=== NAME TestMutexExcludes + lockedfile_test.go:85: mu := MutexAt(_) === CONT TestReadWaitsForLock lockedfile_test.go:134: WriteString("part 1\n") = + lockedfile_test.go:156: WriteString("part 2\n") = === NAME TestMutexExcludes - lockedfile_test.go:107: unlock() ---- PASS: TestCanLockExistingFile (0.01s) + lockedfile_test.go:91: unlock, _ := mu.Lock() + lockedfile_test.go:94: mu2 := MutexAt(mu.Path) === NAME TestReadWaitsForLock - lockedfile_test.go:156: WriteString("part 2\n") = lockedfile_test.go:146: Read(_) = "part 1\npart 2\n" +--- PASS: TestCanLockExistingFile (0.02s) +--- PASS: TestReadWaitsForLock (0.01s) === NAME TestMutexExcludes + lockedfile_test.go:107: unlock() lockedfile_test.go:102: unlock2, _ := mu2.Lock() lockedfile_test.go:103: unlock2() ---- PASS: TestMutexExcludes (0.01s) ---- PASS: TestReadWaitsForLock (0.02s) +--- PASS: TestMutexExcludes (0.03s) PASS -ok github.com/rogpeppe/go-internal/lockedfile 1.136s +ok github.com/rogpeppe/go-internal/lockedfile 7.029s === RUN TestLockExcludesLock === PAUSE TestLockExcludesLock === RUN TestLockExcludesRLock @@ -2714,62 +2751,64 @@ === RUN TestRLockExcludesOnlyLock === PAUSE TestRLockExcludesOnlyLock === RUN TestLockNotDroppedByExecCommand - filelock_test.go:188: fd 6 = /tmp/TestLockNotDroppedByExecCommand3134665186 + filelock_test.go:188: fd 6 = /tmp/TestLockNotDroppedByExecCommand1957724045 filelock_test.go:191: Lock(fd 6) = - filelock_test.go:193: fd 7 = os.Open("/tmp/TestLockNotDroppedByExecCommand3134665186") + filelock_test.go:193: fd 7 = os.Open("/tmp/TestLockNotDroppedByExecCommand1957724045") filelock_test.go:204: Lock(fd 7) is blocked (as expected) filelock_test.go:205: Unlock(fd 6) = asm_arm.s:884: Lock(fd 7) = filelock_test.go:207: Unlock(fd 7) = ---- PASS: TestLockNotDroppedByExecCommand (0.02s) +--- PASS: TestLockNotDroppedByExecCommand (0.08s) === CONT TestLockExcludesLock - filelock_test.go:121: fd 6 = /tmp/TestLockExcludesLock2531651489 - filelock_test.go:124: fd 7 = os.Open("/tmp/TestLockExcludesLock2531651489") - filelock_test.go:127: Lock(fd 6) = === CONT TestRLockExcludesOnlyLock - filelock_test.go:153: fd 8 = /tmp/TestRLockExcludesOnlyLock3808823575 - filelock_test.go:155: RLock(fd 8) = - filelock_test.go:157: fd 9 = os.Open("/tmp/TestRLockExcludesOnlyLock3808823575") +=== NAME TestLockExcludesLock + filelock_test.go:121: fd 6 = /tmp/TestLockExcludesLock2727521474 + filelock_test.go:124: fd 8 = os.Open("/tmp/TestLockExcludesLock2727521474") + filelock_test.go:127: Lock(fd 6) = +=== NAME TestRLockExcludesOnlyLock + filelock_test.go:153: fd 7 = /tmp/TestRLockExcludesOnlyLock3017290005 + filelock_test.go:155: RLock(fd 7) = + filelock_test.go:157: fd 9 = os.Open("/tmp/TestRLockExcludesOnlyLock3017290005") filelock_test.go:171: RLock(fd 9) = - filelock_test.go:175: fd 10 = os.Open("/tmp/TestRLockExcludesOnlyLock3808823575") + filelock_test.go:175: fd 10 = os.Open("/tmp/TestRLockExcludesOnlyLock3017290005") === CONT TestLockExcludesRLock - filelock_test.go:137: fd 11 = /tmp/TestLockExcludesRLock1135803342 - filelock_test.go:140: fd 12 = os.Open("/tmp/TestLockExcludesRLock1135803342") + filelock_test.go:137: fd 11 = /tmp/TestLockExcludesRLock112508339 + filelock_test.go:140: fd 12 = os.Open("/tmp/TestLockExcludesRLock112508339") filelock_test.go:143: Lock(fd 11) = === NAME TestLockExcludesLock - filelock_test.go:128: Lock(fd 7) is blocked (as expected) + filelock_test.go:128: Lock(fd 8) is blocked (as expected) filelock_test.go:129: Unlock(fd 6) = === NAME TestRLockExcludesOnlyLock filelock_test.go:177: Lock(fd 10) is blocked (as expected) -=== NAME TestLockExcludesLock - asm_arm.s:884: Lock(fd 7) = - filelock_test.go:131: Unlock(fd 7) = -=== NAME TestRLockExcludesOnlyLock filelock_test.go:179: Unlock(fd 9) = - filelock_test.go:181: Unlock(fd 8) = ---- PASS: TestLockExcludesLock (0.01s) + filelock_test.go:181: Unlock(fd 7) = === NAME TestLockExcludesRLock filelock_test.go:144: RLock(fd 12) is blocked (as expected) filelock_test.go:145: Unlock(fd 11) = - asm_arm.s:884: RLock(fd 12) = === NAME TestRLockExcludesOnlyLock asm_arm.s:884: Lock(fd 10) = -=== NAME TestLockExcludesRLock - filelock_test.go:147: Unlock(fd 12) = +=== NAME TestLockExcludesLock + asm_arm.s:884: Lock(fd 8) = + filelock_test.go:131: Unlock(fd 8) = +--- PASS: TestLockExcludesLock (0.02s) === NAME TestRLockExcludesOnlyLock filelock_test.go:184: Unlock(fd 10) = ---- PASS: TestLockExcludesRLock (0.01s) ---- PASS: TestRLockExcludesOnlyLock (0.01s) +=== NAME TestLockExcludesRLock + asm_arm.s:884: RLock(fd 12) = +--- PASS: TestRLockExcludesOnlyLock (0.02s) +=== NAME TestLockExcludesRLock + filelock_test.go:147: Unlock(fd 12) = +--- PASS: TestLockExcludesRLock (0.02s) PASS -ok github.com/rogpeppe/go-internal/lockedfile/internal/filelock 0.044s +ok github.com/rogpeppe/go-internal/lockedfile/internal/filelock 0.177s === RUN TestWork ---- PASS: TestWork (0.03s) +--- PASS: TestWork (0.24s) === RUN TestWorkParallel ---- PASS: TestWorkParallel (0.00s) +--- PASS: TestWorkParallel (0.01s) === RUN TestCache --- PASS: TestCache (0.00s) PASS -ok github.com/rogpeppe/go-internal/par 0.050s +ok github.com/rogpeppe/go-internal/par 0.357s ? github.com/rogpeppe/go-internal/testscript/internal/pty [no test files] === RUN TestCRLFInput === RUN TestCRLFInput/_ @@ -2779,13 +2818,13 @@ testscript.go:558: > exists output.txt PASS ---- PASS: TestCRLFInput (0.00s) - --- PASS: TestCRLFInput/_ (0.00s) - --- PASS: TestCRLFInput/_/script (0.00s) +--- PASS: TestCRLFInput (0.02s) + --- PASS: TestCRLFInput/_ (0.01s) + --- PASS: TestCRLFInput/_/script (0.01s) === RUN TestEnv --- PASS: TestEnv (0.00s) === RUN TestSetupFailure ---- PASS: TestSetupFailure (0.00s) +--- PASS: TestSetupFailure (0.02s) === RUN TestScripts === RUN TestScripts/big_diff === PAUSE TestScripts/big_diff @@ -2857,8 +2896,57 @@ === PAUSE TestScripts/wait === CONT TestScripts/big_diff === CONT TestScripts/readfile -=== CONT TestScripts/exec_path_change === CONT TestScripts/testscript_stdout_stderr_error +=== CONT TestScripts/pty + testscript.go:558: > [!linux] [!darwin] skip + > [darwin] skip # https://go.dev/issue/61779 + > ttyin secretwords.txt + > terminalprompt + > ttyout 'magic words' + > ! stderr . + > ! stdout . + PASS + +=== CONT TestScripts/wait +=== NAME TestScripts/testscript_stdout_stderr_error + testscript.go:558: # Verify that stdout and stderr get set event when a user-builtin + # command aborts. Note that we need to assert against stdout + # because our meta testscript command sees only a single log. (0.000s) + > unquote scripts/testscript.txt + > ! testscript -v scripts + [stdout] + > printargs hello world + [stdout] + ["printargs" "hello" "world"] + > echoandexit 1 'this is stdout' 'this is stderr' + [stdout] + this is stdout + [stderr] + this is stderr + FAIL: $WORK/scripts/testscript.txt:2: told to exit with code 1 + + > cmpenv stdout stdout.golden + PASS + +=== NAME TestScripts/readfile + testscript.go:558: > fprintargs stdout stdout + [stdout] + stdout + > testreadfile stdout + > fprintargs stderr stderr + [stderr] + stderr + > testreadfile stderr + > testreadfile x/somefile + PASS + +=== CONT TestScripts/values +=== CONT TestScripts/testscript_update_script_stderr +=== NAME TestScripts/values + testscript.go:558: > test-values + PASS + +=== CONT TestScripts/testscript_update_script_quote === NAME TestScripts/big_diff testscript.go:558: # Verify the behaviour of cmp in the case of a diff between two # large files (with a large diff) (0.000s) @@ -4927,7 +5015,7 @@ > env WORK=$WORK - PATH=/tmp/testscript-main1808055803/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3471520634/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -4940,116 +5028,19 @@ > cmpenv stdout stdout.golden PASS -=== CONT TestScripts/evalsymlink -=== NAME TestScripts/testscript_stdout_stderr_error - testscript.go:558: # Verify that stdout and stderr get set event when a user-builtin - # command aborts. Note that we need to assert against stdout - # because our meta testscript command sees only a single log. (0.000s) - > unquote scripts/testscript.txt - > ! testscript -v scripts - [stdout] - > printargs hello world - [stdout] - ["printargs" "hello" "world"] - > echoandexit 1 'this is stdout' 'this is stderr' - [stdout] - this is stdout - [stderr] - this is stderr - FAIL: $WORK/scripts/testscript.txt:2: told to exit with code 1 - - > cmpenv stdout stdout.golden - PASS - -=== CONT TestScripts/defer - testscript.go:558: > testdefer - > testdefer - > testdefer - PASS - -=== CONT TestScripts/cpstdout - testscript.go:558: > [!exec:cat] stop - # hello world (0.000s) - > exec cat hello.text - [stdout] - hello world - > cp stdout got - > cmp got hello.text - > ! cmp got different.text - > exists got - > mv got new - > ! exists got - > cmp new hello.text - PASS - -=== CONT TestScripts/cond - testscript.go:558: # test that exactly one of gc and gccgo is set (0.000s) - > [gc] mkdir gc_true - > [gccgo] mkdir gccgo_true - > [gc] ! exists gccgo_true - > [!gc] exists gccgo_true - > [gccgo] ! exists gc_true - > [!gccgo] exists gc_true - # test that go version build tags are set (0.000s) - > [go1.1] mkdir go1.x - > [go2.1] mkdir go2.x - > exists go1.x - > ! exists go2.x - # unix should be true on Linux and MacOS, but not on Windows. - # Both platforms are tested on CI. (0.000s) - > [unix] mkdir unix_true - > [linux] exists unix_true - > [darwin] exists unix_true - > [windows] ! exists unix_true - PASS - -=== CONT TestScripts/commandstatus -=== NAME TestScripts/evalsymlink - testscript.go:558: # If ioutil.TempDir returns a sym linked dir (default behaviour in macOS for example) the - # matcher will have problems with external programs that uses the real path. - # This script tests that $WORK is matched in a consistent way (also see #79). (0.000s) - > [windows] skip - > exec pwd - [stdout] - $WORK - > stdout ^$WORK$ - > exec pwd -P - [stdout] - $WORK - > stdout ^$WORK$ - PASS - -=== CONT TestScripts/command -=== NAME TestScripts/readfile - testscript.go:558: > fprintargs stdout stdout - [stdout] - stdout - > testreadfile stdout - > fprintargs stderr stderr - [stderr] - stderr - > testreadfile stderr - > testreadfile x/somefile - PASS - -=== CONT TestScripts/wait -=== NAME TestScripts/command - testscript.go:558: > printargs a b 'c d' +=== CONT TestScripts/testscript_update_script_expected_not_in_archive +=== NAME TestScripts/testscript_update_script_stderr + testscript.go:558: > unquote scripts/testscript.txt + > unquote testscript-new.txt + > testscript -update scripts [stdout] - ["printargs" "a" "b" "c d"] - > stdout '\["printargs" "a" "b" "c d"\]\n' - PASS - -=== CONT TestScripts/values - testscript.go:558: > test-values PASS + $WORK/scripts/testscript.txt updated -=== CONT TestScripts/cmpenv - testscript.go:558: > env $=$ - > cmpenv file1 file2 + > cmp scripts/testscript.txt testscript-new.txt PASS -=== CONT TestScripts/testscript_update_script_stderr +=== CONT TestScripts/testscript_update_script_actual_is_file testscript.go:558: > unquote scripts/testscript.txt > unquote testscript-new.txt > testscript -update scripts @@ -5060,16 +5051,7 @@ > cmp scripts/testscript.txt testscript-new.txt PASS -=== CONT TestScripts/testscript_update_script_quote -=== NAME TestScripts/commandstatus - testscript.go:558: > ! status 1 - [exit status 1] - > ! status 2 - [exit status 2] - > status 0 - PASS - -=== CONT TestScripts/cmd_stdout_stderr +=== CONT TestScripts/testscript_update_script === NAME TestScripts/testscript_update_script_quote testscript.go:558: > unquote scripts/testscript.txt > unquote testscript-new.txt @@ -5081,7 +5063,29 @@ > cmp scripts/testscript.txt testscript-new.txt PASS -=== CONT TestScripts/testscript_update_script_expected_not_in_archive +=== NAME TestScripts/testscript_update_script_expected_not_in_archive + testscript.go:558: # Verify that comparing stdout against a file not in the archive does nothing (0.000s) + > unquote scripts/testscript.txt + > cp scripts/testscript.txt unchanged + > ! testscript -update scripts + [stdout] + > fprintargs stdout right + [stdout] + right + > cp file expect + > cmp stdout expect + diff stdout expect + --- stdout + +++ expect + @@ -1,1 +1,1 @@ + -right + +wrong + + FAIL: $WORK/scripts/testscript.txt:3: stdout and expect differ + + > cmp scripts/testscript.txt unchanged + PASS + === NAME TestScripts/wait testscript.go:558: > [!exec:echo] skip > [!exec:false] skip @@ -5137,42 +5141,10 @@ [background] sleep 86400: signal: interrupt PASS -=== CONT TestScripts/testscript_update_script_actual_is_file - testscript.go:558: > unquote scripts/testscript.txt - > unquote testscript-new.txt - > testscript -update scripts - [stdout] - PASS - $WORK/scripts/testscript.txt updated - - > cmp scripts/testscript.txt testscript-new.txt - PASS - -=== CONT TestScripts/testscript_update_script -=== NAME TestScripts/testscript_update_script_expected_not_in_archive - testscript.go:558: # Verify that comparing stdout against a file not in the archive does nothing (0.000s) - > unquote scripts/testscript.txt - > cp scripts/testscript.txt unchanged - > ! testscript -update scripts - [stdout] - > fprintargs stdout right - [stdout] - right - > cp file expect - > cmp stdout expect - diff stdout expect - --- stdout - +++ expect - @@ -1,1 +1,1 @@ - -right - +wrong - - FAIL: $WORK/scripts/testscript.txt:3: stdout and expect differ - - > cmp scripts/testscript.txt unchanged - PASS - +=== CONT TestScripts/testscript_duplicate_name === CONT TestScripts/testscript_notfound +=== CONT TestScripts/testscript_logging +=== NAME TestScripts/testscript_notfound testscript.go:558: # Check that unknown commands output a useful error message (0.000s) > ! testscript notfound [stdout] @@ -5194,84 +5166,8 @@ > stdout 'unknown command "exits" \(did you mean "exists"\?\)' PASS -=== CONT TestScripts/testscript_logging -=== NAME TestScripts/cmd_stdout_stderr - testscript.go:558: # Verify that when we don't update stdout when we don't attempt to write via Stdout() (0.000s) - > fprintargs stdout hello stdout from fprintargs - [stdout] - hello stdout from fprintargs - > stdout 'hello stdout from fprintargs' - > echoandexit 0 - > stdout 'hello stdout from fprintargs' - # Verify that when we don't update stderr when we don't attempt to write via Stderr() (0.000s) - > fprintargs stderr hello stderr from fprintargs - [stderr] - hello stderr from fprintargs - > stderr 'hello stderr from fprintargs' - > echoandexit 0 - > stderr 'hello stderr from fprintargs' - # Verify that we do update stdout when we attempt to write via Stdout() or Stderr() (0.000s) - > fprintargs stdout hello stdout from fprintargs - [stdout] - hello stdout from fprintargs - > stdout 'hello stdout from fprintargs' - > ! stderr .+ - > echoandexit 0 'hello stdout from echoandexit' - [stdout] - hello stdout from echoandexit - > stdout 'hello stdout from echoandexit' - > ! stderr .+ - > fprintargs stdout hello stdout from fprintargs - [stdout] - hello stdout from fprintargs - > stdout 'hello stdout from fprintargs' - > ! stderr .+ - > echoandexit 0 '' 'hello stderr from echoandexit' - [stderr] - hello stderr from echoandexit - > ! stdout .+ - > stderr 'hello stderr from echoandexit' - # Verify that we do update stderr when we attempt to write via Stdout() or Stderr() (0.000s) - > fprintargs stderr hello stderr from fprintargs - [stderr] - hello stderr from fprintargs - > ! stdout .+ - > stderr 'hello stderr from fprintargs' - > echoandexit 0 'hello stdout from echoandexit' - [stdout] - hello stdout from echoandexit - > stdout 'hello stdout from echoandexit' - > ! stderr .+ - > fprintargs stdout hello stdout from fprintargs - [stdout] - hello stdout from fprintargs - > stdout 'hello stdout from fprintargs' - > ! stderr .+ - > echoandexit 0 '' 'hello stderr from echoandexit' - [stderr] - hello stderr from echoandexit - > ! stdout .+ - > stderr 'hello stderr from echoandexit' - PASS - === CONT TestScripts/testscript_explicit_exec -=== NAME TestScripts/testscript_update_script - testscript.go:558: # Check that we support both txt and txtar extensions. (0.000s) - > unquote scripts/testscript.txt - > unquote testscript-new.txt - > cp scripts/testscript.txt scripts/testscript2.txtar - > testscript -update scripts - [stdout] - PASS - $WORK/scripts/testscript.txt updated - PASS - $WORK/scripts/testscript2.txtar updated - - > cmp scripts/testscript.txt testscript-new.txt - > cmp scripts/testscript2.txtar testscript-new.txt - PASS - -=== CONT TestScripts/testscript_duplicate_name +=== NAME TestScripts/testscript_duplicate_name testscript.go:558: # Check that RequireUniqueNames works; # it should reject txtar archives with duplicate names as defined by the host system. (0.000s) > unquote scripts-normalized/testscript.txt @@ -5286,82 +5182,19 @@ > stdout '.* would overwrite .* \(because RequireUniqueNames is enabled\)' PASS -=== CONT TestScripts/stdin - testscript.go:558: > [!exec:cat] skip - > stdin hello.txt - > exec cat - [stdout] - hello - - > stdout hello - > exec cat - > ! stdout hello - > [!exec:cat] stop - # Check that 'stdin stdout' works. (0.000s) - > exec cat hello.txt - [stdout] - hello - - > stdin stdout - > exec cat - [stdout] - hello - - > stdout hello - PASS - -=== CONT TestScripts/setupfiles - testscript.go:558: # check that the Setup function saw the unarchived files, - # including the temp directory that's always created. (0.000s) - > setup-filenames .tmp a b - PASS - -=== CONT TestScripts/setenv - testscript.go:558: > setSpecialVal - > exists $SPECIALVAL.txt - > ensureSpecialVal - PASS - -=== CONT TestScripts/regexpquote - testscript.go:558: > env XXX='hello)' - > grep ^${XXX@R}$ file.txt - PASS - -=== CONT TestScripts/interrupt -=== NAME TestScripts/testscript_explicit_exec - testscript.go:558: # Check that RequireExplicitExec works; - # it should reject `fprintargs` in favor of `exec fprintargs`, - # but it shouldn't complain about `some-param-cmd`, - # as that Params.Cmds entry won't work via `exec some-param-cmd`. (0.000s) - > unquote scripts-implicit/testscript.txt - > unquote scripts-explicit/testscript.txt - > testscript scripts-implicit - [stdout] - PASS - - > testscript scripts-explicit - [stdout] - PASS - - > ! testscript -explicit-exec scripts-implicit +=== CONT TestScripts/evalsymlink + testscript.go:558: # If ioutil.TempDir returns a sym linked dir (default behaviour in macOS for example) the + # matcher will have problems with external programs that uses the real path. + # This script tests that $WORK is matched in a consistent way (also see #79). (0.000s) + > [windows] skip + > exec pwd [stdout] - > fprintargs stdout right - FAIL: $WORK/scripts-implicit/testscript.txt:1: use 'exec fprintargs' rather than 'fprintargs' (because RequireExplicitExec is enabled) - - > testscript -explicit-exec scripts-explicit + $WORK + > stdout ^$WORK$ + > exec pwd -P [stdout] - PASS - - PASS - -=== CONT TestScripts/pty - testscript.go:558: > [!linux] [!darwin] skip - > [darwin] skip # https://go.dev/issue/61779 - > ttyin secretwords.txt - > terminalprompt - > ttyout 'magic words' - > ! stderr . - > ! stdout . + $WORK + > stdout ^$WORK$ PASS === CONT TestScripts/nothing @@ -5369,19 +5202,23 @@ PASS === CONT TestScripts/long_diff -=== NAME TestScripts/interrupt - testscript.go:558: > [windows] skip - > signalcatcher & - > waitfile catchsignal - > interrupt - > wait - [background] signalcatcher: exit status 0 +=== NAME TestScripts/testscript_update_script + testscript.go:558: # Check that we support both txt and txtar extensions. (0.000s) + > unquote scripts/testscript.txt + > unquote testscript-new.txt + > cp scripts/testscript.txt scripts/testscript2.txtar + > testscript -update scripts [stdout] - caught interrupt - > stdout 'caught interrupt' PASS + $WORK/scripts/testscript.txt updated + PASS + $WORK/scripts/testscript2.txtar updated -=== CONT TestScripts/exists + > cmp scripts/testscript.txt testscript-new.txt + > cmp scripts/testscript2.txtar testscript-new.txt + PASS + +=== CONT TestScripts/interrupt === NAME TestScripts/long_diff testscript.go:558: # Verify the behaviour of cmp in the case of a small diff between # two large files (0.000s) @@ -5403,7 +5240,7 @@ > env WORK=$WORK - PATH=/tmp/testscript-main1808055803/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PATH=/tmp/testscript-main3471520634/bin:/usr/lib/go-1.23/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp @@ -5416,7 +5253,17 @@ > cmpenv stdout stdout.golden PASS -=== NAME TestScripts/exists +=== CONT TestScripts/hello + testscript.go:558: > [!exec:cat] stop + # hello world (0.000s) + > exec cat hello.text + [stdout] + hello world + > stdout 'hello world\n' + > ! stderr . + PASS + +=== CONT TestScripts/exists testscript.go:558: > chmod 444 foo_r > exists foo > ! exists unfoo @@ -5427,7 +5274,18 @@ PASS === CONT TestScripts/execguard -=== CONT TestScripts/hello +=== NAME TestScripts/interrupt + testscript.go:558: > [windows] skip + > signalcatcher & + > waitfile catchsignal + > interrupt + > wait + [background] signalcatcher: exit status 0 + [stdout] + caught interrupt + > stdout 'caught interrupt' + PASS + === NAME TestScripts/execguard testscript.go:558: > [exec:nosuchcommand] exec nosuchcommand > [!exec:cat] stop @@ -5437,14 +5295,197 @@ > stdout 'foo\n' PASS -=== NAME TestScripts/hello +=== CONT TestScripts/exec_path_change +=== CONT TestScripts/defer + testscript.go:558: > testdefer + > testdefer + > testdefer + PASS + +=== CONT TestScripts/cpstdout +=== NAME TestScripts/testscript_explicit_exec + testscript.go:558: # Check that RequireExplicitExec works; + # it should reject `fprintargs` in favor of `exec fprintargs`, + # but it shouldn't complain about `some-param-cmd`, + # as that Params.Cmds entry won't work via `exec some-param-cmd`. (0.000s) + > unquote scripts-implicit/testscript.txt + > unquote scripts-explicit/testscript.txt + > testscript scripts-implicit + [stdout] + PASS + + > testscript scripts-explicit + [stdout] + PASS + + > ! testscript -explicit-exec scripts-implicit + [stdout] + > fprintargs stdout right + FAIL: $WORK/scripts-implicit/testscript.txt:1: use 'exec fprintargs' rather than 'fprintargs' (because RequireExplicitExec is enabled) + + > testscript -explicit-exec scripts-explicit + [stdout] + PASS + + PASS + +=== NAME TestScripts/cpstdout testscript.go:558: > [!exec:cat] stop # hello world (0.000s) > exec cat hello.text [stdout] hello world - > stdout 'hello world\n' - > ! stderr . + > cp stdout got + > cmp got hello.text + > ! cmp got different.text + > exists got + > mv got new + > ! exists got + > cmp new hello.text + PASS + +=== CONT TestScripts/cond +=== CONT TestScripts/commandstatus +=== NAME TestScripts/cond + testscript.go:558: # test that exactly one of gc and gccgo is set (0.000s) + > [gc] mkdir gc_true + > [gccgo] mkdir gccgo_true + > [gc] ! exists gccgo_true + > [!gc] exists gccgo_true + > [gccgo] ! exists gc_true + > [!gccgo] exists gc_true + # test that go version build tags are set (0.000s) + > [go1.1] mkdir go1.x + > [go2.1] mkdir go2.x + > exists go1.x + > ! exists go2.x + # unix should be true on Linux and MacOS, but not on Windows. + # Both platforms are tested on CI. (0.000s) + > [unix] mkdir unix_true + > [linux] exists unix_true + > [darwin] exists unix_true + > [windows] ! exists unix_true + PASS + +=== CONT TestScripts/command + testscript.go:558: > printargs a b 'c d' + [stdout] + ["printargs" "a" "b" "c d"] + > stdout '\["printargs" "a" "b" "c d"\]\n' + PASS + +=== CONT TestScripts/cmpenv + testscript.go:558: > env $=$ + > cmpenv file1 file2 + PASS + +=== CONT TestScripts/cmd_stdout_stderr +=== NAME TestScripts/commandstatus + testscript.go:558: > ! status 1 + [exit status 1] + > ! status 2 + [exit status 2] + > status 0 + PASS + +=== CONT TestScripts/setupfiles + testscript.go:558: # check that the Setup function saw the unarchived files, + # including the temp directory that's always created. (0.000s) + > setup-filenames .tmp a b + PASS + +=== CONT TestScripts/stdin + testscript.go:558: > [!exec:cat] skip + > stdin hello.txt + > exec cat + [stdout] + hello + + > stdout hello + > exec cat + > ! stdout hello + > [!exec:cat] stop + # Check that 'stdin stdout' works. (0.000s) + > exec cat hello.txt + [stdout] + hello + + > stdin stdout + > exec cat + [stdout] + hello + + > stdout hello + PASS + +=== CONT TestScripts/setenv + testscript.go:558: > setSpecialVal + > exists $SPECIALVAL.txt + > ensureSpecialVal + PASS + +=== CONT TestScripts/regexpquote + testscript.go:558: > env XXX='hello)' + > grep ^${XXX@R}$ file.txt + PASS + +=== NAME TestScripts/cmd_stdout_stderr + testscript.go:558: # Verify that when we don't update stdout when we don't attempt to write via Stdout() (0.000s) + > fprintargs stdout hello stdout from fprintargs + [stdout] + hello stdout from fprintargs + > stdout 'hello stdout from fprintargs' + > echoandexit 0 + > stdout 'hello stdout from fprintargs' + # Verify that when we don't update stderr when we don't attempt to write via Stderr() (0.000s) + > fprintargs stderr hello stderr from fprintargs + [stderr] + hello stderr from fprintargs + > stderr 'hello stderr from fprintargs' + > echoandexit 0 + > stderr 'hello stderr from fprintargs' + # Verify that we do update stdout when we attempt to write via Stdout() or Stderr() (0.000s) + > fprintargs stdout hello stdout from fprintargs + [stdout] + hello stdout from fprintargs + > stdout 'hello stdout from fprintargs' + > ! stderr .+ + > echoandexit 0 'hello stdout from echoandexit' + [stdout] + hello stdout from echoandexit + > stdout 'hello stdout from echoandexit' + > ! stderr .+ + > fprintargs stdout hello stdout from fprintargs + [stdout] + hello stdout from fprintargs + > stdout 'hello stdout from fprintargs' + > ! stderr .+ + > echoandexit 0 '' 'hello stderr from echoandexit' + [stderr] + hello stderr from echoandexit + > ! stdout .+ + > stderr 'hello stderr from echoandexit' + # Verify that we do update stderr when we attempt to write via Stdout() or Stderr() (0.000s) + > fprintargs stderr hello stderr from fprintargs + [stderr] + hello stderr from fprintargs + > ! stdout .+ + > stderr 'hello stderr from fprintargs' + > echoandexit 0 'hello stdout from echoandexit' + [stdout] + hello stdout from echoandexit + > stdout 'hello stdout from echoandexit' + > ! stderr .+ + > fprintargs stdout hello stdout from fprintargs + [stdout] + hello stdout from fprintargs + > stdout 'hello stdout from fprintargs' + > ! stderr .+ + > echoandexit 0 '' 'hello stderr from echoandexit' + [stderr] + hello stderr from echoandexit + > ! stdout .+ + > stderr 'hello stderr from echoandexit' PASS === NAME TestScripts/testscript_logging @@ -5561,61 +5602,61 @@ > stdout 'This is not go' PASS ---- PASS: TestScripts (0.00s) - --- PASS: TestScripts/big_diff (0.02s) - --- PASS: TestScripts/testscript_stdout_stderr_error (0.02s) - --- PASS: TestScripts/defer (0.00s) - --- PASS: TestScripts/cpstdout (0.00s) - --- PASS: TestScripts/cond (0.00s) - --- PASS: TestScripts/evalsymlink (0.01s) - --- PASS: TestScripts/readfile (0.04s) - --- PASS: TestScripts/command (0.02s) - --- PASS: TestScripts/values (0.00s) - --- PASS: TestScripts/cmpenv (0.00s) - --- PASS: TestScripts/testscript_update_script_stderr (0.02s) - --- PASS: TestScripts/commandstatus (0.05s) - --- PASS: TestScripts/testscript_update_script_quote (0.03s) - --- PASS: TestScripts/wait (0.08s) - --- PASS: TestScripts/testscript_update_script_actual_is_file (0.01s) - --- PASS: TestScripts/testscript_update_script_expected_not_in_archive (0.03s) - --- PASS: TestScripts/testscript_notfound (0.01s) - --- PASS: TestScripts/cmd_stdout_stderr (0.10s) - --- PASS: TestScripts/testscript_update_script (0.06s) - --- PASS: TestScripts/testscript_duplicate_name (0.01s) - --- PASS: TestScripts/stdin (0.03s) - --- PASS: TestScripts/setupfiles (0.01s) - --- PASS: TestScripts/setenv (0.00s) - --- PASS: TestScripts/regexpquote (0.00s) - --- PASS: TestScripts/testscript_explicit_exec (0.07s) - --- PASS: TestScripts/pty (0.02s) +--- PASS: TestScripts (0.02s) + --- PASS: TestScripts/pty (0.09s) + --- PASS: TestScripts/testscript_stdout_stderr_error (0.12s) + --- PASS: TestScripts/readfile (0.13s) + --- PASS: TestScripts/values (0.04s) + --- PASS: TestScripts/big_diff (0.22s) + --- PASS: TestScripts/testscript_update_script_stderr (0.10s) + --- PASS: TestScripts/testscript_update_script_actual_is_file (0.04s) + --- PASS: TestScripts/wait (0.20s) + --- PASS: TestScripts/testscript_update_script_expected_not_in_archive (0.09s) + --- PASS: TestScripts/testscript_update_script_quote (0.13s) + --- PASS: TestScripts/testscript_notfound (0.04s) + --- PASS: TestScripts/testscript_duplicate_name (0.09s) + --- PASS: TestScripts/evalsymlink (0.04s) --- PASS: TestScripts/nothing (0.01s) - --- PASS: TestScripts/interrupt (0.04s) - --- PASS: TestScripts/exists (0.00s) - --- PASS: TestScripts/long_diff (0.01s) - --- PASS: TestScripts/execguard (0.01s) - --- PASS: TestScripts/hello (0.01s) - --- PASS: TestScripts/testscript_logging (0.29s) - --- PASS: TestScripts/exec_path_change (22.40s) + --- PASS: TestScripts/testscript_update_script (0.17s) + --- PASS: TestScripts/long_diff (0.06s) + --- PASS: TestScripts/hello (0.04s) + --- PASS: TestScripts/exists (0.01s) + --- PASS: TestScripts/interrupt (0.12s) + --- PASS: TestScripts/execguard (0.03s) + --- PASS: TestScripts/defer (0.00s) + --- PASS: TestScripts/testscript_explicit_exec (0.24s) + --- PASS: TestScripts/cpstdout (0.02s) + --- PASS: TestScripts/cond (0.02s) + --- PASS: TestScripts/command (0.06s) + --- PASS: TestScripts/cmpenv (0.02s) + --- PASS: TestScripts/commandstatus (0.20s) + --- PASS: TestScripts/setupfiles (0.02s) + --- PASS: TestScripts/stdin (0.10s) + --- PASS: TestScripts/setenv (0.01s) + --- PASS: TestScripts/regexpquote (0.01s) + --- PASS: TestScripts/cmd_stdout_stderr (0.33s) + --- PASS: TestScripts/testscript_logging (1.13s) + --- PASS: TestScripts/exec_path_change (125.79s) === RUN TestTestwork ---- PASS: TestTestwork (5.83s) +--- PASS: TestTestwork (35.53s) === RUN TestWorkdirRoot === RUN TestWorkdirRoot/run_tests === RUN TestWorkdirRoot/run_tests/nothing === PAUSE TestWorkdirRoot/run_tests/nothing === CONT TestWorkdirRoot/run_tests/nothing - testscript.go:558: WORK=/tmp/1314012871/script-nothing + testscript.go:558: WORK=/tmp/732414263/script-nothing # Intentionally empty test script; used to test Params.WorkdirRoot (0.000s) PASS ---- PASS: TestWorkdirRoot (0.00s) +--- PASS: TestWorkdirRoot (0.02s) --- PASS: TestWorkdirRoot/run_tests (0.00s) - --- PASS: TestWorkdirRoot/run_tests/nothing (0.00s) + --- PASS: TestWorkdirRoot/run_tests/nothing (0.01s) === RUN TestBadDir --- PASS: TestBadDir (0.00s) === RUN TestUNIX2DOS --- PASS: TestUNIX2DOS (0.00s) PASS -ok github.com/rogpeppe/go-internal/testscript 28.255s +ok github.com/rogpeppe/go-internal/testscript 162.049s === RUN Test === RUN Test/basic === RUN Test/basicCRLF @@ -5643,7 +5684,7 @@ --- PASS: TestQuote/bad_data (0.00s) --- PASS: TestQuote/no_final_newline (0.00s) PASS -ok github.com/rogpeppe/go-internal/txtar 0.007s +ok github.com/rogpeppe/go-internal/txtar 0.029s patch -R -p1 -i debian/0001-Allow-TestSimple-cover-to-PASS.patch patching file _build/src/github.com/rogpeppe/go-internal/testscript/testscript.go Hunk #1 succeeded at 1155 (offset 57 lines). @@ -5668,8 +5709,8 @@ dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/txtar-c dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/testscript dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/txtar-goproxy -dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/txtar-addmod dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/txtar-x +dh_strip: warning: Could not find the BuildID in debian/go-internal/usr/bin/txtar-addmod dh_makeshlibs -a -O--builddirectory=_build -O--buildsystem=golang dh_shlibdeps -a -O--builddirectory=_build -O--buildsystem=golang dh_installdeb -O--builddirectory=_build -O--buildsystem=golang @@ -5687,12 +5728,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/23215/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/21755 and its subdirectories -I: Current time: Thu Dec 5 06:16:18 -12 2024 -I: pbuilder-time-stamp: 1733422578 +I: removing directory /srv/workspace/pbuilder/23215 and its subdirectories +I: Current time: Fri Dec 6 08:43:22 +14 2024 +I: pbuilder-time-stamp: 1733424202