Bug 142967

Summary: [EFL][WK2] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model fails to pass
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, lucas.de.marchi, ossy, piorkowskiprzemyslaw
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 132813    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Gyuyoung Kim 2015-03-23 08:46:16 PDT
In test_ewk2_context, EWK2ContextTestMultipleProcesses.ewk_context_network_process_model is often failed. The failure reason is that webView1WebProcessID is same with webView2WebProcessID. Need to investigate.


    PlatformProcessIdentifier webView1WebProcessID = toImpl(EWKViewGetWKView(webView1))->page()->process().processIdentifier();
    PlatformProcessIdentifier webView2WebProcessID = toImpl(EWKViewGetWKView(webView2))->page()->process().processIdentifier();
    PlatformProcessIdentifier webView1NetworkProcessID = toImpl(EWKViewGetWKView(webView1))->page()->process().processPool().networkProcess()->processIdentifier();
    PlatformProcessIdentifier webView2NetworkProcessID = toImpl(EWKViewGetWKView(webView2))->page()->process().processPool().networkProcess()->processIdentifier();

    ASSERT_NE(webView1WebProcessID, webView2WebProcessID);
Comment 1 Gyuyoung Kim 2015-03-23 09:02:18 PDT
This test result looks like flaky.
Comment 2 Gyuyoung Kim 2015-04-16 05:41:17 PDT
I disable this test until fixing it in order to maintain EFL bot. Bug 143824 is filed to disable it.
Comment 3 Gyuyoung Kim 2015-07-12 22:43:04 PDT
Created attachment 256687 [details]
Patch
Comment 4 Gyuyoung Kim 2015-07-12 22:46:44 PDT
EWK2ContextTestMultipleProcesses.ewk_context_network_process_model test is flaky in EFL API test. When failure happens, process id is 0 as below,

../../Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp:254: Failure
Expected: (webView1WebProcessID) != (webView2WebProcessID), actual: 0 vs 0
[  FAILED  ] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model (8 ms)
[----------] 2 tests from EWK2ContextTestMultipleProcesses (24 ms total)


It looks that 0 can be returned when page is not closed.

PlatformProcessIdentifier WebPageProxy::processIdentifier() const
{
    if (m_isClosed)
        return 0;

    return m_process->processIdentifier();
}

Unfortunately I don't know yet why a page is closed during the test. So I add a workaround condition which doesn't test it when process id is 0 for now.
Comment 5 Gyuyoung Kim 2015-07-13 01:20:46 PDT
Created attachment 256690 [details]
Patch
Comment 6 Gyuyoung Kim 2015-07-14 19:39:56 PDT
Ossy, ping ?
Comment 7 Gyuyoung Kim 2015-07-16 20:16:38 PDT
Created attachment 256955 [details]
Patch
Comment 8 Csaba Osztrogonác 2015-07-22 06:59:43 PDT
Comment on attachment 256955 [details]
Patch

rs=me
Comment 9 WebKit Commit Bot 2015-07-22 07:54:50 PDT
Comment on attachment 256955 [details]
Patch

Clearing flags on attachment: 256955

Committed r187156: <http://trac.webkit.org/changeset/187156>
Comment 10 WebKit Commit Bot 2015-07-22 07:54:53 PDT
All reviewed patches have been landed.  Closing bug.