Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224607

Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with reboot

From Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with reboot
Date 2015-09-15 04:50 +0200
Message-ID <q8OtH-4U-3@gated-at.bofh.it> (permalink)
References <q6oWK-2qG-21@gated-at.bofh.it> <q6ppM-2YE-19@gated-at.bofh.it> <q6AOe-2wV-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Kees,

 >> +run_crash:
 >> +       @sh pstore_crash_test || echo "pstore_crash_test: [FAIL]"
 >
 > This is probably better written to exit 1 on failure, otherwise it
 > just _says_ it fails. (Though lots of selftests in the tree already
 > have this problem, it's best to avoid the pattern for new stuff.)
 > Maybe something like:
 >
 >      @sh pstore_crash_test || { echo "pstore_crash_test: [FAIL]"; 
exit 1; }

OK. I'll add the "exit 1".

 >> +prlog -n "Checking dmesg files exist in pstore filesystem ... "
 >> +if [ -e dmesg-${backend}-0 ]; then
 >> +    prlog "ok"
 >> +    for f in `ls dmesg-${backend}-*`; do
 >> +       prlog -e "\t${f}"
 >> +    done
 >> +else
 >> +    prlog "FAIL"
 >> +    rc=1
 >> +fi
 >
 > This test pattern is repeated a lot. Maybe better to create a helper
 > function instead? It could make the tests much more readable.

Yes, I should make a helper function in v2.

Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] selftests/pstore: add pstore test script Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-08 13:10 +0200
  [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-08 13:40 +0200
    Re: [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Mark Salyzyn <salyzyn@android.com> - 2015-09-09 01:30 +0200
      Re: [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-15 04:40 +0200
        Re: [PATCH 1/2] selftests/pstore: add pstore test script for  pre-reboot Mark Salyzyn <salyzyn@android.com> - 2015-09-21 23:10 +0200
    Re: [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Kees Cook <keescook@chromium.org> - 2015-09-09 01:40 +0200
      Re: [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-15 04:40 +0200
        RE: [PATCH 1/2] selftests/pstore: add pstore test script for  pre-reboot 阿口誠司 / AGUCHI,SEIJI   <seiji.aguchi.tr@hitachi.com> - 2015-09-16 14:10 +0200
          Re: [PATCH 1/2] selftests/pstore: add pstore test script for pre-reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-17 08:00 +0200
  [PATCH 2/2] selftests/pstore: add pstore test scripts going with  reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-08 13:40 +0200
    Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with reboot Kees Cook <keescook@chromium.org> - 2015-09-09 01:50 +0200
      Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with  reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-15 04:50 +0200
        RE: [PATCH 2/2] selftests/pstore: add pstore test scripts going  with reboot 阿口誠司 / AGUCHI,SEIJI   <seiji.aguchi.tr@hitachi.com> - 2015-09-16 14:20 +0200
          Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with  reboot Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-09-17 08:00 +0200
  Re: [PATCH 0/2] selftests/pstore: add pstore test script Kees Cook <keescook@chromium.org> - 2015-09-09 01:50 +0200

csiph-web