Skip to contentSkip to conversation

kunit: increase KUNIT_LOG_SIZE to 2048 bytes

PATCH In review Heiko Carstens 3 participants 3 messages Mar 27, 2023 – Mar 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kunit: increase KUNIT_LOG_SIZE to 2048 bytes

The s390 specific test_unwind kunit test has 39 parameterized tests. The results in debugfs are truncated since the full log doesn't fit into 1500 bytes.
Therefore increase KUNIT_LOG_SIZE to 2048 bytes in a similar way like it was done recently with commit "kunit: fix bug in debugfs logs of parameterized tests". With that the whole test result is present.

---
 include/kunit/test.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/kunit/test.h +1 -1
index 9721584027d8..57b309c6ca27 100644
@@ -34,7 +34,7 @@ DECLARE_STATIC_KEY_FALSE(kunit_running);
 struct kunit;
 
 /* Size of log associated with test. */
-#define KUNIT_LOG_SIZE 1500
+#define KUNIT_LOG_SIZE 2048
 
 /* Maximum size of parameter description string. */
 #define KUNIT_PARAM_DESC_SIZE 128
Signature · 1 line
2.37.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Heiko Carstens

The s390 specific test_unwind kunit test has 39 parameterized tests. The results in debugfs are truncated since the full log doesn't fit into 1500 bytes.
Therefore increase KUNIT_LOG_SIZE to 2048 bytes in a similar way like it was done recently with commit "kunit: fix bug in debugfs logs of parameterized tests". With that the whole test result is present.

---

This looks good to me. I don't see an issue increasing the log size. Maybe eventually we could create a config option or test attribute for a large log size but for now this seems good. Glad to see people are starting to get use of the parameterized test logs after the debugfs fixes.

Thanks!
-Rae

Quoted 19 lines
 include/kunit/test.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/kunit/test.h +1 -2
index 9721584027d8..57b309c6ca27 100644
@@ -34,7 +34,7 @@ DECLARE_STATIC_KEY_FALSE(kunit_running);
 struct kunit;
 
 /* Size of log associated with test. */
-#define KUNIT_LOG_SIZE 1500
+#define KUNIT_LOG_SIZE 2048
 
 /* Maximum size of parameter description string. */
 #define KUNIT_PARAM_DESC_SIZE 128
--

2.37.2

Reviewed-by on v1 1/1
#2 lore raw
In reply to Heiko Carstens
Quoted 11 lines · Heiko Carstens

The s390 specific test_unwind kunit test has 39 parameterized tests. The results in debugfs are truncated since the full log doesn't fit into 1500 bytes.
Therefore increase KUNIT_LOG_SIZE to 2048 bytes in a similar way like it was done recently with commit "kunit: fix bug in debugfs logs of parameterized tests". With that the whole test result is present.

---

Thanks! This looks fine here.

-- David

Quoted 19 lines
 include/kunit/test.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/kunit/test.h +1 -2
index 9721584027d8..57b309c6ca27 100644
@@ -34,7 +34,7 @@ DECLARE_STATIC_KEY_FALSE(kunit_running);
 struct kunit;
 
 /* Size of log associated with test. */
-#define KUNIT_LOG_SIZE 1500
+#define KUNIT_LOG_SIZE 2048
 
 /* Maximum size of parameter description string. */
 #define KUNIT_PARAM_DESC_SIZE 128
--

2.37.2