From d5479665d229a64913ab21aedbfa42cd755296f5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 24 Nov 2024 13:25:25 +0000 Subject: [PATCH] remove unwarranted entries --- src/shims/unix/foreign_items.rs | 8 +------- tests/pass-dep/libc/libc-sysconf.rs | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index 2d64665650..249d41c0f7 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -61,13 +61,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // the machine's fd table does not start with a pre-allocated size but just the // standard streams so we can't use it here and the spec imposes // a minimum of `_POSIX_OPEN_MAX` (20). - ("_SC_OPEN_MAX", |this| Scalar::from_int(20, this.pointer_size())), - // The spec imposes a minimum of `_POSIX_ARG_MAX` (4096). - ("_SC_ARG_MAX", |this| Scalar::from_int(4096, this.pointer_size())), - // The spec imposes a minimum of `_POSIX_CHILD_MAX` (25). - ("_SC_CHILD_MAX", |this| Scalar::from_int(25, this.pointer_size())), - // 16 here is the least common denominator (i.e. macos, solarish). - ("_SC_NGROUPS_MAX", |this| Scalar::from_int(16, this.pointer_size())), + ("_SC_OPEN_MAX", |this| Scalar::from_int(65536, this.pointer_size())), ]; for &(sysconf_name, value) in sysconfs { let sysconf_name = this.eval_libc_i32(sysconf_name); diff --git a/tests/pass-dep/libc/libc-sysconf.rs b/tests/pass-dep/libc/libc-sysconf.rs index 7fa2e78216..b832b3033b 100644 --- a/tests/pass-dep/libc/libc-sysconf.rs +++ b/tests/pass-dep/libc/libc-sysconf.rs @@ -10,13 +10,7 @@ fn test_sysconfbasic() { let gwmax = libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX); assert!(gwmax >= 512); let omax = libc::sysconf(libc::_SC_OPEN_MAX); - assert_eq!(omax, 20); - let amax = libc::sysconf(libc::_SC_ARG_MAX); - assert_eq!(amax, 4096); - let cmax = libc::sysconf(libc::_SC_CHILD_MAX); - assert_eq!(cmax, 25); - let nmax = libc::sysconf(libc::_SC_NGROUPS_MAX); - assert_eq!(nmax, 16); + assert_eq!(omax, 65536); } }