avocado-framework / avocado-vt

Avocado VT Plugin
https://avocado-vt.readthedocs.org/
Other
83 stars 241 forks source link

utils_net:Remove color of "ip" output #3931

Closed chloerh closed 2 months ago

chloerh commented 2 months ago

The color charaters are hard to parse and affecting many tests. Add -c=never to remove color of ip command's output to fix the problem.

yanglei-rh commented 1 month ago

Hi @chloerh This change caused many automation errors for virtual network feature. Because after executing command with-c=never, when judging whether the command is executed correctly, it always gets non-0, which means that the command execution failed, thus causing tests failures. So could you please help re-write this to avoide cause regression issues on the virtual network side? Thanks.

chloerh commented 1 month ago

Hi @chloerh This change caused many automation errors for virtual network feature. Because after executing command with-c=never, when judging whether the command is executed correctly, it always gets non-0, which means that the command execution failed, thus causing tests failures. So could you please help re-write this to avoide cause regression issues on the virtual network side? Thanks.

Thanks for pointing this out, I'll remove -c=never for commands that don't need to have their output to be parsed first.

chloerh commented 1 month ago

@yanglei-rh Hi, could you help provide some specific commands that I get non-0 return? I have removed a few options https://github.com/avocado-framework/avocado-vt/pull/3956

yanglei-rh commented 1 month ago

@yanglei-rh Hi, could you help provide some specific commands that I get non-0 return? I have removed a few options #3956

Hi @chloerh , I hit this issues with command ip -c=never addr add 192.168.10.11/24 dev eth0, it always prompted me that is not recognized as an internal or external command.

chloerh commented 1 month ago

@yanglei-rh Hi, could you help provide some specific commands that I get non-0 return? I have removed a few options #3956

Hi @chloerh , I hit this issues with command ip -c=never addr add 192.168.10.11/24 dev eth0, it always prompted me that is not recognized as an internal or external command.

Thanks! I'll check this part.

fbq815 commented 1 month ago

@chloerh I've found out this change is blocking some tests cause the iproute2 version is too old to support "-c=never", my guest have the iprout2 version of "ip utility, iproute2-ss170501" maybe we need some internel workaround of this change