Update vm-tests to ART behavior

ART is more compliant with respect to standard behavior.

Bug: 16956477

(cherry picked from commit c9107eed67643b590c062174479309f13c7cb1d4)

Change-Id: Ifec1fa2a9ac99ea49759f9436ee917df734fb2e8
Merge "Update vm-tests to ART behavior"
Added C++11 option to libcoremathtestcpp

Change-Id: I1a1c7c0c24f76914719901d9b7f3c393395a01cb
Switch from racy notify()/wait() to using a proper semaphore.

Bug: 17003763
Change-Id: I87f84a376ccf057f4073ec58bc0599e9615b95ac
(cherry picked from commit 3797c659c9535f61becd0f83e66cb01b2e45f265)
Merge "Switch from racy notify()/wait() to using a proper semaphore."
media: use proper input timestamp in VideoEncoderDecoderTest

Change-Id: I004b3df59391a7b1538ddac22df367a3bbab7eac
Signed-off-by: Yoongeun Kwon <yoongeun.kwon@lge.com>
Merge "Added C++11 option to libcoremathtestcpp"
Merge "media: use proper input timestamp in VideoEncoderDecoderTest"
Add new static library dependencies for bionic-unit-tests-cts
Merge "Add new static library dependencies for bionic-unit-tests-cts"
CTS: Fix & amend VM tests

Refactor the VM tests to be slightly more maintainable and precise.
Fix errors uncovered by refactoring. Add tests for b/17207857.

Bug: 17207857, 17266951, 17264206, 17287529

(cherry picked from commit 1d1a3a998c1887aa1d1cea6ca417524d6c69635a)

Change-Id: I753c568e1417eea9582dd45c965da0dbd6ffa01b
Merge "CTS: Fix & amend VM tests"
Fixing TimeTest

This change contains three fixes:
1) The test for the French locale was incorrect (expectation of GMT+1
not GMT+2 for Paris).
2) The tests were sensitive to the locale setting of the device they
were run on. This has been fixed by modifying the way in which the
test sets the current locale. Additional problems were noticed but
these are fixed in a separate change for TimeFormatter.
3) Uncommenting some assertions that now pass.

Bug: 17262063
Change-Id: Iacd9d2410e62ba4db0e0d42052b27df9d77aa374
Merge "Fixing TimeTest"
Skip encoding tests for unsupported resolutions.

Some low-tier chipsets do not support video encoding at resolutions
above 720p (1280x720). However, some of the CTS tests attempt to encode
at these resolutions even if they are not supported, and therefore fail.

To fix this, because running the test itself, check that the video size
is supported, and skip the test if not.

To check whether the resolution is supported, for the AVC case, compare
the requested resolution with the limits specified in the AVC
specification, based on the level supported by the encoder.

Change-Id: I3ecb8d30235c8fef854551ce2b10c65ae72d86f9
Signed-off-by: Yoongeun Kwon <yoongeun.kwon@lge.com>
LocalSocketTest.testAccessors: fix the *SendBufferSize* test

If one sets a *SendBufferSize* value which is less than
(2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))) then the value
retrieved will be (2 * (2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff)))).
Otherwise, the value will be doubled.
Modify the test to use a larger value.

Bug: 16442451
Change-Id: I2d89393b1ad441783c8a082b072a806b8901830c
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Merge "LocalSocketTest.testAccessors: fix the *SendBufferSize* test"
Need to handle INFO_OUTPUT_BUFFERS_CHANGED in an encode test

MSDK OMX plugin will reconfiged the output buffers when the first encode
frame coming up. After that, Output buffers will be re-allocated and a
message MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED will be raised simultaneously,
up-layer application have to handle this message and get the new
outputbuffers, otherwise it will be wrong.

But the cts test EncodeVirtualDisplayWithCompositionTest did not handle
the message MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED cause the outputbuffers
are outdated, then crash happened when java want to read them.

Modified the test case to handle MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED as
EncoderTest.java does.

Change-Id: I32ea59a9d34880e33d374d1999990596b865f8ea
Singed-off-by: Ying Chang <ying.chang@intel.com>
Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Wang LiangX <liangx.wang@intel.com>
Merge "Need to handle INFO_OUTPUT_BUFFERS_CHANGED in an encode test"
Merge "Skip encoding tests for unsupported resolutions."