s390x: fix make standalone
PATCH 1/1 s390x: fix make standalone
A recent patch broke make standalone. The function find_word is not available when running make standalone, replace it with a simple grep.
--- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/s390x/func.bash +1 -1
@@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || find_word "migration" "$groups"; then + if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then return fi kernel=${kernel%.elf}.pv.bin
Signature · 1 line
2.38.1
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>
I am confused why find_word would not be available in standalone, since run() in runtime.bash uses it quite a few times.
Not that I mind the grep, but I fear more might be broken in standalone?
Anyways, to get this fixed ASAP:
Nico Boehr
Reviewed-byQuoting Nico Boehr (2022-12-21 09:16:51)
Quoted 8 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>
Quoted 7 lines
I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>
OK, I get it now, find_word is not available during _build time_.
Please make this a:
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.
Quoted 6 lines
Quoted 4 lines
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>OK, I get it now,
find_wordis not available during_buildtime_.
That could be changed, but it'd need to be moved to somewhere that mkstandalone.sh wants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So, a new file for find_word() would be cleaner, but that sounds like overkill.
Thanks,
drew
Quoted 4 lines
Please make this a:
Reviewed-by Nico Boehr <[email protected]>
Quoted 20 lines · Andrew Jones
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include
scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.Quoted 3 lines
Quoted 3 lines
Anyways, to get this fixed ASAP:
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Acked-by Nico Boehr <[email protected]>OK, I get it now,
find_wordis not available during_buildtime_.That could be changed, but it'd need to be moved to somewhere that
mkstandalone.shwants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So,
What is wrong with including common.bash?
Quoted 10 lines
a new file for
find_word()would be cleaner, but that sounds like overkill.Thanks,
drewQuoted 4 lines
Please make this a:
Reviewed-by Nico Boehr <[email protected]>
Quoted 23 lines · Nina Schoetterl-Glausch
Quoted 22 lines · Andrew Jones
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include
scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.Quoted 5 lines
Quoted 4 lines
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
OK, I get it now,
find_wordis not available during_buildtime_.That could be changed, but it'd need to be moved to somewhere that
mkstandalone.shwants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So,What is wrong with including common.bash?
for_each_unittest() isn't something that standalone tests need and, theoretically, other non-standalone related functions could be introduced there. Packaging functions for standalone tests which aren't needed by the standalone tests isn't super clean. But, it's not really a problem either.
Thanks,
drew
Quoted 12 lines
Quoted 11 lines
a new file for
find_word()would be cleaner, but that sounds like overkill.Thanks,
drewQuoted 4 lines
Please make this a:
Reviewed-by Nico Boehr <[email protected]>
Quoted 22 lines · On Mon, 26 Dec 2022 19:41:12 +0100 Andrew Jones <[email protected]> wrote:
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include
scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.Quoted 5 lines
Quoted 4 lines
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>
Quoted 7 lines
Quoted 1 line
OK, I get it now,
find_wordis not available during_buildtime_.That could be changed, but it'd need to be moved to somewhere that
mkstandalone.shwants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So, a new file forfind_word()would be cleaner, but that sounds like overkill.
the hack I posted here was meant to be "clean enough" and arch-only (since we are the only ones with this issue). To be honest, I don't really care __how__ we fix the problem, only that we do fix it :)
what do you think would be the cleanest solution?
Quoted 8 lines
Thanks,
drewQuoted 4 lines
Please make this a:
Reviewed-by Nico Boehr <[email protected]>
Quoted 33 lines · Claudio Imbrenda
Quoted 22 lines · On Mon, 26 Dec 2022 19:41:12 +0100 Andrew Jones <[email protected]> wrote:
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include
scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.Quoted 5 lines
Quoted 4 lines
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>Quoted 7 lines
Quoted 1 line
OK, I get it now,
find_wordis not available during_buildtime_.That could be changed, but it'd need to be moved to somewhere that
mkstandalone.shwants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So, a new file forfind_word()would be cleaner, but that sounds like overkill.
Quoted 6 lines
the hack I posted here was meant to be "clean enough" and arch-only (since we are the only ones with this issue). To be honest, I don't really care
__how__we fix the problem, only that we do fix it :)what do you think would be the cleanest solution?
I think your patch is good enough for fixing the issue, so I went ahead and pushed it. If someone wants to figure out a nice way to make find_word available to the standalone builds, too, feel free to send a patch on top of this.
Thanks,
Thomas
Quoted 33 lines · Claudio Imbrenda
Quoted 22 lines · On Mon, 26 Dec 2022 19:41:12 +0100 Andrew Jones <[email protected]> wrote:
Quoted 12 lines · Nico Boehr
Quoting Nico Boehr (2022-12-21 09:16:51)
Quoted 11 lines
Quoting Claudio Imbrenda (2022-12-20 18:55:08)
Quoted 6 lines
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>I am confused why
find_wordwould not be available in standalone, sincerun()in runtime.bash uses it quite a few times.Not that I mind the grep, but I fear more might be broken in standalone?
standalone tests don't currently include
scripts/$ARCH/func.bash, which may be an issue for s390x. That could be fixed, though.Quoted 5 lines
Quoted 4 lines
Anyways, to get this fixed ASAP:
Acked-by Nico Boehr <[email protected]>Quoted 7 lines
Quoted 1 line
OK, I get it now,
find_wordis not available during_buildtime_.That could be changed, but it'd need to be moved to somewhere that
mkstandalone.shwants to source, which could be common.bash, but then we'd need to include common.bash in the standalone tests. So, a new file forfind_word()would be cleaner, but that sounds like overkill.
Quoted 6 lines
the hack I posted here was meant to be "clean enough" and arch-only (since we are the only ones with this issue). To be honest, I don't really care
__how__we fix the problem, only that we do fix it :)what do you think would be the cleanest solution?
A new file, but, like I said, that may be overkill at this time.
Thanks,
drew
Quoted 15 lines · Claudio Imbrenda
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>--- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/s390x/func.bash +0
-0
scripts/s390x/func.bash function arch_cmd_s390x() · line 24
Quoted 5 lines
scripts/s390x/func.bash +1
-1@@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || find_word "migration" "$groups"; then + if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then
What about the '-F' that find_word has?
Quoted 6 lines
scripts/s390x/func.bash +0
-0return fi kernel=${kernel%.elf}.pv.binSignature · 1 line
2.38.1
Quoted 18 lines · Andrew Jones
Quoted 17 lines · Claudio Imbrenda
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>--- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/s390x/func.bash +0
-0@@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
Quoted 5 lines
scripts/s390x/func.bash function arch_cmd_s390x() · line 24
Quoted 3 lines
scripts/s390x/func.bash +1
-1# run PV test case - if [ "$ACCEL" = 'tcg' ] || find_word "migration" "$groups"; then + if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; thenWhat about the '-F' that
find_wordhas?
"migration" is only one string without regular expressions in it, so I assume the -F does not matter here, does it?
Thomas
Quoted 24 lines · Thomas Huth
Quoted 11 lines · Andrew Jones
Quoted 10 lines · Claudio Imbrenda
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>--- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 11 lines
scripts/s390x/func.bash function arch_cmd_s390x() · line 23
Quoted 9 lines
scripts/s390x/func.bash +1
-1@@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || find_word "migration" "$groups"; then + if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; thenWhat about the '-F' that
find_wordhas?
Quoted 2 lines
"migration" is only one string without regular expressions in it, so I assume the -F does not matter here, does it?
You're right. I got carried away at checking equivalence.
Thanks,
drew
Quoted 6 lines · Claudio Imbrenda
A recent patch broke make standalone. The function
find_wordis not available when running make standalone, replace it with a simple grep.Reported-by Nina Schoetterl-Glausch <[email protected]>Fixes 743cacf7 ("s390x: don't run migration tests under PV")Signed-off-by Claudio Imbrenda <[email protected]>
Quoted 17 lines
--- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/s390x/func.bash +1
-1@@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || find_word "migration" "$groups"; then + if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then return fi kernel=${kernel%.elf}.pv.bin