atf
atf copied to clipboard
execute_with_shell() failed on FreeBSD/MIPS with GCC 4.2.1
execute_with_shell() failed to convert C++ std::string into C const char* here:
sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str();
In result we have "ZZZZZZZZ" instead of "/bin/sh". E.g. https://people.freebsd.org/~br/kyua_mips/bin_cat_cat_test_align.html
this workaround helps:
const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL).c_str();
sh_argv[0] = shell.c_str();
This problem found on FreeBSD/MIPS64EB platform (GCC 4.2.1).