Merge ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:absolute_path_for_tsn-listener into ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master

Proposed by Vincent Liao
Status: Merged
Approved by: Vincent Liao
Approved revision: c8c455e179ec8ed7ff09c69ddc3be4fdfc091500
Merged at revision: fb233729c779ec352ded3b413b3b18b558406743
Proposed branch: ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:absolute_path_for_tsn-listener
Merge into: ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master
Diff against target: 13 lines (+1/-1)
1 file modified
bin/tsn_credit_based_shaper.sh (+1/-1)
Reviewer Review Type Date Requested Status
Vic Liu Approve
StanleyHuang Needs Information
Patrick Liu (community) Approve
Rick Wu Pending
PeiYao Chang Pending
Review via email: mp+455847@code.launchpad.net

Commit message

Modify: Provide the absolute path for tsn server to run tsn-listener

Since tsn server need to run the command tsn-listener, with snap `checkbox-iiotg-classic` installed, we could run it under the path /snap/checkbox-iiotg-classic/current/usr/bin/ which is inside of snap `checkbox-iiotg`.

Description of the change

The `tsn-talker` is inside of `checkbox-iiotg`, so we should provide the absolute path to it

submission: https://certification.canonical.com/hardware/202306-31658/submission/343427/test/203648/result/37679331/

Changed: `./tsn-listener` -> `/snap/checkbox-iiotg-classic/current/usr/bin/tsn-listener`

To post a comment you must log in.
Revision history for this message
Patrick Liu (patliu) wrote :

LGTM

review: Approve
Revision history for this message
StanleyHuang (stanley31) wrote :

I am a bit confuse about the description, is the tsa-listener binary file inside of checkbox-iiotg snap or checkbox-iiotg-classic snap?

"""
we could run it under the path /snap/checkbox-iiotg-classic/current/usr/bin/ which is inside of snap `checkbox-iiotg`."""

review: Needs Information
Revision history for this message
Vic Liu (zongminl) wrote :

What happens when you're running this test in a Ubuntu Core image? That would probably cause a problem when you're using hard-coded path /snap/checkbox-iiotg-classic/

review: Needs Fixing
Revision history for this message
Vincent Liao (liaou3) wrote :

> What happens when you're running this test in a Ubuntu Core image? That would
> probably cause a problem when you're using hard-coded path /snap/checkbox-
> iiotg-classic/

The machine need to run this command is the tsn server which is a machine that we could control. And also we assume the tsn server should be installed with ubuntu classic image. That's why this path is hardcoded with `classic`.

Revision history for this message
Vic Liu (zongminl) wrote :

Maybe $SNAP env can be a better option?

Revision history for this message
Vincent Liao (liaou3) wrote :

> Maybe $SNAP env can be a better option?

No, we can't. Because things will go wrong when testing on core image.

We are trying to run "$SNAP/usr/bin/tsn-listener", then it will be "/snap/checkbox-iiotg/current/usr/bin/tsn-listener" running on the tsn server which is installed with classic image.

Revision history for this message
Vic Liu (zongminl) wrote :

+1, thank you

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/tsn_credit_based_shaper.sh b/bin/tsn_credit_based_shaper.sh
2index f023b3b..6635815 100755
3--- a/bin/tsn_credit_based_shaper.sh
4+++ b/bin/tsn_credit_based_shaper.sh
5@@ -31,7 +31,7 @@ echo ""
6
7 echo "## Start listening on TSN server..."
8 output=$(mktemp)
9-(sshpass -p "$server_pwd" ssh -o StrictHostKeyChecking=no "$server_user"@"$server_ip" "echo $server_pwd | sudo -S stdbuf -oL timeout 55 ./tsn-listener -d 01:AA:AA:AA:AA:AA -i $server_eth_interface -s 1500") | tee "$output"
10+(sshpass -p "$server_pwd" ssh -o StrictHostKeyChecking=no "$server_user"@"$server_ip" "echo $server_pwd | sudo -S stdbuf -oL timeout 55 /snap/checkbox-iiotg-classic/current/usr/bin/tsn-listener -d 01:AA:AA:AA:AA:AA -i $server_eth_interface -s 1500") | tee "$output"
11 lines=$(tail -n 50 "$output")
12 while read -r line
13 do

Subscribers

People subscribed via source and target branches