Skip to content

utils_net: disable color chars#4060

Merged
dzhengfy merged 1 commit intoavocado-framework:masterfrom
dzhengfy:fix_color_character
Mar 25, 2025
Merged

utils_net: disable color chars#4060
dzhengfy merged 1 commit intoavocado-framework:masterfrom
dzhengfy:fix_color_character

Conversation

@dzhengfy
Copy link
Copy Markdown
Contributor

@dzhengfy dzhengfy commented Feb 6, 2025

The command might output ip address with color characters which will break the script, like below.
Get ipv6 address of vm1: �[34m2620:52:11:1601:982f:7bff:fe94:1415�[0m

This is to disable the color characters in the outputs.

Signed-off-by: Dan Zheng dzheng@redhat.com

@dzhengfy
Copy link
Copy Markdown
Contributor Author

dzhengfy commented Feb 6, 2025

Before the fix:
(1/1) Host_RHEL.m9.u6.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.aarch64.page_64k.io-github-autotest-qemu.bigfile_transfer_over_ipv6.remote_addr.arm64-pci: ERROR: SCP transfer failed (status: 255, output: 'Executing: program /usr/bin/ssh host \033[34m2620:52:11:1601:9824:20ff:fe54:9207\033[0m, user root, command sftp\nhostname contains invalid characters\nConnection closed\n') (112.42 s)

After the fix:
(1/1) Host_RHEL.m9.u6.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.aarch64.page_64k.io-github-autotest-qemu.bigfile_transfer_over_ipv6.remote_addr.arm64-pci: PASS (132.35 s)

Copy link
Copy Markdown
Contributor

@chloerh chloerh left a comment

Choose a reason for hiding this comment

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

We could add an option instead

@rh-jugraham
Copy link
Copy Markdown
Contributor

@dzhengfy @chloerh Curious about the status of this PR, as I just recently also encountered this same test failure.

@dzhengfy
Copy link
Copy Markdown
Contributor Author

@rh-jugraham yes, I forgot this PR. I will update it today.

@dzhengfy dzhengfy force-pushed the fix_color_character branch from ce24508 to 2a35efc Compare March 25, 2025 02:24
@dzhengfy dzhengfy marked this pull request as draft March 25, 2025 04:08
@dzhengfy dzhengfy force-pushed the fix_color_character branch 3 times, most recently from 197caec to 2c35528 Compare March 25, 2025 04:37
The command might output ip address with color characters which will
break the script, like below.
Get ipv6 address of vm1: �[34m2620:52:11:1601:982f:7bff:fe94:1415�[0m

This is to disable the color characters in the outputs.

Signed-off-by: Dan Zheng <dzheng@redhat.com>
@dzhengfy dzhengfy force-pushed the fix_color_character branch from 2c35528 to 82d16e8 Compare March 25, 2025 04:40
@dzhengfy dzhengfy marked this pull request as ready for review March 25, 2025 04:48
@dzhengfy dzhengfy requested a review from chloerh March 25, 2025 04:49
@dzhengfy dzhengfy requested a review from YvanY0 March 25, 2025 07:43
Copy link
Copy Markdown
Contributor

@YvanY0 YvanY0 left a comment

Choose a reason for hiding this comment

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

I think this is safe for qemu level, LGTM

@dzhengfy dzhengfy merged commit 0e1c0f7 into avocado-framework:master Mar 25, 2025
49 checks passed
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.

4 participants