8273610: LogTestFixture::restore_config() should not restore options
Reviewed-by: ysuenaga, dholmes
This commit is contained in:
parent
2ee1f96c14
commit
9f86082fd5
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -97,14 +97,15 @@ void LogTestFixture::restore_config() {
|
||||
|
||||
char* decorators = str;
|
||||
|
||||
char* options = NULL;
|
||||
str = strchr(str, ' ');
|
||||
if (str != NULL) {
|
||||
// This output has options. However, UL doesn't allow the options of any
|
||||
// output to be changed, so they cannot be modified by the tests,
|
||||
// and also we cannot change them here. So just mark the end of the
|
||||
// decorators.
|
||||
*str++ = '\0';
|
||||
options = str;
|
||||
}
|
||||
|
||||
set_log_config(name, selection, decorators, options != NULL ? options : "");
|
||||
set_log_config(name, selection, decorators, /* options = */ NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user