Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conftest: Randomize default PAN_ID #300

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

MrKevinWeiss
Copy link
Contributor

Due to some issues with other border routers running we should harden the tests against that by using a random PAN_ID.

See #299 for some info (it contains a train of references)

@MrKevinWeiss
Copy link
Contributor Author

From a locally run test
> ifconfig
ifconfig
Iface  6  HWaddr: 0B:BE  Channel: 26  NID: 0x1905  PHY: O-QPSK 
          
          Long HWaddr: E6:D3:6F:EC:DF:36:0B:BE 
           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::e4d3:6fec:df36:bbe  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff36:bbe
          inet6 group: ff02::1a
          
          Statistics for Layer 2
            RX packets 1  bytes 43
            TX packets 3 (Multicast: 3)  bytes 115
            TX succeeded 3 errors 0
          Statistics for IPv6
            RX packets 1  bytes 64
            TX packets 3 (Multicast: 3)  bytes 178
            TX succeeded 3 errors 0

> ifconfig 6 add beef::1/64
ifconfig 6 add beef::1/64
success: added beef::1/64 to interface 6
> ssh -t weoss@saclay.iot-lab.info 'socat - tcp:m3-10.saclay.iot-lab.info:20000' 


> ifconfig
ifconfig
Iface  6  HWaddr: 67:C3  Channel: 26  NID: 0x1905  PHY: O-QPSK 
          
          Long HWaddr: 7A:94:05:FF:25:8D:E7:C3 
           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::7894:5ff:258d:e7c3  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff8d:e7c3
          inet6 group: ff02::1a
          
          Statistics for Layer 2
            RX packets 6  bytes 230
            TX packets 5 (Multicast: 5)  bytes 201
            TX succeeded 5 errors 0
          Statistics for IPv6
            RX packets 6  bytes 356
            TX packets 5 (Multicast: 5)  bytes 306
            TX succeeded 5 errors 0

> ifconfig 6 add affe::1/120
ifconfig 6 add affe::1/120
success: added affe::1/120 to interface 6
> nib route add 6 :: fe80::7894:5ff:258d:e7c3
nib route add 6 :: fe80::7894:5ff:258d:e7c3
> nib route add 6 :: fe80::e4d3:6fec:df36:bbe
nib route add 6 :: fe80::e4d3:6fec:df36:bbe
> ping beef::1 -c 100 -i 300 -s 1024 -W 1000
ping beef::1 -c 100 -i 300 -s 1024 -W 1000
1032 bytes from beef::1: icmp_seq=0 ttl=64 rssi=-46 dBm time=154.346 ms
1032 bytes from beef::1: icmp_seq=1 ttl=64 rssi=-46 dBm time=147.027 ms

@MrKevinWeiss
Copy link
Contributor Author

Needs #301 for the CI fix

miri64
miri64 previously approved these changes Jan 31, 2024
@miri64
Copy link
Member

miri64 commented Jan 31, 2024

Started testrun here https://github.com/RIOT-OS/RIOT/actions/runs/7724069733

conftest.py Outdated
@@ -29,6 +30,7 @@
RIOTBASE = os.environ.get('RIOTBASE')
RUNNING_CTRLS = []
RUNNING_EXPERIMENTS = []
DEFAULT_PAN_ID = format(random.randint(0, 0xFFFD), "x")
Copy link
Member

@miri64 miri64 Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DEFAULT_PAN_ID = format(random.randint(0, 0xFFFD), "x")
DEFAULT_PAN_ID = f"0x{random.randint(0, 0xFFFD):x}"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just use a decimal int.

@MrKevinWeiss
Copy link
Contributor Author

wait wait wait. I think dec is cleanest.

@MrKevinWeiss MrKevinWeiss force-pushed the pr/randomdefaultpanid branch 2 times, most recently from a6e585a to e2f9fb5 Compare January 31, 2024 10:46
@MrKevinWeiss
Copy link
Contributor Author

MrKevinWeiss commented Jan 31, 2024

Let's see the results

@miri64
Copy link
Member

miri64 commented Jan 31, 2024

Should we run it once more completely or due we trust the selected results?

@MrKevinWeiss
Copy link
Contributor Author

lets do it completely.

@miri64
Copy link
Member

miri64 commented Jan 31, 2024

Due to some issues with other border routers running we should harden the tests against that by using a random PAN_ID.
@MrKevinWeiss
Copy link
Contributor Author

Maybe we should also make a mark for really slow (1 hour stress test) so that we don't timeout the action...

@miri64
Copy link
Member

miri64 commented Jan 31, 2024

The interop test between GNRC and lwIP fails. Is there some extra tweeking needed for lwIP :-/?

@miri64
Copy link
Member

miri64 commented Jan 31, 2024

From what I see in the code, the PAN ID should be set... I will have a look, once I have some boards or a more stable Internet connection if this is really the case.

@miri64
Copy link
Member

miri64 commented Feb 1, 2024

From what I see in the code, the PAN ID should be set...

Nope, the needed default-radio-settings.inc.mk is not included. See RIOT-OS/RIOT#20325.

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miri64 miri64 merged commit 7c266a8 into RIOT-OS:master Feb 2, 2024
3 checks passed
@MrKevinWeiss MrKevinWeiss deleted the pr/randomdefaultpanid branch February 2, 2024 15:20
@MrKevinWeiss
Copy link
Contributor Author

Thanks for looking after this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants