Commit graph

67,250 commits

Message SHA1
Test: rename EthernetTetheringTest to CtsEthernetTetheringTest
Bug: 250552545
Bug: 258637850
Test: atest CtsEthernetTetheringTest
Change-Id: I76e687fc46f89fcfce9049ac6736bb078df06ecc

Hungming Chen   commited 2022-12-06 15:46:23 +08:00
b58191dee8
Merge "Relocate NetworkManagementServiceTest to framework"
Thiébaud Weksteen   authored and   Gerrit Code Review   commited 2022-12-06 05:57:00 +00:00
b865214380
Merge "Fix ConntrackSocketTest#testIpv4ConntrackSocket flaky"
KH Shi   authored and   Gerrit Code Review   commited 2022-12-06 05:46:54 +00:00
cc8db2ac6e
Merge "Fix empty value problem in the TextEntry"
Paul Hu   authored and   Gerrit Code Review   commited 2022-12-06 05:31:39 +00:00
ed3e683407
Merge "Test: separate common methods to EthernetTetheringTestBase"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-12-06 02:30:13 +00:00
a43bba1277
Merge "cronet: rename cronetApiTest"
Chidera Olibie   authored and   Gerrit Code Review   commited 2022-12-05 18:03:24 +00:00
59d52bbb80
Merge "Fix cell stats did not increase due to rate limit in battery stats"
Aaron Huang   authored and   Gerrit Code Review   commited 2022-12-05 14:45:08 +00:00
1131ec74db
Fix ConntrackSocketTest#testIpv4ConntrackSocket flaky
If we run an iterations test, TCP connections opened by previous tests
won't be closed immediately. They will stay in the TIME_WAIT state for
120 seconds before closed. Netfilter socket listens to both
NF_NETLINK_CONNTRACK_NEW and NF_NETLINK_CONNTRACK_DESTROY groups.

There is a tiny time gap between socket creation and sending dump
request to kernel. If an old TCP connection happened to be closed in
this time gap, listening socket would see a DESTROY message before
seeing the NEW messages triggered by dump request.

The current test only parsing the first contrack message in the read
buffer, so it will only find the DESTROY message and ignore all of the
following NEW messages. It does a netfilter socket dump, but does not
check whether the dump produces reasonable output. Now that we have
the ability to parse conntrack messages, do more in-depth checking.

Bug: 254608655
Test: atest ConntrackSocketTest --iteration 500
Change-Id: Icf95adb9d9390d598e9c6bdb4e245c5fce764e3e

KH Shi   commited 2022-12-05 22:26:52 +08:00
09eb7631fa
cronet: rename cronetApiTest
Change the name to reflect the cronet class that is being tested

Test: atest CronetApiTest
Bug: 251012627
Change-Id: I8b9c6421393582b57043a140b400f6a1e8ace601

Chidera Olibie   commited 2022-12-05 14:21:24 +00:00
e2cc572bad
Merge "cronet: remove inner TestUrlRequestCallback class"
Chidera Olibie   authored and   Gerrit Code Review   commited 2022-12-05 14:05:32 +00:00
126721cdf4
gn2bp: Add .aidl files to the srcs of java_library
Test: ./update_results.sh
Change-Id: I9c31fdb13752c5123bc5c47207982322b421b739

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
6e51412de6
gn2bp: Add _sanitize_args to WriteNativeLibrariesJavaSanitizer
Test: ./update_results.sh
Change-Id: I6658d5223b473bb4e29044458f97330628580e2b

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
3dbc2766a9
gn2bp: Add WriteNativeLibrariesJavaSanitizer
Test: ./update_results.sh
Change-Id: I09e9f428dddc8d2bd4449eeecc08c9141f5c75d8

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
b90a76b0cb
gn2bp: Add _sanitize_args to JavaCppStringSanitizer
Test: m cronet_aml_base_java_switches_srcjar
Change-Id: I02c1d68aa824352cecb88c105a1dda990a5d17de

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
3f7ab3147e
gn2bp: Add JavaCppStringSanitizer
Test: ./update_results.sh
Change-Id: I5c823d1b86b57345fbf0debcf0228ea70d67655e

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
ce5166bb67
gn2bp: Add _sanitize_args to JavaCppFeatureSanitier
Test: m cronet_aml_base_java_features_srcjar
Change-Id: I465d2c18890ac2f4b749b4e8cee50dc869766dad

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
d7c3677794
gn2bp: Add JavaCppFeatureSanitizer
Test: ./update_results.sh
Change-Id: I0b9d47aa32c53225dc549d21cf39b41ce3fdaeae

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
56a2f44408
gn2bp: Remove unrequired hack for jni_registration_generator deps
Test: ./update_results.sh
Change-Id: Ib24f03c54814550d76cf1625aa17279b96a86c7f

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
47fd40a6a5
gn2bp: Add get_tool_files to the VersionSanitizer
Test: ./update_results.sh
Change-Id: I5a7b8ea30f7bb4ab614b4037953bb60f9eff2e2a

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
df63414adf
gn2bp: Add get_tool_files to the JniGeneratorSanitizer
Test: ./update_results.sh
Change-Id: I85a7fa6218950339f1fe410562b3b0bc0dd43174

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
a6824ea959
gn2bp: Remove get_inputs from the Sanitizer
Test: ./update_results.sh
Change-Id: I4181ac236fa1313cb247eaeb427e095628b7d096

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
6c7d616dd9
gn2bp: Add script to the tool_files in get_tool_files
Test: ./update_results.sh
Change-Id: I7dd6547aea68bfd7510e91ebcc36e91c10f80ccb

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
6997586226
gn2bp: Add get_tool_files to the Sanitizer
Test: ./update_results.sh
Change-Id: I1984c63c6a40172d35029d9a231db187e917e888

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
aaf42cfe1e
gn2bp: Add get_srcs to the Sanitizer
Test: ./update_results.sh
Change-Id: If6b24297727801d4f2a80000524e9a61d5976e97

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
80fa0b0e8d
gn2bp: Fix to use target sources and inputs
`a or b` does not return the union of set a and set b.
Test: ./update_results.sh

