cryptohome --action=obfuscate_user will return a different value depending on cryptohomed being up or down, but would never fail:
God value:
cryptohome --action=obfuscate_user --user=g.. ; echo $?
586860cf899a03294703ff226aa2c7a9bf7bc49e
0
Stop cryptohomed, get a different value.
killall cryptohomed
cryptohome --action=obfuscate_user --user=g.. ; echo $?
[ERROR:cryptohome.cc(239)] GetSystemSalt failed: The name org.chromium.Cryptohome was not provided by any .service files
c3e4f8024fe4d9d7142af007ba8926d6f92faa8a
0
Restart, get the good value again.
cryptohome --action=obfuscate_user --user=g.. ; echo $?
586860cf899a03294703ff226aa2c7a9bf7bc49e
0
We should return an error when GetSystemSalt() fails.