<commit_before>_import_("../ffi")

libc = load("libc.so.6")

errno = libc.var("i", "errno")
assert(errno.get() == 0)
print("errno: " + errno.get() + "\n")

function wrap(rett, funcn, paramt) {
    getroottable()[funcn] = libc.func(rett, funcn, paramt)
}

wrap("i", "socket", ["i", "i", "i"])
wrap("i", "perror", ["s"])

# Random, diffenitily unsupported values
s = socket(100, 100, 100)
print("errno: " + errno.get() + "\n")
perror("perror")
# EINVAL
assert(errno.get() == 22)
<commit_msg>Don't assume that errno is 0 when we start.<commit_after>_import_("../ffi")

libc = load("libc.so.6")

errno = libc.var("i", "errno")
print("errno: " + errno.get() + "\n")
#assert(errno.get() == 0)

function wrap(rett, funcn, paramt) {
    getroottable()[funcn] = libc.func(rett, funcn, paramt)
}

wrap("i", "socket", ["i", "i", "i"])
wrap("i", "perror", ["s"])

# Random, diffenitily unsupported values
s = socket(100, 100, 100)
print("errno: " + errno.get() + "\n")
perror("perror")
# EINVAL
assert(errno.get() == 22)

{'fraction_non_alphanumeric': 0.2487611496531219, 'fraction_numerical': 0.026759167492566897, 'mean_word_length': 4.9411764705882355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5486972', 'n_tokens_mistral': 438, 'n_tokens_neox': 398, 'n_words': 92}