mirror of
https://github.com/uutils/procps.git
synced 2026-06-10 16:14:00 -07:00
ps: Implement -l, -ly, -X field selection flags
This commit is contained in:
@@ -57,6 +57,29 @@ fn test_job_format() {
|
||||
check_header("-j", &["PID", "PGID", "SID", "TTY", "TIME", "CMD"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_long_format() {
|
||||
check_header(
|
||||
"-l",
|
||||
&[
|
||||
"F", "S", "UID", "PID", "PPID", "C", "PRI", "NI", "ADDR", "SZ", "WCHAN", "TTY", "TIME",
|
||||
"CMD",
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_long_format_with_y() {
|
||||
check_header(
|
||||
"-ly",
|
||||
&[
|
||||
"S", "UID", "PID", "PPID", "C", "PRI", "NI", "RSS", "SZ", "WCHAN", "TTY", "TIME", "CMD",
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_psr_format() {
|
||||
@@ -97,6 +120,17 @@ fn test_virtual_memory_format() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_register_format() {
|
||||
check_header(
|
||||
"-X",
|
||||
&[
|
||||
"PID", "STACKP", "ESP", "EIP", "TMOUT", "ALARM", "STAT", "TTY", "TIME", "COMMAND",
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_code_mapping() {
|
||||
|
||||
Reference in New Issue
Block a user