On Mon,  3 Aug 2026 23:59:10 -0300 Marcelo Mendes Spessoto Junior wrote:
> +TEST(cannot_put_non_existent_label)
> +{
> +     int fd, err;
> +
> +     fd = socket(PF_INET6, SOCK_DGRAM, 0);
> +     ASSERT_GE(fd, 0) TH_LOG("socket failed");
> +
> +     err = flowlabel_put(fd, 10);
> +     ASSERT_TRUE(err) TH_LOG("expected put of a non-existent label to fail");
> +     ASSERT_EQ(ESRCH, errno) TH_LOG("expected ESRCH, got %d", errno);

nit: I think you're using ASSERTS where EXPECT should be used.
My understanding is that EXPECT is better if the test can continue.

> +     ASSERT_EQ(0, close(fd));

Reply via email to