linux_kselftest-fixes-6.9-rc5
This kselftest fixes update for Linux 6.9-rc5 consists of a fix to kselftest harness to prevent infinite loop triggered in an assert in FIXTURE_TEARDOWN and a fix to a problem seen in being able to stop subsystem-enable tests when sched events are being traced. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmYdUS0ACgkQCwJExA0N Qxy3oA/+JsYyCNBJigi83TxhoaMbDwTl05R+HzCYsLTHUHKCZaAq2Q5SDzF7f4xN 3tIzP2GcpnjcspJRwB3+LYyTZgs4Ja1eHupkcIRL/n0RElLJtGpEDm4of0pdCZxO Z1V+CsFdW83HuVmHSKAZg6f5G7hkG1f49WtibKnuu4H2MYassjLjEhMf243ai8O/ 9M9HgbaCdDKhaXcJ8pqOXaumlgC0Oa8MffN8RTDPjtfJZU6MkZMSA5qmn6r6SNDd H9swYr8Q61w6cKCju6CIxowWCcbr1cKbE7RT4/tj+b1XAXkvfaKDwLDglf+brVK8 s7LVxTIaat/ljhCX35HsyOxVcejS2p5ThDdTAnr/XU2tp/yhGp/rBTgMoPKZEHgq ak6D+LA2Zxj897mtq5pGddzD4aSMQh2Mik70Qdjg2OOxjqfl2Pmc9JSJkQlG4Fng Vy49rzZA2q0M3JUFVEJcLtkBKNCCWU0L6j4EU47jOwIHNx7oS9aB2gFfJUWVjSvg blnBEDCfMA/FuseRkyPb4BpKFjEmh0pOVpXcSI2irXvl5h9RLcA8g8eiU0ZWL5le I7msjswjL+88gNQz41aTZKfFFQIVsJjMa4UI058xNm7B8TfrXg0YKtsDaykc/iCO 5k579aKcRx1SWOYsltTa6Qm6Sl+m9rNNzK8IrmjF4Rckfdk4cnM= =8nki -----END PGP SIGNATURE----- Merge tag 'linux_kselftest-fixes-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "A fix to kselftest harness to prevent infinite loop triggered in an assert in FIXTURE_TEARDOWN and a fix to a problem seen in being able to stop subsystem-enable tests when sched events are being traced" * tag 'linux_kselftest-fixes-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/harness: Prevent infinite loop due to Assert in FIXTURE_TEARDOWN selftests/ftrace: Limit length in subsystem-enable tests
This commit is contained in:
commit
3fdfcd98f0
@ -18,7 +18,7 @@ echo 'sched:*' > set_event
|
||||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -lt 3 ]; then
|
||||
fail "at least fork, exec and exit events should be recorded"
|
||||
fi
|
||||
@ -29,7 +29,7 @@ echo 1 > events/sched/enable
|
||||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -lt 3 ]; then
|
||||
fail "at least fork, exec and exit events should be recorded"
|
||||
fi
|
||||
@ -40,7 +40,7 @@ echo 0 > events/sched/enable
|
||||
|
||||
yield
|
||||
|
||||
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
|
||||
if [ $count -ne 0 ]; then
|
||||
fail "any of scheduler events should not be recorded"
|
||||
fi
|
||||
|
@ -383,6 +383,7 @@
|
||||
FIXTURE_DATA(fixture_name) self; \
|
||||
pid_t child = 1; \
|
||||
int status = 0; \
|
||||
bool jmp = false; \
|
||||
memset(&self, 0, sizeof(FIXTURE_DATA(fixture_name))); \
|
||||
if (setjmp(_metadata->env) == 0) { \
|
||||
/* Use the same _metadata. */ \
|
||||
@ -399,8 +400,10 @@
|
||||
_metadata->exit_code = KSFT_FAIL; \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
jmp = true; \
|
||||
if (child == 0) { \
|
||||
if (_metadata->setup_completed && !_metadata->teardown_parent) \
|
||||
if (_metadata->setup_completed && !_metadata->teardown_parent && !jmp) \
|
||||
fixture_name##_teardown(_metadata, &self, variant->data); \
|
||||
_exit(0); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user