Closed Bug 1167099 Opened 9 years ago Closed 9 years ago

[Emulator][KK] Wifi tethering test case failure

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
2.2 S14 (12june)
Tracking Status
firefox41 --- fixed

People

(Reporter: hchang, Assigned: hchang)

References

Details

Attachments

(2 files)

Run wifi test cases on KK arm emu (with Bug 1166660 applied) 

$ ./mach marionette-webapi gecko/dom/wifi/test/marionette/manifest.ini

Result:


SUMMARY
-------
 7:39.37 LOG: MainThread INFO passed: 12
 7:39.37 LOG: MainThread INFO failed: 3
 7:39.37 LOG: MainThread INFO todo: 0
 7:39.37 LOG: MainThread INFO 
FAILED TESTS
-------
 7:39.37 LOG: MainThread INFO test_wifi_tethering_wifi_disabled.js
 7:39.37 LOG: MainThread INFO test_wifi_tethering_wifi_inactive.js
 7:39.37 LOG: MainThread INFO test_wifi_tethering_wifi_active.js
 7:42.45 SUITE_END: MainThread 
Summary
=======

Ran 18 tests (15 parents, 3 subtests)
Expected results: 12
Unexpected results: 6 (FAIL: 6)

Unexpected Results
==================

test_wifi_tethering_wifi_disabled.js
------------------------------------
FAIL Promise rejects during test(MASQUERADE not found while tethering is enabled)
FAIL [Parent]
test_wifi_tethering_wifi_inactive.js
------------------------------------
FAIL Promise rejects during test(MASQUERADE not found while tethering is enabled)
FAIL [Parent]
test_wifi_tethering_wifi_active.js
----------------------------------
FAIL Promise rejects during test(TypeError: aNetwork is undefined)

I suspect the some options are not enabled for the kernel used by the emulator.
Assignee: nobody → hchang
Blocks: 1166658
Seems we should cherry-pick [1] from branch 2.6 to enable 'ip rule' again.
Will request a PR soon.

[1] https://github.com/mozilla-b2g/kernel_goldfish/commit/7909b6130e771f07247c987dbdaf68dbc8877970
We might also need to apply changes in Bug 1022460.
The iptables config is changed on KK:

When tethering is not enabled:

root@flame:/ # iptables -t nat -L                                              
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
oem_nat_pre  all  --  anywhere             anywhere            

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
natctrl_nat_POSTROUTING  all  --  anywhere             anywhere            
st_nat_POSTROUTING  all  --  anywhere             anywhere            

Chain natctrl_nat_POSTROUTING (1 references)
target     prot opt source               destination         

Chain oem_nat_pre (1 references)
target     prot opt source               destination         

Chain st_nat_POSTROUTING (1 references)
target     prot opt source               destination       

------------------------------------------------------
When tethering is enabled:

root@flame:/ # iptables -t nat -L                                              
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
oem_nat_pre  all  --  anywhere             anywhere            

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
natctrl_nat_POSTROUTING  all  --  anywhere             anywhere            
st_nat_POSTROUTING  all  --  anywhere             anywhere            

Chain natctrl_nat_POSTROUTING (1 references)
target     prot opt source               destination         
MASQUERADE  all  --  anywhere             anywhere            

Chain oem_nat_pre (1 references)
target     prot opt source               destination         

Chain st_nat_POSTROUTING (1 references)
target     prot opt source               destination
Attached patch Bug1167099.patchSplinter Review
Comment on attachment 8610492 [details] [diff] [review]
Bug1167099.patch

Hi Vincent, 

Could you please have a review on this patch? Since the NatController of
netd no longer uses 'ip rule' to config NAT. Instead, it uses 'iptables'.
We don't need to enable the advanced route for the kernel. Besides, all
the changes in Bug 1022460 has been applied by Seilin in the earlier
patches. All the fixes are in the test case:

1) New version of netd (since JB) uses 'natctrl_nat_POSTROUTING' instead
   of 'POSTROUTING' to do the MASQUERADE. So the test case has to check
   the sdk version first then examine the section based on the AOSP version.

2) Since there is still some issue to have a available stock AP, for
   those test cases which use stock AP for testing, we need to turn
   the stock AP before testing to avoid any interference. That's the
   intention of the changes in |doTestTethering|.

3) For test_wifi_tethering_wifi_active.js, due to Bug 1168285, we need
   to skip some test steps to get around the bug.
Attachment #8610492 - Flags: review?(vchang)
Comment on attachment 8610492 [details] [diff] [review]
Bug1167099.patch

Review of attachment 8610492 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you.
Comment on attachment 8610492 [details] [diff] [review]
Bug1167099.patch

Review of attachment 8610492 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you.
Attachment #8610492 - Flags: review?(vchang) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b0b70cfa50f0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S14 (12june)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: