History log of /openbmc/obmc-console/test/test-console-client-no-args (Results 1 – 1 of 1)
Revision Date Author Comments
# 4ec26bb1 29-Aug-2024 Igor Kononenko <i.kononenko.e@gmail.com>

obmc-console: fix segfault on missing config

The `obmc-console-client` allow to not specify configuration file for
active session. But at the same time it does not tolerate null pointer
passed as co

obmc-console: fix segfault on missing config

The `obmc-console-client` allow to not specify configuration file for
active session. But at the same time it does not tolerate null pointer
passed as config. This leads to a segmentation fault due to a missing
configuration file.

Fix this small inconvenience.

Added testcase to make sure that obmc-console-client doesn't segfault
when invoked without any arguments.

Output without the fix:
'''
+ /home/dev/obmc-console/build/obmc-console-client
+ grep Connection refused
Segmentation fault (core dumped)
'''

Output with the fix:
'''
+ /home/ninad/dev/1110_ghe/obmc-console/build/obmc-console-client
+ grep Connection refused
+ cleanup
+ cd -
+ rm -rf /tmp/test_console_client_no_args_3245394.DZqk0S
'''

Change-Id: Ia83da8bca30e2be94e00066f20f2cbe2ccba23b6
Tested-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Igor Kononenko <i.kononenko.e@gmail.com>

show more ...