Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/netinet6/ndp.sh
| Show First 20 Lines • Show All 828 Lines • ▼ Show 20 Lines | atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \ | ||||
| --rtipref 4 --rtiltime 100 | --rtipref 4 --rtiltime 100 | ||||
| # Wait for a default router to appear. | # Wait for a default router to appear. | ||||
| while [ -z "$(jexec ${jname} ndp -r)" ]; do | while [ -z "$(jexec ${jname} ndp -r)" ]; do | ||||
| sleep 0.1 | sleep 0.1 | ||||
| done | done | ||||
| # Make sure routes from rti option are being installed | # Make sure routes from rti option are being installed | ||||
| atf_check -s exit:0 \ | atf_check -s exit:0 -o save:netstat_out netstat -j ${jname} -rn6 | ||||
| -o match:"^${route1}/32[[:space:]]+${lladdr}.*1800" \ | atf_check -s exit:0 -o match:"^default[[:space:]]+${lladdr}" \ | ||||
pouria: could you please add another -lt 600 to make sure it doesn't mix with expiration time of… | |||||
Done Inline ActionsWhat do you mean by "mix with expiration time"? They are two different routes with two different row entries in the output of netstat -rn6. siva: What do you mean by "mix with expiration time"? They are two different routes with two… | |||||
Not Done Inline Actions
Yes, let me rephrase that. The code is good as is. pouria: > What do you mean by "mix with expiration time"? They are two different routes with two… | |||||
| -o match:"^${route2}/48[[:space:]]+${lladdr}.*600" \ | cat netstat_out | ||||
| -o match:"^default[[:space:]]+${lladdr}" \ | |||||
| jexec ${jname} netstat -rn6 | # Ensure that route1's and route2's expiration times are correct | ||||
| # respectively and do not get swapped | |||||
| expire1="$(grep "^${route1}/32[[:space:]]*${lladdr}" netstat_out | cut -wf5)" | |||||
| atf_check -s exit:0 test 601 -le ${expire1} -a ${expire1} -le 1800 | |||||
| expire2="$(grep "^${route2}/48[[:space:]]*${lladdr}" netstat_out | cut -wf5)" | |||||
| atf_check -s exit:0 test ${expire2} -le 600 | |||||
| # Verify the default route lifetime and its preference is overwrited | # Verify the default route lifetime and its preference is overwrited | ||||
| atf_check -s exit:0 \ | atf_check -s exit:0 \ | ||||
| -o match:"^${lladdr}%${epair0}a if=${epair0}a, flags=, pref=medium, expire=1m.*" \ | -o match:"^${lladdr}%${epair0}a if=${epair0}a, flags=, pref=medium, expire=1m.*" \ | ||||
| jexec ${jname} ndp -r | jexec ${jname} ndp -r | ||||
| } | } | ||||
| ndp_routeinfo_option_cleanup() { | ndp_routeinfo_option_cleanup() { | ||||
| Show All 20 Lines | |||||
could you please add another -lt 600 to make sure it doesn't mix with expiration time of ${route2}?