Change-Id: I8ba2f2a96e036bab362cbb7015cc6da048e12024

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
047831e03a
gn2bp: Move _sanitize_inputs to JniRegistrationGeneratorSanitizer
Test: ./update_results.sh
Change-Id: Id88b88c9d463ab54e8e89bb62579802ea322e355

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
07027f6e85
gn2bp: Add _sanitize_inputs and get_inputs
Test: ./update_results.sh
Change-Id: Iae106bf2e474a5f10d7a77ee94b9dfe3d5ee607e

Motomu Utsumi   commited 2022-12-05 18:49:45 +09:00
735a5a4121
Fix cell stats did not increase due to rate limit in battery stats
Current test triggers batterystats to update mobile stats by
switching default network and ConnectivityService will call
reportMobileRadioPowerState to have batterystats update the
mobile stats. But in current design, batterystats will
rate-limit the update if it is due to modem power state change.
So the modem stats might not be updated if it's rate-limited.
The other reasons (plug/unplug, battery level change,etc) will
be unaffected. Thus, dump battery stats in the test to trigger
a full sync of data.

Bug: 256087047
Test: CtsNetTestCases:BatteryStatsManagerTest
Change-Id: I936d51f0c205640eac94f80062ad66f55df9d0df

Aaron Huang   commited 2022-12-05 07:28:53 +00:00
3c4231d613
Relocate NetworkManagementServiceTest to framework
Bug: 259341026
Test: TH
Change-Id: Ie06d906fa8bc65d6af3511280bc01b2859edde79

Thiébaud Weksteen   commited 2022-12-05 14:48:44 +11:00
11490a1474
gn2bp: Fix version script character escaping
* It seems that an apostrophe is required for the command to be executed successfully

Test: update_results.sh && m cronet_aml_components_cronet_android_cronet
Change-Id: Ide44e8be9d7db6894cb5bf1bcf0c3e4d67c2a228

Mohannad Farrag   authored and   Motomu Utsumi   commited 2022-12-05 12:09:49 +09:00
25697348e8
Fix empty value problem in the TextEntry
Now, the value in TextEntry would be a zero length byte array if
the text record response doesn't contain the value. The problem
is that the value could either be an empty string ("key="), or
there can be no value ("key"), as per rfc6763 6.4 "If there is
no '=' in a DNS-SD TXT record string, then it is a boolean
attribute, simply identified as being present, with no value.".

Bug: 254166302
Test: atest FramworksNetTests
Change-Id: I4eaa5e593ce9ddaa6b6cb2f069c1aef977910796

Paul Hu   commited 2022-12-05 02:18:34 +00:00
536cc4d102
Merge "Ensure calling package and UID synchronized while calling dump()"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-12-05 00:48:25 +00:00
2217cd03f4
Merge "Import translations. DO NOT MERGE ANYWHERE"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-04 17:53:24 +00:00
80ca8e0f8f
Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iac76895633eb6af61834b84b75c2312c857dfefa

Bill Yi   commited 2022-12-03 13:48:54 -08:00
c80ab04c22
Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I660b8f5400b7f35f8feb2a471fd44067d0efa73b

Bill Yi   commited 2022-12-03 13:48:01 -08:00
39d2e0d416
Merge "Wrap some IpServer commands"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 21:48:05 +00:00
767e5b6df6
Merge "Remove usages of java_api_finder"
Cole Faust   authored and   Gerrit Code Review   commited 2022-12-02 19:31:31 +00:00
65b2ec8855
gn2bp: Add get_name to BaseActionSanitizer
* This would help when creating a module for both java and c++. Where the java can get a different name depending on the Sanitizer used.

Test: update_results.sh
Change-Id: I9d1180b98a00c14d4c9851041801c6fd646d4739

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
7f7c9b44dd
gn2bp: Add JavaJniGeneratorActionSanitizer
* This is a copy of the JniGeneratorActionSanitizer class but supposed to be for the java version where it removes the .h files.

Test: update_results.sh
Change-Id: I9fd38e75b57a9a7a25cd2a9b6caea117f88a2f05

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
457bc02a7b
gn2bp: Create java_genrule directly from create_action_module
* Instead of going through creating `java_genrule` through `create_modules_from_target`. It's better to just create the genrules from `create_action_module` directly.

Test: update_results.sh
Change-Id: I35d1bf8854b5724390ea776c01e54452fcbaaba6

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
4b89a8275a
gn2bp: Delete get_args
This shouldn't be exposed as it doesn't benefit the module in any way. The module can call `get_cmd` to generate a suitable `cmd`.

Test: update_results.sh
Change-Id: I671b176ca748fc2d956d738199f0d7390a29dea9

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
584613d745
gn2bp: Add escape quotations as part of BaseActionSanitizer
* Quotations escaping is a universal operation that would benefit every subclass. Moving this up in the BaseActionSanitizer to cover for the `java_genrule` errors.

Test: update_results.sh
Change-Id: If6a7296b85170294b596566da413332fe395913f

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
60b377099f
gn2bp: Add JniRegistrationGenerator get_cmd
* jni_registration_generator action has extra cmds that needs to be appeneded to the original cmd like generation of the java files.
* Moved `NEWLINE` to the top of the file.

Test: update_results.sh
Change-Id: I92cec28786472ef31b514698422e100885714250

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
291f567f86
gn2bp: Add get_cmd logic.
* Move the creation of cmd implementation to `BaseActionSanitizer`. This is important because we don't want to expose the target args as this will change the original target.

Test: update_results.sh
Change-Id: I4932408d8add345ed8e480b0dc2cd65e73d54b09

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
c739dda3f1
gn2bp: add get_cmd to BaseActionSanitizer
Test: update_results.sh
Change-Id: I054607965a7011b1fccb67b5e89744b86dce2345

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
d5515ca062
gn2bp: Remove redundant blueprint.add_module
* This is already called in `create_action_module`. JniGenerator_Java will be added again in an upcoming CL.

[I think create_action_module shouldn't call that in the first place.]

Test: update_results.sh
Change-Id: I409fb37a135c2249f777d47b97c1565552d2b7ab

Mohannad Farrag   commited 2022-12-02 17:33:41 +00:00
fa76dca684
gn2bp: Move response file to gn_utils
* This is a GN-specific flag that should live in gn_utils as it might be used in the future when converting to Bazel.

Test: update_results.sh
Change-Id: If870f757cf3ee57a00c571947a7ffea18a7db55d

Mohannad Farrag   commited 2022-12-02 17:33:41 +00:00
a0e37c105f
gn2bp: Move replacing of response_file to Sanitizer
* This was affecting the original target args as it was being executed after setting target.args . So this is a step in maintaining the original target as a read-only object.

Test: update_results.sh
Change-Id: I6852dbecbd1ce304af091f3e4d00e0d698cd53f8

Mohannad Farrag   commited 2022-12-02 16:59:49 +00:00
00ecfb5183
Merge changes I119583b6,I00ae8f7d,I1b4033ae,I133dfdd7,Idc7a2ed2, ...
* changes:
  gn2bp: Move arg output from get_outputs to _sanitize_outputs
  gn2bp: Move arg sanitizing from get_args to _sanitize_args
  gn2bp: Add sanitize API to the BaseActionSanitizer
  gn2bp: Update is_header_generated in the BaseActionSanitizer
  gn2bp: Update is_header_generated of MakeDafsaSanitizer
  gn2bp: Add MakeDafsaSanitizer
  gn2bp: Add is_header_generated to the BaseActionSanitizer
  gn2bp: Remove unrequired hack for action_with_pydeps
  gn2bp: Use the result of get_outputs as module.out
  gn2bp: Add get_outputs to JniGeneratorSanitizer
  gn2bp: Fix to use set for target.outputs
  gn2bp: Add get_outputs to the BaseActionSanitizer
  gn2bp: Fix arg normalization and remove hack in the VersionSanitizer
  gn2bp: Normalize args by for loop instead of comprehension
  gn2bp: Update the comment for value args and list args
  gn2bp: Update _is_value_arg

Mohannad Farrag   authored and   Gerrit Code Review   commited 2022-12-02 12:06:03 +00:00
fc8464d500
Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 11:27:27 +00:00
841b1f33d5