Hello, I submitted this patch because it is complicated for me to remember if my current kernel was tested by kernel tests and what tests have been executed too. To avoid to verify manually or to execute twice the same test, I wrote a script wrapper to check that automatically before executing the wanted test.
I don't merge this script into runtests.sh to allow multiple executions of the test if needed (although it is useless, I think).
Regards, Charles-Antoine Couret
The patch seems to be MIA, forgot to attach maybe?
Justin
On Mon, Apr 4, 2016 at 3:53 AM, Charles-Antoine Couret renault@fedoraproject.org wrote:
Hello, I submitted this patch because it is complicated for me to remember if my current kernel was tested by kernel tests and what tests have been executed too. To avoid to verify manually or to execute twice the same test, I wrote a script wrapper to check that automatically before executing the wanted test.
I don't merge this script into runtests.sh to allow multiple executions of the test if needed (although it is useless, I think).
Regards, Charles-Antoine Couret
kernel mailing list kernel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/kernel@lists.fedoraproject.org
Le 04/04/2016 15:11, Justin Forbes a écrit :
The patch seems to be MIA, forgot to attach maybe?
Justin
Curious, with GMail interface I see the patch. I will test with Thunderbird. ;) Regards, Charles-Antoine
On Monday, April 4, 2016 3:49:10 PM CDT Charles-Antoine Couret wrote:
Le 04/04/2016 15:11, Justin Forbes a écrit :
The patch seems to be MIA, forgot to attach maybe?
Justin
Curious, with GMail interface I see the patch. I will test with Thunderbird. ;) Regards, Charles-Antoine
I do not see the patch either
Dennis
From dda596d968b7e09d821d842129b38a2771f63ebb Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret charles-antoine.couret@nexvision.fr Date: Mon, 4 Apr 2016 10:34:33 +0200 Subject: [PATCH] Add script shell wrapper to check if the wanted test was not tested for current version.
It should avoid to verify that manually before executing the test (or to execute twice the test which is useless).
Signed-off-by: Charles-Antoine Couret charles-antoine.couret@nexvision.fr --- kernel-tests.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 kernel-tests.sh
diff --git a/kernel-tests.sh b/kernel-tests.sh new file mode 100755 index 0000000..397264c --- /dev/null +++ b/kernel-tests.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ -z $1 ]; then + echo "You must provide a test name." + exit 1 +fi + +TEST=$1 +CURRENT_VERSION=$(uname -r) + +# Check if wanted test has been executed with current kernel version +for file in logs/*; do + VERSION_TESTED=$(cat $file | sed -n 3p | cut -d ' ' -f 2) + TEST_EXECUTED=$(cat $file | sed -n 2p | cut -d ' ' -f 3) + + if [ "$VERSION_TESTED" == "$CURRENT_VERSION" -a "$TEST_EXECUTED" == "$TEST" ]; then + echo "The current kernel was already tested with this test, abort." + exit 0 + fi +done + +./runtests.sh -t $TEST
Generally I would not be opposed to something like this being tied to an option in .config, so users can choose whether or not they wish to disable retests (I personally retest frequently). Of course the default behavior there would need to be allowing them (unchanged), but you can add disable_retest=1 or something to disable them. Instead of making this a new script, incorporate it into runtests.sh with the .config checking and you can use $testset to verify. You should probably also use $logdir in case people override this locally.
Thanks, Justin
On Mon, Apr 4, 2016 at 12:45 PM, Charles-Antoine Couret < renault@fedoraproject.org> wrote:
From dda596d968b7e09d821d842129b38a2771f63ebb Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret charles-antoine.couret@nexvision.fr Date: Mon, 4 Apr 2016 10:34:33 +0200 Subject: [PATCH] Add script shell wrapper to check if the wanted test was not tested for current version.
It should avoid to verify that manually before executing the test (or to execute twice the test which is useless).
Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr
kernel-tests.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 kernel-tests.sh
diff --git a/kernel-tests.sh b/kernel-tests.sh new file mode 100755 index 0000000..397264c --- /dev/null +++ b/kernel-tests.sh @@ -0,0 +1,22 @@ +#!/bin/sh
+if [ -z $1 ]; then
- echo "You must provide a test name."
- exit 1
+fi
+TEST=$1 +CURRENT_VERSION=$(uname -r)
+# Check if wanted test has been executed with current kernel version +for file in logs/*; do
- VERSION_TESTED=$(cat $file | sed -n 3p | cut -d ' ' -f 2)
- TEST_EXECUTED=$(cat $file | sed -n 2p | cut -d ' ' -f 3)
- if [ "$VERSION_TESTED" == "$CURRENT_VERSION" -a "$TEST_EXECUTED" ==
"$TEST" ]; then
echo "The current kernel was already tested with this test,
abort."
exit 0
- fi
+done
+./runtests.sh -t $TEST
2.5.5 _______________________________________________ kernel mailing list kernel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/kernel@lists.fedoraproject.org
Le 04/04/2016 20:42, Justin Forbes a écrit :
Generally I would not be opposed to something like this being tied to an option in .config, so users can choose whether or not they wish to disable retests
It's a good idea, I will improve my patch. ;)
(I personally retest frequently).
What is the interest to retest with the same kernel?
Of course the default behavior there would need to be allowing them (unchanged), but you can add disable_retest=1 or something to disable them.
Or maybe inverse? Default case without retest. It depends if the use case of retest is popular or not, in fact.
Instead of making this a new script, incorporate it into runtests.sh with the .config checking and you can use $testset to verify. You should probably also use $logdir in case people override this locally.
Ok.
Irrelevant: A RPM package as planned for this application?
Thanks, Charles-Antoine Couret
On Mon, Apr 4, 2016 at 2:25 PM, Charles-Antoine Couret renault@fedoraproject.org wrote:
Le 04/04/2016 20:42, Justin Forbes a écrit :
Generally I would not be opposed to something like this being tied to an option in .config, so users can choose whether or not they wish to disable retests
It's a good idea, I will improve my patch. ;)
Thanks.
(I personally retest frequently).
What is the interest to retest with the same kernel?
Several reasons, testing for race conditions, testing after certain conditions have been met, testing with different VM configurations on the same VM.
Of course the default behavior there would need to be allowing them (unchanged), but you can add disable_retest=1 or something to disable them.
Or maybe inverse? Default case without retest. It depends if the use case of retest is popular or not, in fact.
Actually, this has nothing to do with the case being popular, it is more about changing behavior on existing test systems. People should be able to update without changing the behavior they are used to.
Instead of making this a new script, incorporate it into runtests.sh with the .config checking and you can use $testset to verify. You should probably also use $logdir in case people override this locally.
Ok.
Irrelevant: A RPM package as planned for this application?
I have built one, but it is a weird package in that it needs to end up somewhere easily writeable by whoever is running the test, we actually build things at runtime, etc. Now that we have a config file it might be worth revisiting.
Justin
Patch updated
From 8627ee25c1f95e527d6b9a37e13a19440069889c Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret charles-antoine.couret@nexvision.fr Date: Mon, 4 Apr 2016 10:34:33 +0200 Subject: [PATCH] Add option to check duplication of current test before to execute it, if it is not executed with the current kernel.
It should avoid to verify that manually before executing the test (or to execute twice the test).
Signed-off-by: Charles-Antoine Couret charles-antoine.couret@nexvision.fr --- config.example | 3 +++ runtests.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+)
diff --git a/config.example b/config.example index 0ed8c40..dd76142 100644 --- a/config.example +++ b/config.example @@ -7,6 +7,9 @@ submit=none # submit=anonymous # submit=authenticated
+# Check duplication tests +# disable_retest=y + # Check Signature for Secure Boot # checksig=y # validsig="Fedora Secure Boot Signer" diff --git a/runtests.sh b/runtests.sh index abf1571..f3376df 100755 --- a/runtests.sh +++ b/runtests.sh @@ -11,6 +11,7 @@ cleanrun=PASS failedtests=None commit=n commithook=/usr/bin/true +disable_retest=n
if [ -f ./.config ]; then source ./.config @@ -36,6 +37,19 @@ if [ ! -d "$logdir" ] ; then mkdir $logdir fi
+if [ "$disable_retest" == "y" ]; then + # Check if wanted test has been executed with current kernel version + for file in $(find $logdir -name *.log.txt); do + version_tested=$(cat $file | sed -n 3p | cut -d ' ' -f 2) + test_executed=$(cat $file | sed -n 2p | cut -d ' ' -f 3) + + if [ "$version_tested" == "$kver" -a "$test_executed" == "$testset" ]; then + echo "The current kernel was already tested with this test, abort." + exit 0 + fi + done +fi + args=y
while [ $args = y ]
On Tue, Apr 5, 2016 at 7:28 AM, Charles-Antoine Couret renault@fedoraproject.org wrote:
Patch updated
From 8627ee25c1f95e527d6b9a37e13a19440069889c Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret charles-antoine.couret@nexvision.fr Date: Mon, 4 Apr 2016 10:34:33 +0200 Subject: [PATCH] Add option to check duplication of current test before to execute it, if it is not executed with the current kernel.
It should avoid to verify that manually before executing the test (or to execute twice the test).
Signed-off-by: Charles-Antoine Couret charles-antoine.couret@nexvision.fr
Applied.
Thanks, Justin
kernel@lists.fedoraproject.org