On one of my ubuntu22 machines, the NAMESPACE5[] character array was
outputing garbage for the last test. Looks like gtest was running it in
another thread, and the pointer was garbage. Promote the NAMESPACE*
variables to be heap variables so that they're safely available for all
threads.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
#include "libcgroup-internal.h"
+char * const NAMESPACE1 = "ns1";
+char * const NAMESPACE5 = "ns5";
+
class BuildPathV1Test : public ::testing::Test {
protected:
* Note that controllers 1 and 5 are also given namespaces
*/
void SetUp() override {
- char NAMESPACE1[] = "ns1";
- char NAMESPACE5[] = "ns5";
const int ENTRY_CNT = 6;
int i, ret;
#include "libcgroup-internal.h"
+char * const NAMESPACE1 = "ns1";
+char * const NAMESPACE4 = "ns4";
+
class BuildTasksProcPathTest : public ::testing::Test {
protected:
* Note that controllers 1 and 4 are also given namespaces
*/
void SetUp() override {
- char NAMESPACE1[] = "ns1";
- char NAMESPACE4[] = "ns4";
const int ENTRY_CNT = 6;
int i, ret;