<commit_before>// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: linux darwin solaris

#include <sys/param.h>
#include <sys/types.h>

#include <sys/sysctl.h>

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

#ifndef __arraycount
#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
#endif

void test_sysctl() {
  char buf[100];
  size_t len = sizeof(buf);
  int mib[] = {CTL_KERN, KERN_OSTYPE};
  int rv = sysctl(mib, __arraycount(mib), buf, &len, NULL, 0);
  assert(!rv);<commit_msg>Fix sanitizer unit test<commit_after>// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: linux, darwin, solaris

#include <sys/param.h>
#include <sys/types.h>

#include <sys/sysctl.h>

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

#ifndef __arraycount
#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
#endif

void test_sysctl() {
  char buf[100];
  size_t len = sizeof(buf);
  int mib[] = {CTL_KERN, KERN_OSTYPE};
  int rv = sysctl(mib, __arraycount(mib), buf, &len, NULL, 0);
  assert(!rv);
{'fraction_non_alphanumeric': 0.18796992481203006, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 4.325, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4256510', 'n_tokens_mistral': 466, 'n_tokens_neox': 448, 'n_words': 114}