Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177528068
D61457.1794634759.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61457.1794634759.diff
View Options
diff --git a/tests/sys/pmc/amd/pmc_frontend_test.sh b/tests/sys/pmc/amd/pmc_frontend_test.sh
--- a/tests/sys/pmc/amd/pmc_frontend_test.sh
+++ b/tests/sys/pmc/amd/pmc_frontend_test.sh
@@ -32,13 +32,11 @@
# Keep a CPU busy so that samples are taken while recording.
sh -c 'i=0; while [ $i -lt 3000000 ]; do i=$((i + 1)); done' &
load=$!
- # pmc record returns kevent()'s result (1) when the -t timer ends
- # the capture and 0 when it is interrupted.
pmc record -s frontend -t 3 frontend.pmc > record.out 2>&1
rc=$?
kill "$load" 2>/dev/null
wait
- [ "$rc" -le 1 ] || \
+ [ "$rc" -eq 0 ] || \
atf_fail "pmc record -s frontend failed: $(cat record.out)"
# Each decoded sample row of the analysis carries miss percentages.
diff --git a/tests/sys/pmc/pmc_cli_test.sh b/tests/sys/pmc/pmc_cli_test.sh
--- a/tests/sys/pmc/pmc_cli_test.sh
+++ b/tests/sys/pmc/pmc_cli_test.sh
@@ -23,16 +23,10 @@
atf_skip "libpmc has no pmu-events table for this CPU"
}
-# Run pmc record, saving its output in record.out. pmc record returns
-# kevent()'s result (1) when the -t timer ends the capture and 0 when it is
-# interrupted; any other status means the capture failed.
+# Run pmc record, saving its output in record.out.
pmc_record()
{
pmc record "$@" > record.out 2>&1
- case $? in
- 0|1) return 0 ;;
- *) return 1 ;;
- esac
}
atf_test_case pmc_info_missing_file
diff --git a/usr.sbin/pmc/cmd_pmc_record.cc b/usr.sbin/pmc/cmd_pmc_record.cc
--- a/usr.sbin/pmc/cmd_pmc_record.cc
+++ b/usr.sbin/pmc/cmd_pmc_record.cc
@@ -733,8 +733,10 @@
}
break;
case EVFILT_TIMER:
- if (update_status(logfd) == 1)
+ if (update_status(logfd) == 1) {
+ status = EX_OK;
goto done;
+ }
break;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 5:39 AM (53 m, 25 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41710233
Default Alt Text
D61457.1794634759.diff (1 KB)
Attached To
Mode
D61457: pmc: Exit with EX_OK when the pmc record time limit ends the capture
Attached
Detach File
Event Timeline