test: Clean up zero-size speculation + chill()
PATCH v2 26/38 test: Clean up zero-size speculation + chill()
From: Eugene Loh <[email protected]>
The chill() action is not yet supported, but it also is not needed for the test. Therefore, remove the chill() from the legacy test.
But we do not want to diminish test coverage. Therefore, make a copy of the test that keeps the chill (and annotates its XFAIL more clearly).
Signed-off-by Eugene Loh <[email protected]>
--- .../unittest/speculation/tst.zerosize-chill.d | 34 +++++++++++++++++++ .../unittest/speculation/tst.zerosize-chill.r | 6 ++++ test/unittest/speculation/tst.zerosize.d | 7 +--- test/unittest/speculation/tst.zerosize.r | 1 - 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 test/unittest/speculation/tst.zerosize-chill.d create mode 100644 test/unittest/speculation/tst.zerosize-chill.r
test/unittest/speculation/tst.zerosize-chill.d new file +34 -0
@@ -0,0 +1,34 @@ +/* + * Oracle Linux DTrace. + * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved. + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + */ + +/* @@xfail: dtv2, chill not implemented yet */ + +#pragma D option destructive + +BEGIN +{ + self->spec = speculation(); + speculate(self->spec); +} + +BEGIN +{ + this->one = 1; + this->two = 2; + chill(1); + speculate(self->spec); +} + +BEGIN +{ + speculate(self->spec); +} + +BEGIN +{ + exit(0); +}
test/unittest/speculation/tst.zerosize-chill.r new file +6 -0
@@ -0,0 +1,6 @@ + FUNCTION:NAME + :BEGIN + +-- @@stderr -- +dtrace: script 'test/unittest/speculation/tst.zerosize-chill.d' matched 4 probes +dtrace: allowing destructive actions
test/unittest/speculation/tst.zerosize.d +1 -6
@@ -1,14 +1,10 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ -/* @@xfail: dtv2 */ - -#pragma D option destructive - BEGIN { self->spec = speculation();
@@ -19,7 +15,6 @@ BEGIN { this->one = 1; this->two = 2; - chill(1); speculate(self->spec); }
test/unittest/speculation/tst.zerosize.r +0 -1
@@ -3,4 +3,3 @@ -- @@stderr -- dtrace: script 'test/unittest/speculation/tst.zerosize.d' matched 4 probes -dtrace: allowing destructive actions
Signature · 1 line
2.43.5
Quoted 10 lines · eugene.loh--- via DTrace-devel
From: Eugene Loh <[email protected]>
The
chill()action is not yet supported, but it also is not needed for the test. Therefore, remove thechill()from the legacy test.But we do not want to diminish test coverage. Therefore, make a copy of the test that keeps the chill (and annotates its XFAIL more clearly).
Signed-off-by Eugene Loh <[email protected]>
Reviewed-by Kris Van Hees <[email protected]>
Quoted 106 lines
--- .../unittest/speculation/tst.zerosize-chill.d | 34 +++++++++++++++++++ .../unittest/speculation/tst.zerosize-chill.r | 6 ++++ test/unittest/speculation/tst.zerosize.d | 7 +--- test/unittest/speculation/tst.zerosize.r | 1 - 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 test/unittest/speculation/tst.zerosize-chill.d create mode 100644 test/unittest/speculation/tst.zerosize-chill.rtest/unittest/speculation/tst.zerosize-chill.d new file +34
-0@@ -0,0 +1,34 @@ +/* + * Oracle Linux DTrace. + * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved. + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + */ + +/* @@xfail: dtv2, chill not implemented yet */ + +#pragma D option destructive + +BEGIN +{ + self->spec = speculation(); + speculate(self->spec); +} + +BEGIN +{ + this->one = 1; + this->two = 2; + chill(1); + speculate(self->spec); +} + +BEGIN +{ + speculate(self->spec); +} + +BEGIN +{ + exit(0); +}test/unittest/speculation/tst.zerosize-chill.r new file +6
-0@@ -0,0 +1,6 @@ + FUNCTION:NAME + :BEGIN + +-- @@stderr -- +dtrace: script 'test/unittest/speculation/tst.zerosize-chill.d' matched 4 probes +dtrace: allowing destructive actionstest/unittest/speculation/tst.zerosize.d +1
-6@@ -1,14 +1,10 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ -/* @@xfail: dtv2 */ - -#pragma D option destructive - BEGIN { self->spec = speculation();@@ -19,7 +15,6 @@ BEGIN { this->one = 1; this->two = 2; - chill(1); speculate(self->spec); }test/unittest/speculation/tst.zerosize.r +0
-1@@ -3,4 +3,3 @@ -- @@stderr -- dtrace: script 'test/unittest/speculation/tst.zerosize.d' matched 4 probes -dtrace: allowing destructive actionsSignature · 7 lines
2.43.5 _______________________________________________ DTrace-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/dtrace-devel