Skip to content

Commit 1d6c715

Browse files
committed
testsuite: ensure valid UTF-8 can be logged in dmesg
Problem: None of the tests in t0009-dmesg.t ensure that valid utf-8, non-ascii characters can be logged in the broker's dmesg buffer. Add a test that ensures a valid UTF-8 string can be logged successfully and is displayed properly with `flux-dmesg(1)`.
1 parent 36c308d commit 1d6c715

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t0009-dmesg.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ test_expect_success 'logged non-ascii characters handled ok' '
108108
/bin/echo -n -e "\xFF\xFE\x82\x00" | flux logger &&
109109
flux dmesg
110110
'
111+
test_expect_success 'logged non-ascii printable characters are unmodified' '
112+
flux logger ƒ Φ Ψ Ω Ö &&
113+
flux dmesg | tail -1 > dmesg.utf-8 &&
114+
test_debug "cat dmesg.utf-8" &&
115+
grep "ƒ Φ Ψ Ω Ö" dmesg.utf-8
116+
'
111117
test_expect_success 'dmesg request with empty payload fails with EPROTO(71)' '
112118
${RPC} log.dmesg 71 </dev/null
113119
'

0 commit comments

Comments
 (0)