Closed Bug 1528963 Opened 6 years ago Closed 6 years ago

gtests under windows don't output anything locally if you don't pipe through `tee`

Categories

(Testing :: GTest, defect)

Version 3
defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Gijs, Assigned: emk)

References

Details

Attachments

(2 files)

I guess people don't run gtests on Windows? Anyway, not showing any test output is not helpful. The last line is just:

 0:39.30 Your build was successful!
 0:39.30 path/to\dist\bin\firefox.exe -unittest --gtest_death_test_style=threadsafe --wait-for-browser

It should show the actual test output.

Hm, bug 1091608 regressed?

I think launcher process caused the regression because launcher process will launch the child before UseParentConsole() is called.

Blocks: 1488554

Could be. Gijs, what version of Windows are you running?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Aaron Klotz [:aklotz] from comment #3)

Could be. Gijs, what version of Windows are you running?

Win10 pro, 18334.19h1_release.190205-1505 (insider fast ring)

Flags: needinfo?(gijskruitbosch+bugs)

ni? myself so that this stays on my radar. I should be able to get to it soon.

Flags: needinfo?(aklotz)

I confirmed that disabling launcher process worked around the issue.

(In reply to Masatoshi Kimura [:emk] from comment #6)

I confirmed that disabling launcher process worked around the issue.

Sorry, it was a bit premature. I got a console output even without disabling launcher process. Maybe a bug of 19H1 Insider Preview? I'm using version 1809 build 17763.

I also have console output on 1809.

Flags: needinfo?(aklotz)

Yeah, so I'm now on 1903, build 18351.1, and it's still not working.

How can I get more data to help diagnose what's going on?

Flags: needinfo?(aklotz)

(In reply to :Gijs (he/him) from comment #9)

Yeah, so I'm now on 1903, build 18351.1, and it's still not working.

How can I get more data to help diagnose what's going on?

Hmm... I'm not sure if there are any utilities out there that show the current state of the various console handles. I'll have to look into that.

I'd also like to confirm: Are you running mach gtest from MSYS?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Aaron Klotz [:aklotz] from comment #10)

I'd also like to confirm: Are you running mach gtest from MSYS?

I'm afraid I don't know exactly what this question is asking. I'm using mozilla-build, I'm not using the newfangled win10 linux subsystem stuff, and am literally running:

./mach gtest SomeTest.*

It shows the build output, but then doesn't show the test output. Unless I add | tee to my commandline, then it works.

I'm using ConEmu, but a few days ago, on a slightly older build, to confirm that wasn't the problem I tried just running start-shell.bat from mozilla-build (to get me a "normal" cmd console with the mozilla-build sh/bash/whatever shell loaded) and that had the same issue. Does that help? If not, can you expand on what you mean by "from MSYS"?

Flags: needinfo?(gijskruitbosch+bugs)

Yeah, when I say MSYS I am referring to the console that is started by the mozilla-build scripts.

This problem happened to me. I'm using Windows 10 version 1809 and standard cmd.exe and MozillaBuild start-shell.bat.

(In reply to Masatoshi Kimura [:emk] from comment #7)

Sorry, it was a bit premature. I got a console output even without disabling launcher process.

This is because ./mach gtest did not update firefox.exe even if .mozconfig is touched. Definitely regressed by the launcher process..

Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7cb86942ed34 Attach console before launching child. r=aklotz
Backout by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7cfcdf742d19 Backed out changeset 7cb86942ed34 for bustages at nsEmbedFunctions.cpp on a CLOSED TREE.

Backed out changeset 7cb86942ed34 (bug 1528963) for bustages at nsEmbedFunctions.cpp on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/7cfcdf742d19ef55f45ef9150a15908247112f03

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=7cb86942ed34f38e03e7f2a0eefee0a3141980b5&selectedJob=236776862

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=236776862&repo=autoland&lineNumber=27248

Log snippet:
[task 2019-03-28T23:37:41.859Z] 23:37:41 INFO - TEST-PASS | check_stdcxx | TestTypeTraits
[task 2019-03-28T23:37:41.859Z] 23:37:41 INFO - TEST-PASS | check_libgcc | TestTypeTraits
[task 2019-03-28T23:37:41.859Z] 23:37:41 INFO - TEST-PASS | check_glibc | TestTypeTraits
[task 2019-03-28T23:37:41.859Z] 23:37:41 INFO - TEST-PASS | check_textrel | TestTypeTraits
[task 2019-03-28T23:37:41.859Z] 23:37:41 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/nss/nss_nss3'
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - security/nss/lib/nss/empty.o
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang -std=gnu99 -m32 -o empty.o -c -DDEBUG -DNSS_FIPS_DISABLED -DNSS_NO_INIT_SUPPORT -DNSS_X86_OR_X64 -DNSS_X86 -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DLINUX2_1 -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNSS_DISABLE_LIBPKIX -I/builds/worker/workspace/build/src/security/nss/lib/nss -I/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/nss/nss_nss3 -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/private/nss -I/builds/worker/workspace/build/src/obj-firefox/dist/include -fPIC -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fcrash-diagnostics-dir=/builds/worker/artifacts -march=pentium-m -msse -msse2 -mfpmath=sse -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread -fPIC -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -funwind-tables -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -MD -MP -MF .deps/empty.o.pp /builds/worker/workspace/build/src/security/nss/coreconf/empty.c
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/nss/nss_nss3'
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/nss/nss_nss3'
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - security/nss/lib/nss/libnss3.so
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - rm -f libnss3.so
[task 2019-03-28T23:37:42.047Z] 23:37:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/nss/nss_nss3'
[task 2019-03-28T23:37:42.108Z] 23:37:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/toolkit/xre'
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -m32 -o nsEmbedFunctions.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DTELEMETRY_PING_FORMAT_VERSION=4 -DPROXY_PRINTING=1 -DOS_POSIX=1 -DOS_LINUX=1 -DUSE_GLX_TEST '-DMOZ_APP_NAME="firefox"' '-DMOZ_APP_BASENAME="Firefox"' '-DMOZ_APP_DISPLAYNAME="Firefox Nightly"' '-DMOZ_APP_VENDOR="Mozilla"' '-DMOZ_APP_VERSION="68.0a1"' '-DOS_TARGET="Linux"' '-DMOZ_WIDGET_TOOLKIT="gtk3"' -DMOZ_UPDATER '-DTARGET_OS_ABI="Linux_x86-gcc3"' -DGRE_MILESTONE=68.0a1 -DMOZ_APP_VERSION_DISPLAY=68.0a1 -DAPP_VERSION=68.0a1 '-DAPP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}' -DMOZ_BUILD_APP_IS_BROWSER -DTOPOBJDIR=/builds/worker/workspace/build/src/obj-firefox -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/toolkit/xre -I/builds/worker/workspace/build/src/obj-firefox/toolkit/xre -I/builds/worker/workspace/build/src/toolkit/components/remote -I/builds/worker/workspace/build/src/toolkit/components/printingui -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/other-licenses/nsis/Contrib/CityHash/cityhash -I/builds/worker/workspace/build/src/toolkit/components/find -I/builds/worker/workspace/build/src/toolkit/components/printingui/ipc -I/builds/worker/workspace/build/src/toolkit/components/windowwatcher -I/builds/worker/workspace/build/src/toolkit/mozapps/update/common -I/builds/worker/workspace/build/src/toolkit/profile -I/builds/worker/workspace/build/src/config -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/commandhandler -I/builds/worker/workspace/build/src/dom/ipc -I/builds/worker/workspace/build/src/dom/webbrowserpersist -I/builds/worker/workspace/build/src/testing/gtest/mozilla -I/builds/worker/workspace/build/src/toolkit/crashreporter -I/builds/worker/workspace/build/src/xpcom/build -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -march=pentium-m -msse -msse2 -mfpmath=sse -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -funwind-tables -Werror -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wno-error=shadow -MD -MP -MF .deps/nsEmbedFunctions.o.pp /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:83:10: fatal error: 'mozilla/WindowsConsole.h' file not found
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - #include "mozilla/WindowsConsole.h"
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - 1 error generated.
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - /builds/worker/workspace/build/src/config/rules.mk:805: recipe for target 'nsEmbedFunctions.o' failed
[task 2019-03-28T23:37:42.111Z] 23:37:42 ERROR - make[4]: *** [nsEmbedFunctions.o] Error 1
[task 2019-03-28T23:37:42.111Z] 23:37:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/toolkit/xre'
[task 2019-03-28T23:37:42.112Z] 23:37:42 INFO - make[4]: *** Waiting for unfinished jobs....
[task 2019-03-28T23:37:42.112Z] 23:37:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/gfx/angle/targets/translator'
[task 2019-03-28T23:37:42.112Z] 23:37:42 INFO - gfx/angle/targets/translator/StructureHLSL.o
[task 2019-03-28T23:37:42.112Z] 23:37:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/gfx/angle/targets/translator'
[task 2019-03-28T23:37:42.188Z] 23:37:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/security/nss/lib/freebl/freebl_freeblpriv3'
[task 2019-03-28T23:37:42.188Z] 23:37:42 INFO - security/nss/lib/freebl/sha512.o

Flags: needinfo?(VYV03354)
Pushed by VYV03354@nifty.ne.jp: https://hg.mozilla.org/integration/autoland/rev/e3bb3f30b313 Attach console before launching child. r=aklotz

Something I missed in the review for this patch:

In browser/app/winlauncher/moz.build, adding /widget/windows/WindowsConsole.cpp to UNIFIED_SOURCES should be unconditional. The MOZ_LAUNCHER_PROCESS config var indicates that the launcher process is on by default. We still need to compile WindowsConsole.cpp even when MOZ_LAUNCHER_PROCESS is not set.

Do you mind writing a follow-up patch to fix this?

Flags: needinfo?(aklotz) → needinfo?(VYV03354)

I sent a follow-up patch.

Flags: needinfo?(VYV03354)
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e763663e3a43 Followup to fix compile error when launcher process is off by default. r=aklotz
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: