[PATCH] Integrate PPC for FWTS-LIVE Frontend
ivanhu
ivan.hu at canonical.com
Wed Feb 8 07:18:47 UTC 2017
On 2017年02月08日 15:01, Alex Hung wrote:
> Some consumers, such as PC BIOS vendors or PC system vendors, run
> FWTS-LIVE on target systems and check the log files on their Windows
> computers, and therefore it is easier for them to power off right after
> tests. However, this behaviour is not about PC or PPC and it may not
> make senses to detect x86 & PPC.
Agree, that's the most feedback we can get on UEFI Plugfest.
>
> Should we have two choices, shutdown & end, instead of one choice,
> shutdown | end, after the tests?
Two choices sound good to me.
Cheers,
Ivan
>
> Any comments?
>
>
> On Wed, Feb 8, 2017 at 11:55 AM, Deborah McLemore <debmc at us.ibm.com
> <mailto:debmc at us.ibm.com>> wrote:
>
> Interesting point.
>
> Let me first say that I am just beginning to be a consumer of
> FWTS-LIVE on USB for PPC.
>
> My use cases when running the FWTS-LIVE on USB is that after
> initially seeing the results.log in the text dialogs, I like to go
> to the operating system and find the results.log and then offload
> that either to another box or some other repository for review
> later, etc.
>
> I'm not sure how most consumers use the output file and get that
> easily in a repo somewhere without having to re-IPL the USB stick
> (or mount the image, etc).
>
> Maybe others can comment on the use cases more so I can better
> understand.
>
> I'm all for having platform specifics when they make sense, so if
> the X86 platform seems that a hard shutdown without any operating
> system file access is best then we can definitely discuss on PPC as
> to what makes sense on that platform as well (or maybe there's some
> switches that need tuned, etc).
>
>
> =====================================
> Deb McLemore
> IBM OpenPower - IBM Systems
> (512) 286 9980
>
> debmc at us.ibm.com <mailto:debmc at us.ibm.com>
> debmc at linux.vnet.ibm.com <mailto:debmc at linux.vnet.ibm.com> - (plain
> text)
> =====================================
>
>
>
> ----- Original message -----
> From: Alex Hung <alex.hung at canonical.com
> <mailto:alex.hung at canonical.com>>
> Sent by: fwts-devel-bounces at lists.ubuntu.com
> <mailto:fwts-devel-bounces at lists.ubuntu.com>
> To: fwts-devel at lists.ubuntu.com <mailto:fwts-devel at lists.ubuntu.com>
> Cc:
> Subject: Re: [PATCH] Integrate PPC for FWTS-LIVE Frontend
> Date: Tue, Feb 7, 2017 8:31 PM
>
> On 2017-02-01 06:56 AM, Deb McLemore wrote:
> > This feature adds the integration of the PPC platform for running
> > the FWTS-LIVE tests.
> >
> > PPC available tests are queried and dynamic execution occurs on
> > a platform basis, i.e. only PPC tests are run when PPC
> architecture
> > is detected. For BIOS and ACPI tests, these tests are the default
> > tests and are conditionally queried and executed based on the
> > uname of the runtime system.
> >
> > Signed-off-by: Deb McLemore <debmc at linux.vnet.ibm.com
> <mailto:debmc at linux.vnet.ibm.com>>
> > ---
> > live-image/fwts-frontend-text | 93
> ++++++++++++++++++++++++++++++-------------
> > 1 file changed, 66 insertions(+), 27 deletions(-)
> >
> > diff --git a/live-image/fwts-frontend-text
> b/live-image/fwts-frontend-text
> > index 799cd46..26faed8 100755
> > --- a/live-image/fwts-frontend-text
> > +++ b/live-image/fwts-frontend-text
> > @@ -1,6 +1,7 @@
> > #!/bin/bash
> > #
> > # Copyright (C) 2010-2017 Canonical
> > +# Some of this work - Copyright (C) 2017 IBM
> > #
> > # This program is free software; you can redistribute it and/or
> > # modify it under the terms of the GNU General Public License
> > @@ -40,7 +41,8 @@ fi
> > #
> > WORK_DIR=/fwts/$FWTS_DATE/$FWTS_TIME
> > FWTS_AUTO_SHUTDOWN="$1"
> > -SHUTDOWN_AT_END=1
> > +# Change shutdown to non-destructive default to not power
> cycle box unknowingly
> > +SHUTDOWN_AT_END=0
>
> Some run fwts-live on USB drive on multiple systems and shutting
> down on
> each tested systems is a desired behaviour.
>
> It may be better to have different default for PPC and the
> rests. The
> same also applies to below changes from "Press Enter to shutdown" to
> "Press Enter to end"
>
> >
> > #
> > # set WORK_DIR to /cdrom/fwts if booting via casper
> > @@ -53,6 +55,8 @@ fi
> > #
> > # check /proc/cmdline and argv[1] for FWTS_AUTO_SHUTDOWN to
> toggle auto shutdown
> > #
> > +
> > +# live-build v5 uses boot=live, leave the following for
> backward compatibility
> > if [ `grep -qs FWTS_AUTO_SHUTDOWN=1 /proc/cmdline; echo $?`
> -ne 0 ]; then
> > if [ -n "${CASPER_DETECTED:+x}" ]; then
> > SHUTDOWN_AT_END=0
> > @@ -76,8 +80,10 @@ do_test()
> > num_tests=`fwts $1 --show-tests | wc -l`
> > num_tests=$((num_tests - 1))
> > if [ $num_tests -gt 0 ]; then
> > - fwts --force-clean --skip-test=s3,s4 $1
> --show-progress-dialog --log-type plaintext,html | dialog
> --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
> > + fwts --force-clean $1 --show-progress-dialog --log-type
> plaintext,html | dialog --backtitle "$FWTS" --title "$2" --gauge
> "" 13 80 0
> > fi
> > + # sleep so the progress dialog is shown for a period of
> time, otherwise it just flashes by and end-user cannot tell what
> it was
> > + sleep 1
> > }
> >
> > #
> > @@ -186,7 +192,7 @@ finish()
> > no_tests_finish()
> > {
> > dialog --backtitle "$FWTS" --title "Abort Testing!" --msgbox \
> > - " You did not select any tests to be run.\n\n
> Press Enter to shutdown." 7 50
> > + "You did not select any tests to be run.\n\nPress Enter to
> end." 7 50
> > finish
> > }
> >
> > @@ -215,8 +221,7 @@ the directory:
> /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
> >
> > dialog --backtitle "$FWTS" --title "Testing Complete"
> --msgbox \
> > "The results can be found on the USB stick in the\n
> > -the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
> > - Press Enter to shutdown" 9 55
> > +the directory:
> /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\nPress Enter to end." 9 55
> > finish
> > }
> >
> > @@ -225,49 +230,83 @@ the directory:
> /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
> > #
> > mkdir -p $WORK_DIR >& /dev/null
> > if [ $? -ne 0 ]; then
> > - dialog --ok-label "Shutdown" --backtitle "$FWTS" --title
> "Error" --msgbox "Could not create directory
> fwts/$FWTS_DATE/$FWTS_TIME to store test results.\n\n
> Press Enter to shutdown." 8 50
> > + dialog --ok-label "Finish and End" --backtitle "$FWTS"
> --title "Error" --msgbox "Could not create directory
> fwts/$FWTS_DATE/$FWTS_TIME to store test results.\n\nPress Enter
> to end." 8 50
> > finish
> > exit 0
> > fi
> >
> > +UNAME_PLATFORM=`(uname -m) 2>/dev/null` || UNAME_PLATFORM=unknown
> > +
> > while true
> > do
> > - dialog --help-button --backtitle "$FWTS" --title "Select
> Tests" --radiolist \
> > - "This will run a suite of firmware tests that will check
> the BIOS and ACPI tables. It can also find issues that can cause
> Linux problems.\n\n\
> > -The default below is to run just all the Batch Tests, but you
> can select more tests below if required.\n\nPlease select below
> (using cursor up/down and space) and press enter to continue:" \
> > - 22 70 6 \
> > - 1 "All Batch Tests" on \
> > - 2 "ACPI Tests" off \
> > - 3 "UEFI Tests" off \
> > - 4 "Recommended Tests" off \
> > - 5 "Select Individual Tests" off \
> > - 6 "Abort Testing" off \
> > - 2> $OPTIONS
> > +
> > + case "${UNAME_PLATFORM}" in
> > + ppc*)
> > + dialog --help-button --backtitle "$FWTS" --title "Select
> Tests" --radiolist \
> > + "This will run a suite of firmware tests that will check the
> device tree and related subsystems. It can also find issues that
> can cause Linux problems.\n\nThe default below is to run just
> all the Batch Tests, but you can select more tests below if
> required.\n\nPlease select below (using cursor up/down and
> space) and press enter to continue."\
> > + 22 70 4 \
> > + "All" "All Batch Tests" on \
> > + "Recommended" "Recommended Tests" off \
> > + "Selected" "Select Individual Tests" off \
> > + "Abort" "Abort Testing" off \
> > + 2> $OPTIONS
> > + ;;
> > + *)
> > + dialog --help-button --backtitle "$FWTS" --title "Select
> Tests" --radiolist \
> > + "This will run a suite of firmware tests that will check the
> BIOS and ACPI tables. It can also find issues that can cause
> Linux problems.\n\nThe default below is to run just all the
> Batch Tests, but you can select more tests below if
> required.\n\nPlease select below (using cursor up/down and
> space) and press enter to continue."\
> > + 22 70 6 \
> > + "All" "All Batch Tests" on \
> > + "ACPI" "ACPI Tests" off \
> > + "UEFI" "UEFI Tests" off \
> > + "Recommended" "Recommended Tests" off \
> > + "Selected" "Select Individual Tests" off \
> > + "Abort" "Abort Testing" off \
> > + 2> $OPTIONS
> > + ;;
> > +
> > + esac
> >
> > case $? in
> > 0)
> > cd $WORK_DIR >& /dev/null
> > case `cat $OPTIONS` in
> > - '1')
> > - do_test "--batch --uefitests" 'Running Batch Tests'
> > + 'All')
> > + case "${UNAME_PLATFORM}" in
> > + ppc*)
> > + FWTS_OPTIONS="--batch"
> > + ;;
> > + *)
> > + FWTS_OPTIONS="--batch --uefitests --skip-test=s3,s4"
> > + ;;
> > + esac
> > + do_test "${FWTS_OPTIONS}" 'Running Batch Tests'
> > done_tests_finish
> > ;;
> > - '2')
> > - do_test "--acpitests" 'Running ACPI Tests'
> > + 'ACPI')
> > + do_test "--acpitests --skip-test=s3,s4" 'Running ACPI Tests'
> > done_tests_finish
> > ;;
> > - '3')
> > - do_test "--uefitests" 'Running UEFI Tests'
> > + 'UEFI')
> > + do_test "--uefitests --skip-test=s3,s4" 'Running UEFI Tests'
> > done_tests_finish
> > ;;
> > - '4')
> > - do_test "version cpufreq maxfreq msr mtrr nx virt aspm
> dmicheck apicedge klog oops --acpitests --uefitests
> --log-level=medium" 'Running Recommended Tests'
> > + 'Recommended')
> > + case "${UNAME_PLATFORM}" in
> > + ppc*)
> > + FWTS_OPTIONS="--batch"
> > + ;;
> > + *)
> > + FWTS_OPTIONS="version cpufreq maxfreq msr mtrr nx virt aspm
> dmicheck apicedge klog oops --acpitests --uefitests
> --log-level=medium --skip-test=s3,s4"
> > + ;;
> > + esac
> > +
> > + do_test "${FWTS_OPTIONS}" 'Running Recommended Tests'
> > done_tests_finish
> > ;;
> > - '5')
> > + 'Selected')
> > select_tests
> > ;;
> > - '6')
> > + 'Abort')
> > no_tests_finish
> > ;;
> > esac
> >
>
>
> --
> Cheers,
> Alex Hung
>
> --
> fwts-devel mailing list
> fwts-devel at lists.ubuntu.com <mailto:fwts-devel at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> <https://lists.ubuntu.com/mailman/listinfo/fwts-devel>
>
>
>
>
>
>
>
> --
> Cheers,
> Alex Hung
>
>
More information about the fwts-devel
mailing list